Jupiter is my “river of news” style feed aggregator, ostensibly for the web. But I just tried the following: you can provide it with a HTML template to use; and nothing prevents you from generating gemtext in that template!
This could be the “alex-gemini.html” template. Unfortunately, the “.html” extension is mandatory for both the file to generate and for the template to use.
% my ($globals, $feeds, $entries) = @_; # Alex’ Reading List % my $day = ""; % for my $entry (@$entries) { % $day = $entry->{day}; > <%= $entry->{excerpt} %> => <%= $entry->{link} %> <%= $entry->{day} %> <%= $entry->{blog_title} %> — <%= $entry->{title} %> % if ($entry->{categories}) { Tags: <%= join ' ', map { "#$_" } (@{$entry->{categories}}); %> % } % }
But no big deal, we can fix this by simply renaming the result. The arguments for a Jupiter call if you’re not taking the defaults are: “html” to generate the HTML, “index.html“ for the HTML file to generate (which is going to contain the resulting gemtext), “gemini-template.html” is the template above, and “alex.opml“ with the OPML listing all the feeds I care about. Once we’re done we can delete the generated feed “feed.xml” since we don’t care. I guess if we wanted to, we could also write a template for a Gemini-aware Atom feed and generate that, but this is just a demonstration.
jupiter html index.html gemini-template.html alex.opml \ && mv index.html ~/alexschroeder.ch/blogs/index.gmi \ && rm feed.xml
I guess I should get rid of the named entities, and the HTML spans in the excerpts, haha.
https://alexschroeder.ch/blogs/index.gmi
Well, I don’t think I’ll be using it in any case, since I’m using moku pona to generate Gemini documents based on the feeds.
Like this one:
RPG Planet feed, from Campaign Wiki
It works.
#Jupiter #Moku Pona #Gemini #Feeds