Removed post.user variable.
This commit is contained in:
parent
e1a57a07a3
commit
9140b58c70
|
@ -95,7 +95,6 @@ Path patterns dictate where and how a file will be saved. Various variables and
|
||||||
##### Post
|
##### Post
|
||||||
* `{post.id}`: The ID of the reddit post
|
* `{post.id}`: The ID of the reddit post
|
||||||
* `{post.title}`: The title of the reddit post
|
* `{post.title}`: The title of the reddit post
|
||||||
* `{post.user}`: The user that submitted the post, almost always equivalent to the `--user` command line argument
|
|
||||||
* `{post.date}`: The submission date of the reddit post, formatted by the `dateFormat` configuration described below
|
* `{post.date}`: The submission date of the reddit post, formatted by the `dateFormat` configuration described below
|
||||||
* `{post.index}`: The index of the post according to the sort method
|
* `{post.index}`: The index of the post according to the sort method
|
||||||
* `{post.score}`: The current karma score of the post
|
* `{post.score}`: The current karma score of the post
|
||||||
|
|
|
@ -7,27 +7,27 @@ module.exports = {
|
||||||
direct: 'output/{host.name}/{label}/',
|
direct: 'output/{host.name}/{label}/',
|
||||||
},
|
},
|
||||||
posts: {
|
posts: {
|
||||||
image: '{base.posts}{post.date}{div}{tag.preview}{item.id}{div}{post.title}{ext}',
|
image: '{base.posts}{post.date}{div}{tags.preview}{item.id}{div}{post.title}{ext}',
|
||||||
video: '{base.posts}{post.date}{div}{tag.preview}{item.id}{div}{post.title}{ext}',
|
video: '{base.posts}{post.date}{div}{tags.preview}{item.id}{div}{post.title}{ext}',
|
||||||
text: '{base.posts}{post.date}{div}{tag.preview}{post.id}{div}{post.title}',
|
text: '{base.posts}{post.date}{div}{tags.preview}{post.id}{div}{post.title}',
|
||||||
album: {
|
album: {
|
||||||
image: '{base.posts}{post.date}{div}{tag.preview}{album.id}{div}{post.title}/{item.index}{div}{item.id}{ext}',
|
image: '{base.posts}{post.date}{div}{tags.preview}{album.id}{div}{post.title}/{item.index}{div}{item.id}{ext}',
|
||||||
video: '{base.posts}{post.date}{div}{tag.preview}{album.id}{div}{post.title}/{item.index}{div}{item.id}{ext}',
|
video: '{base.posts}{post.date}{div}{tags.preview}{album.id}{div}{post.title}/{item.index}{div}{item.id}{ext}',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
direct: {
|
direct: {
|
||||||
image: '{base.direct}{item.date}{div}{tag.preview}{item.id}{divs.item.title}{item.title}{ext}',
|
image: '{base.direct}{item.date}{div}{tags.preview}{item.id}{divs.item.title}{item.title}{ext}',
|
||||||
video: '{base.direct}{item.date}{div}{tag.preview}{item.id}{divs.item.title}{item.title}{ext}',
|
video: '{base.direct}{item.date}{div}{tags.preview}{item.id}{divs.item.title}{item.title}{ext}',
|
||||||
text: '{base.direct}{item.date}{div}{tag.preview}{item.id}{divs.item.title}{item.title}',
|
text: '{base.direct}{item.date}{div}{tags.preview}{item.id}{divs.item.title}{item.title}',
|
||||||
album: {
|
album: {
|
||||||
image: '{base.direct}{album.date}{div}{tag.preview}{album.id}{divs.album.title}{album.title}/{item.index}{div}{item.id}{ext}',
|
image: '{base.direct}{album.date}{div}{tags.preview}{album.id}{divs.album.title}{album.title}/{item.index}{div}{item.id}{ext}',
|
||||||
video: '{base.direct}{album.date}{div}{tag.preview}{album.id}{divs.album.title}{album.title}/{item.index}{div}{item.id}{ext}',
|
video: '{base.direct}{album.date}{div}{tags.preview}{album.id}{divs.album.title}{album.title}/{item.index}{div}{item.id}{ext}',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
extractSingleAlbumItem: true,
|
extractSingleAlbumItem: true,
|
||||||
profile: {
|
profile: {
|
||||||
image: '{base.posts}{user.created}{div}profile{ext}',
|
image: '{base.posts}{user.created}{div}profile{ext}',
|
||||||
description: '{base.posts}{user.created}{div}profile ({tag.verified}{tag.verifiedEmail}{tag.gold}{tag.over18})',
|
description: '{base.posts}{user.created}{div}profile ({tags.verified}{tags.verifiedEmail}{tags.gold}{tags.over18})',
|
||||||
avoidAvatar: true,
|
avoidAvatar: true,
|
||||||
},
|
},
|
||||||
index: {
|
index: {
|
||||||
|
|
|
@ -60,7 +60,6 @@ function interpolate(pattern, item = null, content = null, host = null, post = n
|
||||||
id: post.id,
|
id: post.id,
|
||||||
title: post.title && post.title.slice(0, config.library.titleLength),
|
title: post.title && post.title.slice(0, config.library.titleLength),
|
||||||
url: post.url,
|
url: post.url,
|
||||||
user: post.user,
|
|
||||||
date: dateFns.format(post.datetime, dateFormat),
|
date: dateFns.format(post.datetime, dateFormat),
|
||||||
index: post.index + config.library.indexOffset,
|
index: post.index + config.library.indexOffset,
|
||||||
hash: post.hash,
|
hash: post.hash,
|
||||||
|
|
|
@ -1,11 +1,9 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
const util = require('util');
|
function self(host, post) {
|
||||||
const config = require('config');
|
console.log(post);
|
||||||
const fetch = require('node-fetch');
|
|
||||||
|
|
||||||
function self(post) {
|
return {
|
||||||
return Promise.resolve({
|
|
||||||
album: null,
|
album: null,
|
||||||
items: [{
|
items: [{
|
||||||
id: post.id,
|
id: post.id,
|
||||||
|
@ -15,9 +13,9 @@ function self(post) {
|
||||||
datetime: post.datetime,
|
datetime: post.datetime,
|
||||||
type: 'text/plain',
|
type: 'text/plain',
|
||||||
self: true,
|
self: true,
|
||||||
original: post
|
original: post,
|
||||||
}]
|
}]
|
||||||
});
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
module.exports = self;
|
module.exports = self;
|
||||||
|
|
Loading…
Reference in New Issue