minimal config displaying most toots

This commit is contained in:
tykayn 2020-10-16 16:54:20 +02:00
parent b6281082c6
commit 0b529a5b50
5 changed files with 9 additions and 7 deletions

10
main.js
View File

@ -7,19 +7,19 @@ const express = require('express');
const pug = require('pug'); const pug = require('pug');
const app = express(); const app = express();
var fs = require('fs'); var fs = require('fs');
var listenPort = 8088; var listenPort = 8080;
var jsonParsedLikes, jsonParsedOutbox; var jsonParsedLikes, jsonParsedOutbox;
/** /**
* export configuration. * export configuration.
* You can filter the export in the following vars * You can filter the export in the following vars
*/ */
const min_length = 1; // minmum character length of toots to display const min_length = 0; // minmum character length of toots to display
const max_toots = Infinity; // maximum length const max_toots = Infinity; // maximum length
const filterBiggerTootsBeforeSlicing = false; // filter only long toots const filterBiggerTootsBeforeSlicing = false; // filter only long toots
const filterOnlyHavingMedias = true; // filter only toots having medias const filterOnlyHavingMedias = false; // filter only toots having medias
const displayMedias = false; // filter only toots having medias const displayMedias = false; // filter only toots having medias
const writeStatsJson = false; // filter only toots having medias const writeStatsJson = false; // write json export file about statistics
const showMostRecentTootsOnTop = true; // filter only toots having medias const showMostRecentTootsOnTop = true; // sorting order
const TemplateVars = { const TemplateVars = {
pageTitle : 'Mastodon export converter to HTML', pageTitle : 'Mastodon export converter to HTML',
likes : jsonParsedLikes, likes : jsonParsedLikes,

View File

@ -1,6 +1,6 @@
{ {
"scripts": { "scripts": {
"start": "nodemon main.js" "start": "node main.js"
}, },
"dependencies": { "dependencies": {
"axios": "^0.19.2", "axios": "^0.19.2",

View File

@ -9,6 +9,7 @@ html(lang="en")
i.fa.fa-world i.fa.fa-world
h2 Statistics h2 Statistics
include partials/contacts.pug include partials/contacts.pug
include partials/hashtags.pug include partials/hashtags.pug
include partials/config.pug include partials/config.pug

View File

@ -1,5 +1,6 @@
h2 Configuration of this page h2 Configuration of this page
div.config div.config
h1 Configuration
p Showing #{outbox.length} of Messages #{outboxTotalLength} in your outbox.First #{max_toots} toots, filtered by a minimal length of #{min_length} characters of content. p Showing #{outbox.length} of Messages #{outboxTotalLength} in your outbox.First #{max_toots} toots, filtered by a minimal length of #{min_length} characters of content.
p filter bigger toots: #{filterBiggerTottsBeforeSlicing} p filter bigger toots: #{filterBiggerTottsBeforeSlicing}
p write statistics in output folder #{writeStatsJson} p write statistics in output folder #{writeStatsJson}

View File

@ -2,7 +2,7 @@
img.header(src='/header.jpg') img.header(src='/header.jpg')
div.container
div.column div.column
div.item-list div.item-list
each oredredItem in outbox each oredredItem in outbox