:dates: 2025-08-04T05:04:12+03:00 :dates: 2025-08-25T17:24:12+03:00 :update_comment: typo
0.1 version of myo_rtviewer is out.
I found some free time between work and dnd sessions to write this site. It was mostly done in one day.
This site is running with python, and actually have very minimal dependencies -- only mistune, which don't have a lot of deps. Web server is powered by built-in python http server and there is no database -- all stuff working from markdown files, parsed my mistune and custom pre-parser.
In future i'll want to ditch from mistune and trully be zero deps here.
Custom preprocessor i am talking about is pretty small. With it i was aiming to make possible to "operate" on site state not from code, but from markdown files.
Right now preprocessor (i called it tru) have 2 features: metavalues and bang calls.
Meta values is basically an ability to pass value from markdown file to code. And meta values looks like:
:: simple meta value
:keyword: keyword metavalue
:keyword: there can be multiple lines with same keyword
:: and no keyword at all
in the end, :: will work as "args" in python -- list of items.
:keyword:, as it can be multiline, will gather in dict, where values is lists,
so each new line will be next list item. So basically we'll have something like this:
args = ["simple meta value", "and no keyword at all"]
kwargs = {
"keyword": [
"keyword metavalue",
"there can be multiple lines with same keyword"
]
}
It is convinient as we can have multiple "dates" and for example set rss to take last updated date.
Bang calls is some sort of macro. It's an ability to call some python function and insert it's result in place. Bang calls looks like this:
!!bang
!!bang("arg1", "arg2")
!!bang(arg1, arg2)
And if bang fucntion in python looks like:
def bang(context, args):
return "BANG!"
We'll have something like:
BANG!
BANG!
BANG!
bang calls can be inline, so this is valid bang call:
text here !!bang text here
after rendering:
text here BANG! text here
bang calls operate only on specific set of functions that passed each time on rendering step. I think, i'll provide some bang calls for users in comments in future, to do some fun stuff with their comments.
With this, and linkage between markdown files I can add/remove tag categories, posts without touching code at all, only by redacting markdown files and take some values from server.
I'll continue to imporove site, my next aim will be adding comments. Excactly as now, I will keep site free of javascript, at least as far as it is possible, and simple. (some misc tools in future could have javascript in them)
Right now site have no github repository. As i'll make some code improvements, i'll post it for public access. Maybe at that point, i'll have selfhosted git server, so i'll post it there too.
Stay tuned for future updates!
P.S. this post was created when i was almost asleep, so I'll rewrite it later probably)