1
0
Fork 0

Refine mastodon feeds

This commit is contained in:
Malte 2023-02-12 23:07:54 +01:00
parent 370ef17727
commit ef12e8f131
3 changed files with 31 additions and 2 deletions

View file

@ -24,11 +24,13 @@ in {
now=$(date "+%Y-%m-%d")
mkdir -p /var/www/rss/mastodon/$now-home-feed-highlights
mkdir -p /var/www/rss/mastodon/$now-read-all-list
mkdir -p /var/www/rss/mastodon/$now-tags
set -o allexport
source $CREDENTIALS_DIRECTORY/mastodon-auth-env
set +o allexport
${pkgs.mastodon_digest}/bin/mastodon_digest -o /var/www/rss/mastodon/$now-home-feed-highlights -n 24 -t lax --theme light
${pkgs.mastodon_digest}/bin/mastodon_digest -o /var/www/rss/mastodon/$now-read-all-list -n 24 -t all --theme light -f list:3811
${pkgs.mastodon_digest}/bin/mastodon_digest -o /var/www/rss/mastodon/$now-home-feed-highlights -n 24 -t normal --theme light
${pkgs.mastodon_digest}/bin/mastodon_digest -o /var/www/rss/mastodon/$now-read-all-list -n 24 -t all --theme light-no-boosts -f list:3811
${pkgs.mastodon_digest}/bin/mastodon_digest -o /var/www/rss/mastodon/$now-tags -n 24 -t all --theme light -f list:4160
${pkgs.logfeed}/bin/mastodon2rss /var/www/rss/mastodon.xml /var/www/rss/mastodon
'';
serviceConfig = {

View file

@ -18,6 +18,9 @@ final: prev: let
cp -r ${src} $out
chmod -R +w $out
patch -d $out -p1 < ${./all-posts.patch}
cd $out/templates/themes
cp -r light light-no-boosts
cp ${./index.html.jinja} light-no-boosts/
'';
in {
mastodon_digest = pkgs.writeShellApplication {

View file

@ -0,0 +1,24 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Mastodon Digest</title>
{% include "style.html.jinja" %}
{% include "scripts.html.jinja" %}
</head>
<body>
<div id="container">
<h1>Mastodon Digest</h1>
{% include "render-info.html.jinja" %}
<section class="posts">
{% if posts %}
{% with posts=posts %}
{% include "posts.html.jinja" %}
{% endwith %}
{% endif %}
</section>
</div>
</body>
</html>