Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
renamer_tool
Advanced tools
Rename files based on a list you provide (like a bunch of videos that you want to change all of them to a new list based on table of contents)
Rename files based on a list you provide (like a bunch of videos that you want to change all of them to a new list based on table of contents)
this is a stand-alone package which you can download and use it.
const fs = require("fs"); const glob = require("glob"); const Rx = require("rxjs"); const { map, mergeMap } = require("rxjs/operators"); const readFileAsObservable$ = Rx.bindNodeCallback(fs.readFile); const listDirectoryAsObservable$ = Rx.bindNodeCallback(glob); const renameFileAsObservable$ = Rx.bindNodeCallback(fs.rename); // list of new names and type of files const newNamesFile = "new_names.txt"; const fileType = "PNG"; // methods const splitTextToNames = (text) => text.split("\r\n"); const nameGenerator = (name, index) => `${index}_${name}.${fileType}`; const observer = { next: (_) => console.log(`${_.old_name} --> ${_.new_name}`), error: (err) => console.log(err), complete: () => console.log("Finished."), }; //observables const newNames$ = readFileAsObservable$(newNamesFile, "utf8").pipe( mergeMap(splitTextToNames), map(nameGenerator) ); const currentFilesNames$ = listDirectoryAsObservable$(`*.${fileType}`).pipe( mergeMap(Rx.from) ); const renameFile = (names_pair) => { const [old_name, new_name] = names_pair; renameFileAsObservable$(old_name, new_name).subscribe(); return { old_name, new_name }; }; Rx.zip(currentFilesNames$, newNames$).pipe(map(renameFile)).subscribe(observer);
FAQs
Rename files based on a list you provide (like a bunch of videos that you want to change all of them to a new list based on table of contents)
We found that renamer_tool demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.