File size: 401 Bytes
a9c6c8c |
1 2 3 4 5 6 7 8 9 10 11 12 |
var fs=require('fs');
var files=JSON.parse(fs.readFileSync('civitai.info.json'));
var moves=files.filter(file=>{
return file.model.nsfw==true && file.mirror_path.indexOf('nsfw') == -1
});
moves = moves.map(file=>{
m=file.mirror_path.replace(/\\/g,'/');
m=m.replace(/(models\/[^/]+|embeddings)\/(.+)/g,'git mv "$1/$2" "$1/nsfw/$2"');
return m;
}).join('\n')
fs.writeFileSync('move-nsfw.sh',moves); |