Saving index per user as TSV. Refactoring.

This commit is contained in:
2018-06-15 01:06:31 +02:00
parent 7446dc9efb
commit 3b5d886da3
7 changed files with 110 additions and 58 deletions

View File

@@ -1,3 +1,5 @@
'use strict';
module.exports = {
library: {
base: 'output/$user/',
@@ -7,17 +9,17 @@ module.exports = {
album: {
image: '$base$postDate - $preview$albumId - $postTitle/$itemIndex - $itemId$ext',
video: '$base$postDate - $preview$albumId - $postTitle/$itemIndex - $itemId$ext',
extractSingleItem: true
extractSingleItem: true,
},
profile: {
image: '$base$userCreated - profile$ext',
description: '$base$userCreated - profile ($userVerified$userVerifiedEmail$userGold$profileOver18)',
avoidAvatar: true
avoidAvatar: true,
},
index: {
file: '$base/index',
entry: '$postId (r/$subreddit) - $hostId ($url) - $postTitle',
unique: true
format: 'tsv',
keys: ['postId', 'postTitle', 'subreddit', 'postDate', 'url'],
},
booleans: {
extracted: 'extracted-',
@@ -25,15 +27,15 @@ module.exports = {
verified: '✔',
verifiedEmail: '✉',
gold: '★',
over18: '♥'
over18: '♥',
},
meta: {
comment: '$itemDescription'
comment: '$itemDescription',
},
dateFormat: 'YYYYMMDD',
truncate: {
limit: 250,
truncator: '...'
truncator: '...',
},
indexOffset: 1,
slashSubstitute: '#',
@@ -47,8 +49,8 @@ module.exports = {
search: false,
preview: true,
reddit: ['ip'],
reupload: []
}
reupload: [],
},
},
reddit: {
api: {
@@ -58,12 +60,12 @@ module.exports = {
token_type: 'bearer',
expires_in: 3600,
refresh_token: '1234567-A-Bc-defg8912hij-klm345opqr',
scope: 'history identity mysubreddits read subscribe'
}
scope: 'history identity mysubreddits read subscribe',
},
},
methods: {
imgur: {
clientId: '1234567abcdefgh'
}
}
clientId: '1234567abcdefgh',
},
},
};