This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import mm from 'music-metadata'; | |
import { promises as fs } from 'fs'; | |
import path from 'path'; | |
import iconv from 'iconv-lite'; | |
import NodeID3 from 'node-id3'; | |
// Function to convert from Windows-1251 to UTF-8 | |
function convertFromWin1251(buffer) { | |
return iconv.decode(buffer, 'win1251'); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
A Script that replaces matching strings in text files of a .zip file | |
Dependencies: | |
npm i extract-zip | |
npm i zip-local | |
Usage: | |
The script can be run as 'node run nodejs-replace-matching-strings-in-text-files-of-a-zip.js' | |
Configuration: | |
The variables of this script can be replaced: |