Discussion:
Anelok: snippets
Werner Almesberger
2017-04-22 05:14:17 UTC
Permalink
This is about the format of the small series of posts about Anelok
I make to the list. They are kind of a newsletter for the project.

I love plain text. It's easy to write, doesn't need fancy browsers
to display, looks more or less the same no matter what you use to
visualize it, and you can do a lot with it.

I also love to illustrate things with pictures or diagrams. Alas,
the best I can do with plain text, besides ASCII-art, is to include
URLs that point to these pictures. Unfortunately, this means that
the reader has to stop reading and click on the link (or copy and
paste the link into a browser) to see the picture.

But maybe we can do a little better. I don't like markup languages,
since they tend to be overly ambitious, while all I want is to make
it a little easier to access these pictures.

So I came up with a script that HTMLizes mails, converts anything
that looks like a link into a HTML hyperlink, adds a small preview
image for each image that's linked from the mail, and adds a few
minor enhancements to make the structure of the mini-thread clearer.

The (unfinished) script is here:
https://gitlab.com/anelok/anelok/blob/master/snippet/snippet.plhttps://gitlab.com/anelok/anelok/blob/master/snippet/snippet.pl

As an example, I converted the last two threads on the list with it.

This is the "power-only fixture" etc. thread:
http://downloads.qi-hardware.com/people/werner/anelok/snippets/20170410.html

This is the "Mk 3 running on battery" thread:
http://downloads.qi-hardware.com/people/werner/anelok/snippets/20170420.html

What do you think ? Hate it ? Love it ? Meh ?

- Werner

_______________________________________________
Qi Hardware Discussion List
Mail to list (members only): ***@lists.en.qi-hardware.com
Subscribe or Unsubscribe: http://lists.en.qi-hardware.com/mailman
Paul Boddie
2017-04-22 10:49:04 UTC
Permalink
Post by Werner Almesberger
So I came up with a script that HTMLizes mails, converts anything
that looks like a link into a HTML hyperlink, adds a small preview
image for each image that's linked from the mail, and adds a few
minor enhancements to make the structure of the mini-thread clearer.
I imagine that this is what some mail clients might do. In principle, it is
possible to reference attached (as opposed to linked) resources within mail
messages (RFC 2111, RFC 2387), and I suppose that embedding linked resources
is merely an extension of the same practice, although care would be needed in
general to prevent misuse (linking to nasty stuff, increasing traffic for
sites).
Post by Werner Almesberger
https://gitlab.com/anelok/anelok/blob/master/snippet/snippet.plhttps://gitl
ab.com/anelok/anelok/blob/master/snippet/snippet.pl
As an example, I converted the last two threads on the list with it.
http://downloads.qi-hardware.com/people/werner/anelok/snippets/20170410.htm
l
http://downloads.qi-hardware.com/people/werner/anelok/snippets/20170420.htm
l
What do you think ? Hate it ? Love it ? Meh ?
It is obviously nice to have embedded images. I guess the text is supposed to
be monospaced, but since Debian upgraded to the ESR version of Firefox from
Iceweasel, I've been waiting for them to fix the font assignments that the
upgrade broke to no avail. It does make me wonder about formatting the tables,
but down that path lies the frustration of "ASCII art" markup languages like
Markdown and its many extensions.

Paul

_______________________________________________
Qi Hardware Discussion List
Mail to list (members only): ***@lists.en.qi-hardware.com
Subscribe or Unsubscribe: http://lists.en.qi-hardware.com/mailman/listi
Werner Almesberger
2017-04-22 15:31:34 UTC
Permalink
Post by Paul Boddie
I imagine that this is what some mail clients might do.
I guess so, but I think it might be nice to have a better reading
experience also without having to use a HTML-capable mail reader.
Or am I the only one who uses mutt ? :)
Post by Paul Boddie
It is obviously nice to have embedded images. I guess the text is supposed to
be monospaced, but since Debian upgraded to the ESR version of Firefox from
Iceweasel, I've been waiting for them to fix the font assignments that the
upgrade broke to no avail. It does make me wonder about formatting the tables,
Ah, interesting. With Chromium (57.0.2987.98), Firefox (52.0.2 and
53.0), and even rekonq (2.4.2, KDE 4.14.22), all on Ubuntu 16.10, I
get a monospaced font for <pre>...</pre>.

I've now added

pre {
 font-family: monospace;
}

to the CSS. Does this help ?

- Werner

_______________________________________________
Qi Hardware Discussion List
Mail to list (members only): ***@lists.en.qi-hardware.com
Subscribe or Unsubscribe: http://lists.e
Paul Boddie
2017-04-22 16:04:43 UTC
Permalink
Post by Werner Almesberger
Post by Paul Boddie
I imagine that this is what some mail clients might do.
I guess so, but I think it might be nice to have a better reading
experience also without having to use a HTML-capable mail reader.
Or am I the only one who uses mutt ? :)
Well, it's a nice way of archiving messages, anyway.
Post by Werner Almesberger
Post by Paul Boddie
It is obviously nice to have embedded images. I guess the text is
supposed to be monospaced, but since Debian upgraded to the ESR version
of Firefox from Iceweasel, I've been waiting for them to fix the font
assignments that the upgrade broke to no avail. It does make me wonder
about formatting the tables,
Ah, interesting. With Chromium (57.0.2987.98), Firefox (52.0.2 and
53.0), and even rekonq (2.4.2, KDE 4.14.22), all on Ubuntu 16.10, I
get a monospaced font for <pre>...</pre>.
I've now added
pre {
font-family: monospace;
}
to the CSS. Does this help ?
No, but the problem is the "upgrade" managing to remove the mapping from
"monospace" to a monospaced font. (Someone thinks "DejaVu Sans" is such a
font, I imagine.) I guess I'll dig into my font configuration and fix it
manually, given that nobody ever got back to me on my bug report.

I think "pre" is obliged to be a monospaced font by default, if you look at
the HTML and CSS specifications.

Paul

_______________________________________________
Qi Hardware Discussion List
Mail to list (members only): ***@lists.en.qi-hardware.com
Subscribe or Unsubscribe: http://lists.en.qi-hardware.c
Werner Almesberger
2017-04-22 22:10:06 UTC
Permalink
Post by Paul Boddie
No, but the problem is the "upgrade" managing to remove the mapping from
"monospace" to a monospaced font.
That indeed sounds solidly insane :)
Post by Paul Boddie
I think "pre" is obliged to be a monospaced font by default,
I thought that the problem you described was that they made <pre>
non-monospaced. If they made their nominally monospaced fonts
something that isn't, it does indeed get a little confusing ;-)

- Werner

_______________________________________________
Qi Hardware Discussion List
Mail to list (members only): ***@lists.en.qi-hardware.com
Subscribe or Unsubscribe: http://lists.en.qi-har

Loading...