The world really, really does not need more markup languages, so of course I wrote another one: repare.re/hcml/README.xhtml Source code and tooling is available in repare.re/hcml/

@Steinar That's quite a nice approach, to be honest.

I think there's lots of scope for people to have their own personal markup languages; while there is a use-case for a more "universal" language like a markdown, one that's focused on the work that you actually want to do is great.

The aim of course is to allow you to focus on the content, with enough expressiveness to allow meaningful output. Separating the metadata from the data is always a struggle, and where you've used > and < to provide literal } and { (because they're your metadata indicators) I would be feeling the loss of the angle brackets more than you, because I tend to talk about things like email@address more often.

Which makes me think: perhaps a declaration line at the beginning of the document could name the exact characters being used for metadata in the document ... ?
You could use

# HCML {}

and I could use

# HCML <>

... ?

@yojimbo Good idea for flexibility, but I guess the docs weren't clear: The < and > are command names, like H and T, a literal < not enclosed in curly brackets will pass straight through (and be quoted as necessary for XHTML). So mail addresses, typical URL notation and all that works straight out of the box. As the < and > are simply allocated as command names, they are really handled exactly the same way as ordinary letters.

> → &gt;
<a@b.com> → &lt;a@b.com&gt;
{ > } → }

1/3

@yojimbo Given this example fragment:

{ | this url <https://a.b> and this character { < } and this character < }

You will get:

2/3

@yojimbo XHTML fragment:

<p>
this url &lt;https://a.b&gt; and this character { and this character &lt;
</p>

So, I think it already works as you need for email and similar stuff?

3/3

@Steinar It looks like I may have confused { < }with text < text...

I will read a bit more, and probably install a copy to play with.

(I still haven't figured out the markdown in this mastodon/glitch either!)

Follow

@Steinar Documents must have a Title block - this isn't documented as mandatory.

echo '{ | paragraph }' | hcml2xhtml fails.
echo '{ T title } { | paragraph }' | hcml2xhtml works.
echo '{ | paragraph } { T title }' | hcml2xhtml works.

@yojimbo My mistake forgetting to document that. It's because title is mandatory for XHTML documents.

@Steinar Overall I'm impressed with how concise your code is :-) Just thought I should say that!

@yojimbo Thanks, that's appreciated!

I'll fix the doc tomorrow, btw. (It's late in my timezone. :) )

Sign in to participate in the conversation
hackers.town

A bunch of technomancers in the fediverse. Keep it fairly clean please. This arcology is for all who wash up upon it's digital shore.