chiark / gitweb /
Enable automatic posting to Mastodon
authorColin Watson <cjwatson@debian.org>
Tue, 1 Oct 2024 12:58:14 +0000 (13:58 +0100)
committerColin Watson <cjwatson@debian.org>
Tue, 1 Oct 2024 12:58:14 +0000 (13:58 +0100)
.gitignore
fediverse/fediverse.py
posted_on_Mastodon.txt [new file with mode: 0644]
publishconf.py

index afbc722ea4f66ac40221457238e88ebec2914e98..7437236ed6e3a847e47d6190d514092a4a91e6ec 100644 (file)
@@ -1,3 +1,4 @@
 *.pyc
 cache
+mastodoncreds.py
 output
index 3aed43e9c43567dfe12d404d013d72c8b54cdd34..7c28f6dceacc730837a68ed17143c9a3553739a5 100644 (file)
@@ -103,7 +103,7 @@ def post_updates(generator, writer):
             articlecleantext = html.fromstring(articlehtmltext)
             summary_to_publish = articlecleantext.text_content().strip() + '\n'
             read_more = 'Read more... ' + article.get_siteurl() + '/' + article.url + '\n\n'
-            if hasattr(article, 'tags'):
+            if False and hasattr(article, 'tags'):  # cjwatson: my tags aren't sensible for fedi
                taglist = article.tags
                new_taglist = []
                for i in taglist:
diff --git a/posted_on_Mastodon.txt b/posted_on_Mastodon.txt
new file mode 100644 (file)
index 0000000..4464923
--- /dev/null
@@ -0,0 +1,84 @@
+# Not actually posted, but I don't want to post lots of old articles.
+activity-2024-02.html
+activity-2024-03.html
+activity-2024-04.html
+activity-2024-05.html
+activity-2024-06.html
+activity-2024-07.html
+activity-2024-08.html
+apt-resolver-bugs.html
+automatic-installability-checking.html
+binfmt-support-2.2.0.html
+brainstorm-review.html
+bug-triage-rants.html
+bug-triage-redux.html
+buster-upgrade.html
+bzr-shelve.html
+catching-up.html
+code_swarm.html
+cve-2015-1336.html
+debconf-cdebconf-coinstallable.html
+debhelper-statistics-redux.html
+debhelper-statistics.html
+deploying-swift.html
+desktop-automount-pain.html
+env-chdir.html
+going-freelance.html
+grub2-boot-problems.html
+grub2-with-luck.html
+gsoc-d-i-hurd-started.html
+gsoc-ubiquity-migration-started.html
+hacking-on-grub2.html
+hello.html
+keysigning-bits.html
+keysigning-psa.html
+kitten-block-equivalent-for-firefox-57.html
+libpipeline-1.1.0-released.html
+libpipeline-1.2.1-released.html
+libpipeline-released.html
+lp-new-ssh-features.html
+lp-python3-progress.html
+lp-python3.html
+man-db-2.6.0.html
+man-db-2.8.7.html
+man-db-K.html
+man-db-encodings.html
+man-db-on-fedora.html
+moving-conffiles.html
+moving-on-but-not-too-far.html
+mysterious-bug-with-twisted-plugins.html
+new-address-book.html
+no-more-hash-sum-mismatch-errors.html
+ntp-synchronisation-problems.html
+odd-test-failure.html
+openssh-5.5p1-for-lucid.html
+openssh-6.0p1.html
+openssh-iutf8.html
+openuk-new-years-honours.html
+parted-2.2-transition.html
+pipeline-library.html
+playing-with-rich.html
+porting-ghc-a-tale-of-two-architectures.html
+python-sigpipe.html
+quality-in-12-04.html
+re-signing-ppas.html
+reply-perl-is-strange.html
+reproducible-man-db-databases.html
+safe-upgrade.html
+single-stage-installer.html
+sponge.html
+ssh-keygen.html
+ssh-quoting.html
+ssh-sha-2-support-in-twisted.html
+storm-py3.html
+task-management.html
+testing-wanted-grub-2.02-beta2.html
+thoughts-on-3.0-quilt-format.html
+tissue-of-lies.html
+totem-bbc-plugin.html
+ubuntu-install-everything.html
+utf-8-manual-pages.html
+vim-lpbug-omnicomplete.html
+windows-applications-making-grub2-unbootable.html
+wubi-bug-693671.html
+
index 5c216e6be8007a395849c0d13cfbf5ee6c50b4cf..79d67e5a7d111ea7f9e12da88005f4c69951f9b9 100644 (file)
@@ -8,7 +8,8 @@ from __future__ import unicode_literals
 import os
 import sys
 sys.path.append(os.curdir)
-from pelicanconf import *
+from pelicanconf import *  # noqa: E402,F403
+from mastodoncreds import *  # noqa: E402,F403
 
 SITEURL = 'https://www.chiark.greenend.org.uk/~cjwatson/blog'
 RELATIVE_URLS = False
@@ -18,6 +19,9 @@ CATEGORY_FEED_ATOM = 'feeds/{slug}.atom.xml'
 
 DELETE_OUTPUT_DIRECTORY = True
 
+PLUGIN_PATHS = [*PLUGIN_PATHS, 'fediverse']  # noqa: F405
+PLUGINS = [*PLUGINS, 'fediverse']  # noqa: F405
+
 # Following items are often useful when publishing
 
 #DISQUS_SITENAME = ""