Package: offpunk
OFFPUNKA command-line and offline-first smolnet browser/feed reader for Gemini, Gopher, Spartan and Web byPloum.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 project page (repository/mailing lists) :https://sr.ht/~lioploum/offpunk/Offpunk is a fork of the originalAV-98by Solderpunk and was originally called AV-98-offline as an experimental branch.How to useOffpunk 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 use thegocommand to visit a URL, e.g.go gemini.circumlunar.space. (gemini:// is assumed if no protocol is specified. Supported protocols are gemini, gopher, finger, http, https, mailto, spartan and file. Default protocol is configurable).Links in pages are assigned numerical indices.  Just type an index to follow that link. If page is too long to fit on your screen, the content is displayed in the less pager. Typeqto quit and go back to Offpunk prompt. Typevieworvto display it again. (view fullorv fullallows to see the full html page instead of the article view.v feedtry to display the linked RSS feed andv feedsdisplays a list of available feeds. This only applies to html pages.v sourceallows you to see the source code of a page andv normalto go back to normal view)Useaddto add a page to your bookmarks andbookmarksorbmto show your bookmarks (you can create multiple bookmarks lists, edit and remove them. See thelistmanual withhelp list).Useofflineto only browse cached content andonlineto go back online. While offline, thereloadcommand will force a re-fetch during the next synchronisation.Use thehelpcommand to learn about additional commands. Some abreviations are available. Seeabbrevs.When launched with the "--sync" option, offpunk will run non-interactively and fetch content from your bookmarks, lists and ressources tentatively accessed while offline. New content found in your subscriptions (seehelp subscribe) will be automatically added to your tour (usetour lsto see your current tour,tourwithout argument to access the next item andtour Xwhere X is a link number to add the content of a link to your tour).With "--sync", one could specify a "--cache validity" in seconds. This option will not refresh content if a cache exists and is less than the specified amount of seconds old.For example, runningoffpunk --sync --cache-validity 43200will refresh your bookmarks if those are at least 12h old. If cache-validity is not set or set to 0, any cache is considered good and only content never cached before will be fetched.--assume-yeswill automatically accept SSL certificates with errors instead of refusing them.Sync can be applied to only a subset of list.offpunk --sync bookmarks tour to_fetch --cache-validity 3600Offpunk can also be configured as a browser by other tool. If you want to use offpunk directly with a given URL, simply type:offpunk URLTo have offpunk fetch the URL at next sync and close immediately, run:offpunk --fetch-later URLMoreImportant news and releases will be announced on the offpunk-devel mailing list
=>https://lists.sr.ht/~lioploum/offpunk-develQuestions can be asked on the users mailing list:
=>https://lists.sr.ht/~lioploum/offpunk-usersDependenciesOffpunk 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.List of existing Offpunk packages (Repology)PIP:requirements file to install dependencies with pipUbuntu/Debian:command to install dependencies  on Ubuntu/Debian without pipPlease contribute packages for other systems, there’s amailing-list dedicated to packaging.Run commandversionin offpunk to see if you are missing some dependencies.Mandatory or highly recommended (packagers should probably make those mandatory):less: mandatory but is probably already on your systemfileis used to get the MIME type of cached objects. Should already be on your system.xdg-utilsprovides xdg-open which is highly recommended to open files without a renderer or a handler. It is also used for mailto: command.Thecryptography librarywill provide a better and slightly more secure experience when using the default TOFU certificate validation mode and is recommended (apt-get install python3-cryptography).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)Python-requestsis needed to handle http/https requests natively (apt-get install python3-requests). Without it, http links will be opened in an external browserBeautifulSoup4andReadabilityare both needed to render HTML. Without them, HTML will not be rendered or be sent to an external parser like Lynx. (apt-get install python3-bs4 python3-readability or pip3 install readability-lxml)Python-feedparserwill allow parsing of RSS/Atom feeds and thus subscriptions to them. (apt-get install python3-feedparser)Chafaallows to display pictures in your console. Install it and browse to an HTML page with picture to see the magic.Gopher dependencies:Python-chardetis used to detect the character encoding on Gopher (and may be used more in the future)Older dependencies which are only needed on older systems (where chafa < 1.10)Timgis a slower alternative to chafa for inline images. Might be deprecated in the future.Python-pilis required to only display the first frame of animated gif with chafa if chafa version is lower than 1.10. Might be deprecated in the future.Nice to have (packagers should may make those optional):Xselallows togoto the URL copied in the clipboard without having to paste it (both X and traditional clipboards are supported). Also needed to use thecopycommand. (apt-get install xsel)Python-setproctitlewill change the process name from "python" to "offpunk". Useful to kill it without killing every python service.FeaturesBrowse https/gemini/gopher without leaving your keyboard and without distractionsCustomize your experience with thethemecommand.Built-in documentation: typehelpto get the list of command or a specific help about a command.Offline mode to browse cached content without a connection. Requested elements are automatically fetched during the next synchronization and are added to your tour.HTML pages are prettified to focus on content. Read without being disturbed or see the full page withview full.RSS/Atom feeds are automatically discovered bysubscribeand rendered as gemlogs. They can be explored withview feedandview feeds.Support "subscriptions" to a page. New content seen in subscribed pages are automatically added to your next tour.Complex bookmarks management through multiple lists, built-in edition, subscribing/freezing lists and archiving content.Advanced navigation tools liketourandmark(as per VF-1). Unlike AV-98, tour is saved on disk accross sessions.Ability to specify external handler programs for different MIME types (usehandler)Enhanced privacy withredirectwhich allows to block a http domain or to redirect all request to a privacy friendly frontent (such as nitter for twitter).Non-interactive cache-building with configurable depth through the --sync command. The cache can easily be used by other software.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 toxdg-open.RC filesYou 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 theset,handlerorthemescommands persistent.  You can also put agocommand in
your RC file to visit a "homepage" automatically on startup, or to pre-prepare
atourof your favourite Gemini sites orofflineto go offline by default.The RC file should be calledoffpunkrcand 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.Cache designThe 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 thenetcachetool. Seenetcache -hfor 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.