pax_global_header00006660000000000000000000000064147754352730014533gustar00rootroot0000000000000052 comment=efedc1cc850c17450022cba4762e7d0aa361157b offpunk-v2.7.1/000077500000000000000000000000001477543527300134005ustar00rootroot00000000000000offpunk-v2.7.1/.build.yml000066400000000000000000000022211477543527300152750ustar00rootroot00000000000000image: alpine/latest oauth: pages.sr.ht/PAGES:RW packages: - hut - uv secrets: # see https://builds.sr.ht/secrets - c4b4edb9-6d07-45fe-ac31-5d3ac6a27a8a #~/.pypi-credentials mode 700 environment: site1: offpunk.net site2: xkcdpunk.net tasks: # The following, contributed by Anna Cybertailor, will automatically # upload the package to pypi if it is a release - publish-pypi: | if [[ ${GIT_REF} != refs/tags/* ]]; then echo "Current commit is not a tag; not building anything" exit 0 fi rm -rf dist uv build ~/.pypi-credentials uv publish dist/* - package-gemini: | cp -r offpunk/tutorial public_gemini cd public_gemini ln -s ../offpunk/screenshots . tar -cvzh . > ../capsule.tar.gz - deploy-gemini: | hut pages publish capsule.tar.gz -p GEMINI -d $site1 hut pages publish capsule.tar.gz -p GEMINI -d $site2 - package-html: | mkdir public_html cd offpunk/tutorial python make_website.py cd ../../public_html ln -s ../offpunk/screenshots . tar -cvzh . > ../site.tar.gz - deploy-html: | hut pages publish site.tar.gz -d $site1 hut pages publish site.tar.gz -d $site2 offpunk-v2.7.1/.gitignore000066400000000000000000000024511477543527300153720ustar00rootroot00000000000000# ---> Python # Byte-compiled / optimized / DLL files __pycache__/ *.py[cod] *$py.class # C extensions *.so # Distribution / packaging .Python build/ develop-eggs/ dist/ downloads/ eggs/ .eggs/ lib/ lib64/ parts/ sdist/ var/ wheels/ *.egg-info/ .installed.cfg *.egg MANIFEST # PyInstaller # Usually these files are written by a python script from a template # before PyInstaller builds the exe, so as to inject date/other infos into it. *.manifest *.spec # Installer logs pip-log.txt pip-delete-this-directory.txt # Unit test / coverage reports htmlcov/ .tox/ .nox/ .coverage .coverage.* .cache nosetests.xml coverage.xml *.cover .hypothesis/ .pytest_cache/ # Translations *.mo *.pot # Django stuff: *.log local_settings.py db.sqlite3 # Flask stuff: instance/ .webassets-cache # Scrapy stuff: .scrapy # Sphinx documentation docs/_build/ # PyBuilder target/ # Jupyter Notebook .ipynb_checkpoints # IPython profile_default/ ipython_config.py # pyenv .python-version # celery beat schedule file celerybeat-schedule # SageMath parsed files *.sage.py # Environments .env .venv env/ venv/ ENV/ env.bak/ venv.bak/ # Spyder project settings .spyderproject .spyproject # Rope project settings .ropeproject # mkdocs documentation /site # mypy .mypy_cache/ .dmypy.json dmypy.json # Pyre type checker .pyre/ offpunk-v2.7.1/CHANGELOG000066400000000000000000000605161477543527300146220ustar00rootroot00000000000000# Offpunk History ## 2.7.1 - April 9th 2025 - The "2.7 was not (completely) a joke" release See 2.7 changelog. This was "real" release ;-) - Reverted the tutorial back to Offpunk. The name was a joke but the rest of the release is real. - added "application/xhtml+xml" mimetype to be rendered as html - according to html spec,
 content should be parsed as HTML.

## 2.7 - April 1st 2025 - XKCDpunk release
APRIL FOOL: Offpunk is now renamed to XKCDpunk. See
https://ploum.net/2025-04-01-xkcdpunk.html
- Introducing command "xkcd" to display a given xkcd comic.
- (April fool) Switching website from offpunk.net to xkcdpunk.net
- blocklist: marked x.com, twitter.com and youtube.com as blocked to save bandwith until we have a viable option to use them with offpunk. We plan to block everything but xkcd.com.
CHANGES:
- "shell" (or "!") now works even without content (so you can run it on startup)
- offpunk: improved "version" to help debugging on the mailing-list
FIXES:
- "reload" on a too large content will actually fetch it
- Consider mimetype "message/news" as "gemtext" because file is sometimes confused. (reported by JMCS)
- ignore annoying warnings for LibreSSL users (by Anna cyberTailor)
- ansicat: workaround what seems to be a BS4 bug where elements after a 
were ignored - offpunk: be more explicit about how to unblock a blocked URL - ansicat: if a file identified as html starts with "260 char) instead of raising an useless error ## 2.6 - February 24th 2025 FOR PACKAGERS: dependency to python-pil (or pillow) has been dropped - NEW BEHAVIOUR: not rendered ressources (like PDF) are not opened automatically. The user is prompted to type "open" to see the ressource. This allows the ressource to be part of history, be bookmarked, etc… Offpunk: - new "--command" command-line argument to immediately launch one or multiple commands - "add" now accepts link number as a second argument (suggested by JMCS) - "url" now accepts link number as an argument (suggested by JMCS) - "url" can be piped to any shell command: "url|" or "url 121|" (suggestion of Stephen) Ansicat and rendering: - new "preformat_wrap" option available to wrap even
- PlainText rendering has been vastly improved with wrap, margin and link detection
- fix wrong wraping in gophermap (patch by JMCS)
Opnk and opening files:
note: "opnk" will be renamed "openk" in 3.0
- "opnk" now supports following link like in "opnk $URL XX" where XX is a link number.
- "opnk" is now reading the offpunrc file to use predefined handlers
- "handler" with now automatically add "%s" at the end of the command if not present
- "handler" now supports file exension or full mimetype
Deprecation and removal:
- removed support for chafa < 1.10, as announced in 2.4. python-pil is not used anymore. 
- removed the "cat" command as it has no purpose (you can use "!cat" instead) and there was a potential crash (reported by Stephen)
- new "feed" command to replace the "view feed" (which is deprecated)

## 2.5 - January 30th 2025
- "abbrevs" has been replaced by "alias"
- "alias" now allows custom command to be aliased
- PEP8-ification by Vincent Jousse
- changing "datetime.UTC" to "datetime.timezone.utc" for retrocompatibility with python < 3.11
- checking if "grep" supports "--color=auto" to supports OpenBSD (reported by Dylan D’Silva)

## 2.4 - November 21st 2024
NEW WEBSITE: Official homepage is now https://offpunk.net (or gemini://offpunk.net). Sources are in the /tutorial/ folder and contributions are welcome.
NEW FEATURE: This release includes work by Bert Livens to add gemini client-side certificates (see "help certs"). This means you can browse gemini capsule while being identified (such as astrobotany)
- Deprecation warning if using Chafa < 1.10
- introducing the "tutorial" command (which is only a link to offpunk.net for now)
- netcache: use client-certificate when going to a url like gemini://username@site.net (by Bert Livens)
- offpunk/netcache: added the "cert" command to list and create client certificates (Bert Livens)
- "open" now accept integer as parameters to open links (suggested by Matthieu Rakotojaona)
- fix cache not being properly accessed when server redirect to same host with standard port (gemini.ucant.org)
- fix crash when expired certificate due to not_valid_after deprecation
- fix crash in netcache when a port cannot be parsed in the URL
- fix parameter "interactive=False" not being sent to gemini redirections
- fix problem with non-integer version of less (Patch by Peter Cock)
- Gopher: hide lines starting with TAB (drkhsh.at), reported by Dylan D’Silva

## 2.3 - June 29th 2024
- Wayland clipboard support through wl-clipboard (new suggested dependency)
- Xclip clipboard support (in case xsel is missing)
- offpunk/netcache: fix IPv6 as an URL (bug #40)
- ansicat: display empty files (instead of opening them with xdg-open)
- fix escape sequence warning in python 3.12 (by Étienne Mollier) (Debian #1064209)
- ansicat : fix crash when feedparser is crashing on bad RSS
- netcache: fix spartan protocol error
- opnk: fix a crash when caching returns None
- ansicat: remove the treshold argument when launching chafa (strange artifacts with new version)
- netcache: moved the certificate cache to the filesystem instead of a database (by Bert Livens)

## 2.2 - February 13th 2024
- cache folder is now configurable through $OFFPUNK_CACHE_PATH environment variable (by prx)
- offpunk: adding an URL to a list now update the view mode if url already present
- netcache: solve an infinite gemini loop with code 6X (see also bug #31)
- ansicat: added support for