Refine mastodon feeds
This commit is contained in:
parent
370ef17727
commit
ef12e8f131
|
@ -24,11 +24,13 @@ in {
|
||||||
now=$(date "+%Y-%m-%d")
|
now=$(date "+%Y-%m-%d")
|
||||||
mkdir -p /var/www/rss/mastodon/$now-home-feed-highlights
|
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-read-all-list
|
||||||
|
mkdir -p /var/www/rss/mastodon/$now-tags
|
||||||
set -o allexport
|
set -o allexport
|
||||||
source $CREDENTIALS_DIRECTORY/mastodon-auth-env
|
source $CREDENTIALS_DIRECTORY/mastodon-auth-env
|
||||||
set +o allexport
|
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-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 -f list:3811
|
${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
|
${pkgs.logfeed}/bin/mastodon2rss /var/www/rss/mastodon.xml /var/www/rss/mastodon
|
||||||
'';
|
'';
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
|
|
|
@ -18,6 +18,9 @@ final: prev: let
|
||||||
cp -r ${src} $out
|
cp -r ${src} $out
|
||||||
chmod -R +w $out
|
chmod -R +w $out
|
||||||
patch -d $out -p1 < ${./all-posts.patch}
|
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 {
|
in {
|
||||||
mastodon_digest = pkgs.writeShellApplication {
|
mastodon_digest = pkgs.writeShellApplication {
|
||||||
|
|
24
overlays/mastodon-digest/index.html.jinja
Normal file
24
overlays/mastodon-digest/index.html.jinja
Normal 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>
|
Loading…
Reference in a new issue