Instead of creating three global variables, a xdg() function now returns
the DATA,CONFIG and CACHE folders.
This allows us to create the cache only when tentatively accessed
(this fixes bug #27)
GemtextRenderer is parsing the text for URLs not starting with "=>" and
adding them later to the list to avoid having to copy/paste with the
mouse. This is an hidden feature.
In this case, the url was not supposed to be one and included [] chars
which prevent urllib to know how to handle it.
The fix involved refactoring the looks_like_url functions out of offpunk
and add it to offutils so it can be used by ansicat to ensure a function
looks_like_url before giving it to urllib.
In gemtext and RSS rendering, if a link point to a page which is
considered as "new" (it has been cached less than 60 seconds after the
page itself), we display it differently (by default in bold white).
This feature allows to quickcly see new links in RSS pages or aggregator
such as antenna.
Before the change, ansicat, netcache and opnk assume that the
interpreter location is always /bin/python. While some distributions
do provide python at this location, even as a python3 interpreter,
some others such as Debian do not provide a plain python interpreter
anymore, at least not by default. There exist packages to provide the
version 2 or the version 3 of the interpreter at that location, but
the three possible configurations (v2, v3 or none) are left at the
discretion of the administrator, so in practice can't really be
predicted in advance.
This change applies the same shebang as offpunk.py and the cache
migration script. Use of /usr/bin/env has also the side effect of
easing use of python3 interpreters installed at weird locations.
Signed-off-by: Étienne Mollier <emollier@debian.org>
Lot of html pages are now recognized as application/javascript. We now
force the HtmlRenderer for application/javascript.
Contact address has also be changed to offpunk2 everywhere