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