fix unmode_url for empty url
finalizing
this is a suprize little joke, please don’t talk about this until I announce it.
A command-line and offline-first smolnet browser/feed reader for Gemini, Gopher, Spartan and Web by Ploum.
The goal of Offpunk is to be able to synchronise your content once (a day, a week, a month) and then browse/organise it while staying disconnected.
Official page : Offpunk.net Development (repository/mailing lists) : sr.ht
Offpunk is a fork of the original AV-98 by Solderpunk and was originally called AV-98-offline as an experimental branch.
Offpunk is a set of python files. Installation is optional, you can simply git clone the project and run "./offpunk.py" or "python3 offpunk.py" in a terminal. You can also a packaged version:
To get started, launch offpunk then type "tutorial".
You can also consults it online: Offpunk tutorial
At any point, you can use "help" to get the list of commands and "help command" to get a small help about "command".
Important news and releases will be announced on the offpunk-devel mailing list
Questions can be asked on [the users mailing](list https://lists.sr.ht/~lioploum/offpunk-users)
Offpunk has few "strict dependencies", i.e. it should run and work without anything else beyond the Python standard library and the "less" pager. However, it will "opportunistically import" a few other libraries if they are available to offer an improved experience or some other features such as HTTP/HTML or image support.
To avoid using unstable or too recent libraries, the rule of thumb is that a library should be packaged in Debian/Ubuntu. Keep in mind that Offpunk is mainly tested will all libraries installed. If you encounter a crash without one optional dependencies, please report it. Patches and contributions to remove dependencies or support alternatives are highly appreciated.
Run command version
in offpunk to see if you are missing some dependencies.
Mandatory or highly recommended (packagers should probably make those mandatory):
Dependencies to enable web browsing (packagers may put those in an offpunk-web meta-package but it is recommended to have it for a better offpunk experience)
Gopher dependencies:
Nice to have (packagers should may make those optional):
go
to the URL copied in the clipboard without having to paste it (both X and traditional clipboards are supported). Also needed to use the copy
command. (apt-get install xsel). Xclip can be used too.theme
command.help
to get the list of command or a specific help about a command.view full
.subscribe
and rendered as gemlogs. They can be explored with view feed
and view feeds
.tour
and mark
(as per VF-1). Unlike AV-98, tour is saved on disk accross sessions.handler
)redirect
which allows to block a http domain or to redirect all request to a privacy friendly frontent (such as nitter for twitter).netcache
, a standalone CLI tool to retrieve the cached version of a network ressource.ansicat
, a standalone CLI tool to render HTML/Gemtext/image in a terminal.opnk
, a standalone CLI tool to open any kind of ressources (local or network) and display it in your terminal or, if not possible, fallback to xdg-open
.You can use an RC file to automatically run any sequence of valid Offpunk
commands upon start up. This can be used to make settings controlled with the
set
, handler
or themes
commands persistent. You can also put a go
command in
your RC file to visit a "homepage" automatically on startup, or to pre-prepare
a tour
of your favourite Gemini sites or offline
to go offline by default.
The RC file should be called offpunkrc
and goes in $XDG_CONFIG_DIR/offpunk (or .config/offpunk or .offpunk if xdg not available). In that file, simply write one command per line, just like you would type them in offpunk.
The offline content is stored in ~/.cache/offpunk/ as plain .gmi/.html files. The structure of the Gemini-space is tentatively recreated. One key element of the design is to avoid any database. The cache can thus be modified by hand, content can be removed, used or added by software other than offpunk.
The cache can be accessed/built with the netcache
tool. See netcache -h
for more informations.
There’s no feature to automatically trim the cache. But any part of the cache can safely be removed manually as there are no databases or complex synchronisation.
Be sure to install the dev requirements (pytest
and pytest-mock
) with:
pip install -r requirements-dev.txt
And then run the test suite using pytest
.