Skip to content

upputter/yellow-twtxt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Twtxt 0.1.0

Render a twtxt feed.

How to install an extension

Download ZIP file and copy it into your system/extensions folder. Learn more about extensions.

What it does

Twtwt is a decentralised, minimalist microblogging service for hackers.

You can use this plugin to display twtxt post within Datenstrom Yellow. Only the direct posts of a twtxt feed will be rendered. Replies (lines beginning with (#) will be skipped.

How to use the twtxt shortcut

Use the shortcut [twtxt] to display the twtxt feed.

Arguments

[twtxt LIMIT]

  • limit: the number of posts to display

Settings

You can configure the following settings in the file system/extensions/yellow-system.ini:

  • twtxtFile: path to your twtxt file; default ./twtxt.txt - in the root directory oy your Datenstrom Yellow installation
  • twtxtDateTimeFormat: datetime format string for display; default Y-m-d H:i
  • twtxtItemSeparator: separator for feeds; default <hr /> (HTML horizontal line)
  • twtxtParsers: comma separate list of twtxt parser functions; default multiline,mentions,image,youtube
  • twtxtParserImage: regex for image rendering within a twtxt post; default [[image $2 "$1"]]($2){.lightbox} (will use the image and create a clickable link with a css-class lightbox)

Parsers (twtxt extensions)

The are many different kinds of information a post may consist of. Luckily markdown is the markup of choice within the twtxt world, so Datenstrom Yellow will handle most of it.
There are some twtxt "extensions" this plugin supports.

Parser: image

Markdwon image links (![Image caption](https://example.com/image.png)) will be rendered as given in the settings twtxtParserImage.

Parser: mention

If a post contains a @<nickname https://example.com/twtxt.txt> string, it will be rendered as link to the twtxt URL with nickname as link text.

Parser: multiline

The character \u2028 will render a line break (\n).

Parser: youtube

Links to YouTube will be appended as [youtube] shortcuts.

Styling

The final output consist of a HTML-div for each post, seperated by the given twtxtItemSeparator(e.g. <hr />).
You can make use of the CSS-classes .twtxt-quote and .twtxt-footer to style your twtxt feed.

Experimental πŸ’€

You may also include a remote twtxt file, by setting twtxtFile to a valid URL (e.g. https://exmple.com/twtxt.txt).

About

Render a twtxt feed.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages