CHRONIC...-FILTER(1)
β¨ NAME β¨
chronicle-entry-filter β bestie, this is the little script that takes your blog files and turns them into HTML when they need it π
(Also known as CHRONIC...-FILTER(1), a User Contributed Perl Documentation page, iykyk.)
πΈ SYNOPSIS πΈ
Help Options
--help Show a brief help overview.
--version Show the version of this script.
Options
--format The global format of all entries.
--filename The name of the single file to process.
Filters
--pre-filter A filter to run before convertion to HTML.
--post-filter A filter to run after HTML conversion.
okay so the whole menu, right there. slay. π
π¦ ABOUT π¦
So here's the vibe: this script gets a filename and a global formatting type handed to it on the command line, and the formatting type decides how your blog entry file gets processed. no cap. π
- If the format is
"textile", the file will be converted from textile to HTML. - If the format is
"markdown", the file will be converted from markdown to HTML. The related format"multimarkdown"is also recognised. - If the format is
"html", no changes will be made.
Once the conversion has been applied, the code will also be scanned for <code> tags to expand via the Text::VimColour module β if it is installed β which is what lets you pretty-print source code. β¨
To enable the syntax highlighting of code fragments you should format your code samples as follows:
Subject: Some highlighted code.
Date: 25th December 2009
Tags: chronicle, perl, blah
<p>Here is some code which will look pretty ..</p>
<code lang="perl">
#!/usr/bin/perl -w
...
..
</code>
Notice the use of lang="perl", which provides a hint as to the type of syntax highlighting to apply. that's the little hint that makes it pop, bestie. π
Additionally you may make use of the pre-filter and post-filter pseudo-headers, which allow you to transform the entry in further creative fashions. π
For example you might wish the blog to be upper-case only for some reason, and this could be achieved via:
Subject: I DONT LIKE LOWER CASE
Tags: meta, random, silly
Date: 25th December 2009
Pre-Filter: perl -pi -e "s/__USER__/`whoami`/g"
Post-filter: tr [a-z] [A-Z]
<p>This post, written by __USER__ will have no lower-case values.</p>
<p>Notice how my username was inserted too?</p>
You may chain arbitrarily complex filters together via the filters. Each filter should read the entry on STDIN and return the updated content to STDOUT. π₯
(If you wish to apply a global filter simply pass that as an argument tochronicle, or in yourchroniclercfile.)
π AUTHOR π
Steve
--
http://www.steve.org.uk/
π LICENSE π
Copyright (c) 2009-2010 by Steve Kemp. All rights reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The LICENSE file contains the full text of the license. π
and that's the whole page, bestie π«Ά this gorgeous thing came from perl v5.32.0, dated 2021-01-05, and it's filed under CHRONIC...-FILTER(1) in the User Contributed Perl Documentation collection. periodt. πβ¨
π¦ where this page comes from
- debian bookworm: chronicle 4.6-2.1
- ubuntu jammy: chronicle 4.6-2.1
- ubuntu noble: chronicle 4.6-2.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms