Hi,
find below a patch which let user set a custom chache folder.
Environment variable OFFPUNK_CACHE_PATH is used.
This way, it can be set globally in a profile, or occasionnaly before running offpunk.
It also avoid the pain to parse options and dealing with flags in scripts.
Thank you for your attention.
Regards.
prx
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.