Refactor image conversion (#163)

* Refactor image conversion

* Docs
This commit is contained in:
Brahim Hadriche authored and GitHub committed 2023-10-07 18:21:54 -04:00
1 parent 7818f778ea
commit 508306c6f4
26 files changed
+300 -85

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
// Description: Converts SVGs to PNGs and resizes them to the correct dimensions.
const { ArgumentParser } = require('argparse')
const { convertFile } = require('convert-svg-to-png');
(async () => {
const parser = new ArgumentParser({
description: 'Sync Youtube profile with Invidious'
});
parser.add_argument('--input', { help: 'Input file path' });
parser.add_argument('--options', { help: 'Options as json string' });
const args = parser.parse_args()
const input = args.input
const options = JSON.parse(args.options)
await convertFile(input, options);
})();