Removed post.user variable.

This commit is contained in:
DebaucheryLibrarian 2024-09-11 05:16:58 +02:00
parent e1a57a07a3
commit 9140b58c70
4 changed files with 18 additions and 22 deletions

View File

@ -95,7 +95,6 @@ Path patterns dictate where and how a file will be saved. Various variables and
##### Post
* `{post.id}`: The ID 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.index}`: The index of the post according to the sort method
* `{post.score}`: The current karma score of the post

View File

@ -7,27 +7,27 @@ module.exports = {
direct: 'output/{host.name}/{label}/',
},
posts: {
image: '{base.posts}{post.date}{div}{tag.preview}{item.id}{div}{post.title}{ext}',
video: '{base.posts}{post.date}{div}{tag.preview}{item.id}{div}{post.title}{ext}',
text: '{base.posts}{post.date}{div}{tag.preview}{post.id}{div}{post.title}',
image: '{base.posts}{post.date}{div}{tags.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}{tags.preview}{post.id}{div}{post.title}',
album: {
image: '{base.posts}{post.date}{div}{tag.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}',
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}{tags.preview}{album.id}{div}{post.title}/{item.index}{div}{item.id}{ext}',
},
},
direct: {
image: '{base.direct}{item.date}{div}{tag.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}',
text: '{base.direct}{item.date}{div}{tag.preview}{item.id}{divs.item.title}{item.title}',
image: '{base.direct}{item.date}{div}{tags.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}{tags.preview}{item.id}{divs.item.title}{item.title}',
album: {
image: '{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}{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}{tags.preview}{album.id}{divs.album.title}{album.title}/{item.index}{div}{item.id}{ext}',
},
},
extractSingleAlbumItem: true,
profile: {
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,
},
index: {

View File

@ -60,7 +60,6 @@ function interpolate(pattern, item = null, content = null, host = null, post = n
id: post.id,
title: post.title && post.title.slice(0, config.library.titleLength),
url: post.url,
user: post.user,
date: dateFns.format(post.datetime, dateFormat),
index: post.index + config.library.indexOffset,
hash: post.hash,

View File

@ -1,11 +1,9 @@
'use strict';
const util = require('util');
const config = require('config');
const fetch = require('node-fetch');
function self(host, post) {
console.log(post);
function self(post) {
return Promise.resolve({
return {
album: null,
items: [{
id: post.id,
@ -15,9 +13,9 @@ function self(post) {
datetime: post.datetime,
type: 'text/plain',
self: true,
original: post
original: post,
}]
});
};
}
module.exports = self;