releasing 0.3
This commit is contained in:
parent
dc7e9156c8
commit
4b39b7eac1
|
@ -1,6 +1,6 @@
|
|||
# Offpunk History
|
||||
|
||||
## 0.3 - Unreleased
|
||||
## 0.3 - Feb 11th 2022
|
||||
New Features:
|
||||
- Gopher supported natively (early version, might have many bugs)
|
||||
- support for RSS and Atom feed (you can subscribe to them)
|
||||
|
@ -15,6 +15,7 @@ Other Small Improvements:
|
|||
- Caching more problems to avoid refetch
|
||||
- Offpunk has now an User-Agent when http browsing to avoid being blocked as a bot
|
||||
- Changed XDG logic to improve compatibility (thanks Klaus Alexander)
|
||||
=> gemini://rawtext.club/~ploum/2022-02-11-offpunk03.gmi
|
||||
|
||||
## 0.2 - Jan 31st 2022
|
||||
- config directories have been moved to follow the XDG specifications
|
||||
|
|
17
offpunk.py
17
offpunk.py
|
@ -12,7 +12,7 @@
|
|||
# - Björn Wärmedal <bjorn.warmedal@gmail.com>
|
||||
# - <jake@rmgr.dev>
|
||||
|
||||
_VERSION = "0.2"
|
||||
_VERSION = "0.3"
|
||||
|
||||
import argparse
|
||||
import cmd
|
||||
|
@ -605,13 +605,16 @@ class HtmlRenderer():
|
|||
g = GeminiItem(abs_url)
|
||||
if g.is_cache_valid():
|
||||
img = g.get_cache_path()
|
||||
img_obj = Image.open(img)
|
||||
if hasattr(img_obj,"n_frames") and img_obj.n_frames > 1:
|
||||
# we remove all frames but the first one
|
||||
img_obj.save(img,save_all=False)
|
||||
return_code = subprocess.run("chafa --bg white -s 40 %s -w 1"%img, \
|
||||
try:
|
||||
img_obj = Image.open(img)
|
||||
if hasattr(img_obj,"n_frames") and img_obj.n_frames > 1:
|
||||
# we remove all frames but the first one
|
||||
img_obj.save(img,save_all=False)
|
||||
return_code = subprocess.run("chafa --bg white -s 40 %s -w 1"%img, \
|
||||
shell=True, capture_output=True)
|
||||
ansi_img = return_code.stdout.decode()
|
||||
ansi_img = return_code.stdout.decode()
|
||||
except:
|
||||
ansi_img = "***image failed***\n"
|
||||
alt = element.get("alt")
|
||||
if alt:
|
||||
alt = sanitize_string(alt)
|
||||
|
|
Loading…
Reference in New Issue