aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMelody Horn <melody@boringcactus.com>2020-02-26 16:16:15 -0700
committerGitHub <noreply@github.com>2020-02-26 16:16:15 -0700
commit6157c0172f9b078e7030bd493c842cf372292c74 (patch)
tree60ab1aa097a6e6620011fd12a9c5002f6d77da8c
parent391bef8be3905615e69de4dc771bad3abaefffbe (diff)
downloadcrabravebot-6157c0172f9b078e7030bd493c842cf372292c74.tar.gz
crabravebot-6157c0172f9b078e7030bd493c842cf372292c74.zip
improve paths
-rw-r--r--bot.js3
1 files changed, 1 insertions, 2 deletions
diff --git a/bot.js b/bot.js
index 4535c1b..51f59eb 100644
--- a/bot.js
+++ b/bot.js
@@ -159,7 +159,7 @@ module.exports = {
res.end();
return;
}
- const path = require('path').join('/tmp', style, encodeURIComponent(match[0]));
+ const path = require('path').join('/tmp', style, encodeURIComponent(match[1]) + '.' + match[2]);
if (type === 'mp4') {
res.setHeader('Content-Type', 'video/mp4');
} else {
@@ -186,7 +186,6 @@ module.exports = {
}
const svg = '<?xml version="1.0" encoding="UTF-8" standalone="no"?>\n' + dom.serialize();
fs.writeFileSync(path + '.svg', svg);
- console.log('rsvg-convert', '--format=png', '--output=' + path + '.png', path + '.svg');
child_process.spawnSync('rsvg-convert', ['--format=png', '--output=' + path + '.png', path + '.svg'], {stdio: ['inherit', 'inherit', 'inherit']});
}
if (type === 'mp4') {