• My evil genius plan is to build a RSS switch box as a serverless function that watches 3 RSS feeds and turns them into a website#
    • One with long-form posts, written in Drummer#
    • One with links from Radio3#
    • One with title-less posts that are also sent to Twitter and Mastodon#
I should really write something before I post to GitHub#
  • Correction 13 November: you shouldn't use this for real secrets, since the root outline is not really hidden or secure. But for global variables that you don't mind having exposed it should be OK. Caveat emptor!#
  • My video demo yesterday revealed the URL of my Netlify build hook for all to see. It's now been changed, but I need not have revealed. Drummer has a root outline where global variables can be defined. #
  • So in the root outIine I can create an `env` object, and define an entry for `netlifyBuildHook` for the URL. (You have to use proper JavaScript object syntax, with brackets, colons and quotes.) #
  • The xhr.open line of my build script can then be
    `xhr.open("POST", root.env.netlifyBuildHook, true);`
    without revealing the actual URL. #
  • Dave Winer asked me to make a quick video of how it looks for a user to post to Gatsby from Drummer. I'm more than happy to oblige!#
  • #
  • It works! At least for me, with a lot of limitations. But this post (and the two previous posts) on my Gatsby-powered blog was written in Drummer. The Dummer posts are integrated with the previous posts that were written in Markdown. The code for my blog with the new OPML plugin is on GitHub.#
  • As I mentioned, I started with demo code by Andrew Shell for Little Outliner outlines. That was written for Gatsby v2, I submitted a couple of fixes so it would work with Gatsby v3 and the recently released v4. #
  • The demo code plugin creates Markdown 'nodes' for the outline entries. I added a couple of frontmatter entries to these nodes for ease of processing. I then adapted my `gatsby-node.js` to handle both Markdown files and the Markdown nodes from the OPML plugin.#
  • There are still a lot of limitations. It ignores blog posts without titles (my wish, for now) and does not support most of the attributes used by the OldSchool CMS. But now it's my template, my layout, and my code, and I can add those features later whenever I want! 😛#
Will this get rendered out? It shouldn't#
  • That build hook URL for Netlify requires a POST request. But Drummer lets you run a script from the Iconbar. Here's mine.#
  • ```#
  • const xhr = new XMLHttpRequest(); #
  • const hookUrl="https://api.netlify.com/build_hooks/XXX" // XXX is given to you by Netlify#
  • xhr.open("POST", hookUrl, true);#
  • xhr.setRequestHeader('Content-Type', 'application/json');#
  • xhr.send(JSON.stringify({}));#
  • ```#
  • I've been thinking about how to use Drummer outlines in a static site generator, like Gatsby or Eleventy. They generally generate content from markdown files, so it must be possible to either export OPML to markdown or for the site generator read content directly from OPML.#
  • I found some demo code by Andrew Shell for a Gatsby plugin to generate content from a Little Outliner outline. On a whim I forked it to my own repository and plugged in the URL for a Drummer outline. And it worked! It rendered the basic text of the outline entries, and I was able to deploy the site to Netlify. #
  • Going one step further, on Netlify I set up a build hook for the site, and in Drummer put a script on my Iconbar to send a POST request to the build hook URL. And voilà! I have a build button my for Gatsby test site. It is, of course, a lot slower than OldSchool. 😃 #
  • There is of course a lot of work left before this will be usable, but for a beginning I'm pretty happy with it. Thank you Andrew for posting your demo code!#
  • That German word is literally "experience of success", but a better translation would be "feeling of achievement". And I just had one!#
  • For over 10 years the banking software (that we use for both home and business) on my Mac has used a card reader to authenticate. The reader is so old it has a serial cable with a USB adapter attached. Every time MacOS updates I've been afraid the device will no longer be recognized. More annoying, when we're on the road it's a bulky device to have to pack along, especially for only one purpose. #
  • I should mention that Germany has its own protocol to communicate online with banks (FinTS, formerly known as HBCI). So I can only use German banking software, and my German might be pretty good, reading a 200 page handbook or protocol specification in my second language is a bit of a barrier. #
  • This has bothered me for years, and in the meantime there other ways to authenticate (e.g. using a smartphone to read a generated TAN graphic, used by our bank) that don't involve extra and outdated devices. In fact German law now requires banks to use Two-Factor Authentication (2FA, I guess the card reader still qualifies). But I was afraid of trying to change the authentication method, I was afraid of losing 13 years of banking data that I had on my local machine! #
  • Yesterday I decided to test changing the authentication. I set up a new account with the "photoTAN" authentication, and to my surprise the banking software applied the authentication to my existing account and it just worked! It took just 5 minutes, and now I'm free from my card reader! #
  • So I guess sometimes when you come to a fork in the road you just have to take it! #
  • I could say it feels like only yesterday, but no, that's not true anymore. It now feels longer ago than that, and that's good.#
  • Thanks to blogging I can look up my notes from that day. "I just feel numb. I miss an eloquent President, who can express what I and the nation must feel, but cannot put into words."#
  • We do business in Hamburg-Harburg, just blocks from Marienstrasse 54, where the plot was hatched. It is still creepy to me that this began so (geographically) close to us.#
  • Almost immediately there were many expressions of grief and support from both German officials and ordinary citizens. This led directly to the German military involvement in Afghanistan that started a few weeks later. #
  • Candles placed at the US Consulate in Hamburg, September 2001#
  • Commemorative plaques placed at the US Consulate, September 10, 2021 (Source)#
  • Peace!#
What will the world bring today?#
  • My adventure today has been running drummerCMS on my local Mac. It pretty much worked out of the box.#
  • I git cloned the repository, ran npm install, then started the server with `node drummercms.js`, and noted it was running on port 1410. I figured the URL to build would be "http://localhost:1410/blog=myTwitterName" and sure enough, it wrote out a data directory and tried to write files to S3 (which failed, of course, because I can't write to the "oldschool.scripting.com" bucket 😂).#
  • Then I had to remember (or look up) how to set up my own S3 bucket for static site hosting and change a couple config variables in drummercms.js#
    • var basePath = "/drummer.papascott.de/" # My bucket name, without a subdirectory for my Twitter name #
    • const appDomain = "drummer.papascott.de" # The domain I've pointed to the bucket #
    • Actually that's probably a stupid name for the domain, since Drummer is the system, not the blog! 😛#
  • And I can view my blog under http://drummer.papascott.de.s3-website-us-east-1.amazonaws.com/ (http://drummer.papascott.de/ doesn't work on my Mac yet, but does on my phone. Must be some weird DNS caching voodoo 🤷‍♂️) (Yep, that's what it was, in my router.) #
  • Note I am not changing any header settings on blog.opml itself. I want Drummer itself to keep working as usual.#
Can I put my own index.html template on GitHub? We'll see!#
Yes, it works. Then it gets pushed to Netlify where it is statically served#
  • I created a new repository DrummerTest on GitHub, and cloned it to my Mac.#
  • There I created a file templates/index.html, and copied in the default Drummer Template, making a trivial change to the HTML title to make sure Drummer was using the new template. #
  • I pushed my changes to GitHub. It would be possible for Drummer to get the template from GitHub using a raw.githubusercontent.com URL, but that always takes a few minutes to update, so it's not so convenient.#
  • So I set up a free Netlify site connected to the DrummerTest repository. That means the Netlify site will update every time changes are pushed to GitHub. It takes about 5 seconds. #
  • Netlify gave me a crazy URL https://brave-kirch-962987.netlify.app/templates/index.html, which I set as the urlTemplate OPML header on my blog.opml.#
  • It worked! For now I've only changed the HTML title, but next I'll be tweaking the styles.#
Wake me up when September ends. Or whatever.#

Last update: Saturday December 31, 2022; 5:13 PM GMT+0100.