~dmbaturin/soupault

2 2

[PoC] Plugin for easily making links to popular sites

Details
Message ID
<2e2df728-db6c-48a9-522e-618301055371@baturin.org>
DKIM signature
pass
Download raw message
Hi everyone,

Many static site generators support "shortcodes" that people use for
quickly making youtube embeds etc.

I've made a plugin that uses the new HTML.get_tag_name and
HTML.select_any_of functions. It adds a bunch of fake HTML elements for
easily making links to popular sites:

Currently supported elements:
   <wikipedia lang="de" page="Philippe Soupault">surrealist
writer</wikipedia>
   <github project="dmbaturin/soupault">soupault</github>
   <sourcehut project="dmbaturin/soupault">soupault</sourcehut>
   <rfc number="1945">HTTP RFC</rfc>

All elements also support a short form where the content becomes the
link data:
   <wikipedia>Philippe Soupault</wikipedia>
   <github>dmbaturin/soupault</github>
   <sourcehut>dmbaturin/soupault</sourcehut>
   <rfc>RFC1945</rfc> # it can extract the number from this

Any ideas what else may be useful? Youtube perhaps? Anything else?
Details
Message ID
<cb531da3-ff0e-019e-3143-9f8a19f43d19@baturin.org>
In-Reply-To
<2e2df728-db6c-48a9-522e-618301055371@baturin.org> (view parent)
DKIM signature
pass
Download raw message
I've cleaned up the code and added support for
<mastodon>@user@example.com</mastodon> and <twitter>@user</twitter>.

The former is converted to https://example.com/@user, the latter can
work with both "user" and "@user" formats.

This should be enough for a demonstration of the power of fake elements
and most practical cases I guess, but I wonder if there's a universally
supported format for ActivityPub-based sites (GNU Social, Pleroma...).

It may also be nice to make a separate plugin for media embeds (youtube,
vimeo, soundcloud etc.)
Details
Message ID
<57d58211-9694-d182-13b5-7f7eeb48fbb8@aoirthoir.com>
In-Reply-To
<cb531da3-ff0e-019e-3143-9f8a19f43d19@baturin.org> (view parent)
DKIM signature
pass
Download raw message
when I am done with some more plugins i am working on, I will look at 
your code for this...

my thoughts are modify the code so that it just reads a text file for 
settings..1 plugin.. just keep adding the new site links...