forked from solderpunk/AV-98
ansicat working again alone
This commit is contained in:
parent
1a2cff83af
commit
e14009f2a4
25
CHANGELOG
25
CHANGELOG
|
@ -1,28 +1,31 @@
|
||||||
# Offpunk History
|
# Offpunk History
|
||||||
|
|
||||||
## 2.0 - unreleased
|
## 2.0-beta1 - unreleased
|
||||||
TODO: better handling of folders with opnk
|
|
||||||
This is an an experimental release. Bug reports and feedbacks are welcome on the offpunk-devel list.
|
This is an an experimental release. Bug reports and feedbacks are welcome on the offpunk-devel list.
|
||||||
|
WARNING: pyproject.toml has not been update and is currently non-functional. Help wanted!
|
||||||
- IMPORTANT: Licence has been changed to AGPL for ideological reasons
|
- IMPORTANT: Licence has been changed to AGPL for ideological reasons
|
||||||
- IMPORTANT: Contact adress has been changed to offpunk2 on the same domain (because of spam)
|
- IMPORTANT: Contact adress has been changed to offpunk2 on the same domain (because of spam)
|
||||||
- IMPORTANT: code has been splitted into 7 differents files. Installation/packaging should be adapted.
|
- IMPORTANT: code has been splitted into 7 differents files. Installation/packaging should be adapted.
|
||||||
|
Major features:
|
||||||
- New command-line tool: "netcache"
|
- New command-line tool: "netcache"
|
||||||
- New command-line tool: "ansicat"
|
- New command-line tool: "ansicat"
|
||||||
- New command-line tool: "opnk"
|
- New command-line tool: "opnk"
|
||||||
- URL do not default anymore to "gemini://" if not protocol are indicated.
|
- "theme" command allows customization of the colours
|
||||||
- Images of html files are now downloaded with the html (slower sync but better reading experience)
|
|
||||||
- Reading position is saved for the whole session
|
|
||||||
- Rendering is cached, allowing faster browsing
|
|
||||||
- Gopher-only: we don’t support naming a page after the name of the incoming link
|
|
||||||
- "--config-file" allows to start offpunk with custom config (#16)
|
- "--config-file" allows to start offpunk with custom config (#16)
|
||||||
- "accept_bad_ssl_certificates" now more agressive for http and really accepts them all
|
Improvments:
|
||||||
- Gemini-only: support for client generated certificates has been removed
|
- Reading position is saved for the whole session
|
||||||
|
- Rendering is cached for the session, allowing faster browsing of a page already visited
|
||||||
- "redirect" supports domains starting with "*" to also block all subdomins
|
- "redirect" supports domains starting with "*" to also block all subdomins
|
||||||
- "file" is now marked as a dependency (thank Guillaume Loret)
|
|
||||||
- "--images-mode" allow to choose at startup which images should be dowloaded (none,readable,full)
|
- "--images-mode" allow to choose at startup which images should be dowloaded (none,readable,full)
|
||||||
- Support for multi-format rendering (such as RSS feeds with html elements)
|
- Support for multi-format rendering (such as RSS feeds with html elements)
|
||||||
- The cache is now automatically upgraded if needed (see .version in your cache)
|
- The cache is now automatically upgraded if needed (see .version in your cache)
|
||||||
- "theme" command allows customization of the colours
|
Other changes from 1.X:
|
||||||
|
- Images of html files are now downloaded with the html (slower sync but better reading experience)
|
||||||
|
- URL do not default anymore to "gemini://" if not protocol are indicated.
|
||||||
|
- "accept_bad_ssl_certificates" now more agressive for http and really accepts them all
|
||||||
|
- Gopher-only: we don’t support naming a page after the name of the incoming link
|
||||||
|
- Gemini-only: support for client generated certificates has been removed
|
||||||
|
- "file" is now marked as a dependency (thank Guillaume Loret)
|
||||||
|
|
||||||
## 1.10 - July 31st 2023
|
## 1.10 - July 31st 2023
|
||||||
- IMPORTANT : new optional dependency : python-chardet
|
- IMPORTANT : new optional dependency : python-chardet
|
||||||
|
|
|
@ -431,6 +431,7 @@ class AbstractRenderer():
|
||||||
#small intelligence to try to find a good name for a capsule
|
#small intelligence to try to find a good name for a capsule
|
||||||
#we try to find eithe ~username or /users/username
|
#we try to find eithe ~username or /users/username
|
||||||
#else we fallback to hostname
|
#else we fallback to hostname
|
||||||
|
if not self.url: return ""
|
||||||
if is_local(self.url):
|
if is_local(self.url):
|
||||||
splitpath = self.url.split("/")
|
splitpath = self.url.split("/")
|
||||||
filename = splitpath[-1]
|
filename = splitpath[-1]
|
||||||
|
@ -1246,8 +1247,9 @@ def set_renderer(content,url,mime,theme=None):
|
||||||
renderer.set_theme(theme)
|
renderer.set_theme(theme)
|
||||||
return renderer
|
return renderer
|
||||||
|
|
||||||
|
|
||||||
def render(input,path=None,format="auto",mime=None,url=None):
|
def render(input,path=None,format="auto",mime=None,url=None):
|
||||||
|
if not url: url = ""
|
||||||
|
else: url=url[0]
|
||||||
if format == "gemtext":
|
if format == "gemtext":
|
||||||
r = GemtextRenderer(input,url)
|
r = GemtextRenderer(input,url)
|
||||||
elif format == "html":
|
elif format == "html":
|
||||||
|
@ -1266,7 +1268,7 @@ def render(input,path=None,format="auto",mime=None,url=None):
|
||||||
else:
|
else:
|
||||||
r = set_renderer(input,url,mime)
|
r = set_renderer(input,url,mime)
|
||||||
if r:
|
if r:
|
||||||
r.display()
|
r.display(directdisplay=True)
|
||||||
else:
|
else:
|
||||||
print("Could not render %s"%input)
|
print("Could not render %s"%input)
|
||||||
|
|
||||||
|
|
|
@ -120,7 +120,8 @@ def term_width(new_width=None,absolute=False):
|
||||||
return width
|
return width
|
||||||
|
|
||||||
def is_local(url):
|
def is_local(url):
|
||||||
if "://" in url:
|
if not url: return True
|
||||||
|
elif "://" in url:
|
||||||
scheme,path = url.split("://",maxsplit=1)
|
scheme,path = url.split("://",maxsplit=1)
|
||||||
return scheme in ["file","mail","list","mailto"]
|
return scheme in ["file","mail","list","mailto"]
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user