Compare commits

...

2 Commits

Author SHA1 Message Date
ThePendulum 3f905c6c54 1.24.1 2021-12-18 00:40:14 +01:00
ThePendulum 35ca8ccdd1 Fixed username in save message. 2021-12-18 00:40:12 +01:00
3 changed files with 9 additions and 4 deletions

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{ {
"name": "ripunzel", "name": "ripunzel",
"version": "1.24.0", "version": "1.24.1",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {

View File

@ -1,6 +1,6 @@
{ {
"name": "ripunzel", "name": "ripunzel",
"version": "1.24.0", "version": "1.24.1",
"description": "Web content archiving tool, with versatile filename patterns and extensive options for reddit user profiles.", "description": "Web content archiving tool, with versatile filename patterns and extensive options for reddit user profiles.",
"main": "app.js", "main": "app.js",
"scripts": { "scripts": {

View File

@ -47,10 +47,15 @@ async function writeToIndex(posts, profilePaths, user, args) {
try { try {
const yamlIndex = yaml.safeDump(data); const yamlIndex = yaml.safeDump(data);
const saved = await save(filepath, Buffer.from(yamlIndex, 'utf8'));
return save(filepath, Buffer.from(yamlIndex, 'utf8')); console.log(user);
logger.info(`Saved index with ${posts.length} new posts for ${user.name}`);
return saved;
} catch (error) { } catch (error) {
logger.error(`Could not save index for ${user.username}: ${error.message}`); logger.error(`Could not save index for ${user.name}: ${error.message}`);
return null; return null;
} }
} }