improved dependencies clarity

This commit is contained in:
Lionel Dricot 2022-03-29 13:28:20 +02:00
parent 5f16b89e95
commit bbaa1dbbcb
3 changed files with 17 additions and 10 deletions

View File

@ -3,8 +3,9 @@
## 1.3 - Unreleased
- Removed dependency to python editor. If no $VISUAL or $EDITOR, please use "set editor" in Offpunk.
- New behaviour for "find" (or "/") which is to grep through current page (ripgrep used if detected)
- Default width set to 80 as many gopherhole and gemini capsule have it hardcoded
- Default width set to 80 as many gopherholes and gemini capsules have it hardcoded
- Streaming URL without valid content-length are now closed after 5Mo of download (thanks to Eoin Carney for reporting the issue)
- Improved clarity of dependencies in "version"
- Fixed a crash when the cache is already a dir inside a dir.
- Fixed a crash when manually entering an unknown gopher URL while offline
- Fixed an error with older less version

View File

@ -73,18 +73,21 @@ To avoid using unstable or too recent libraries, the rule of thumb is that a lib
Run command `version` in offpunk to see if you are missing some dependencies.
Highly recommended:
* [xdg-utils](https://www.freedesktop.org/wiki/Software/xdg-utils/) provides xdg-open which is highly recommended to open files without a renderer or a handler. It is also used for mailto: command.
* The [cryptography library](https://pypi.org/project/cryptography/) will provide a better and slightly more secure experience when using the default TOFU certificate validation mode and is highly recommended (apt-get install python3-cryptography).
* [Python magic](https://github.com/ahupp/python-magic/) is useful to determine the MIME type of cached object. If not present, the file extension will be used but some capsules provide wrong extension or no extension at all. Python-magic is highly recommended. (apt-get install python3-magic)
Dependencies to enable web browsing.
* [Python-requests](http://python-requests.org) is needed to handle http/https requests natively (apt-get install python3-requests). Without it, http links will be opened in an external browser
* [BeautifulSoup4](https://www.crummy.com/software/BeautifulSoup) and [Readability](https://github.com/buriy/python-readability) are 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-feedparser](https://github.com/kurtmckee/feedparser) will allow parsing of RSS/Atom feeds and thus subscriptions to them. (apt-get install python3-feedparser)
* The [cryptography library](https://pypi.org/project/cryptography/) will
provide a better and slightly more secure experience when using the default
TOFU certificate validation mode and is highly recommended (apt-get install python3-cryptography).
* [Python magic](https://github.com/ahupp/python-magic/) is useful to determine the MIME type of cached object. If not present, the file extension will be used but some capsules provide wrong extension or no extension at all. Python-magic is highly recommended. (apt-get install python3-magic)
* [Xsel](http://www.vergenet.net/~conrad/software/xsel/) allows to `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)
* [Chafa](https://hpjansson.org/chafa/) allows to display pictures in your console. Install it and browse to an HTML page with picture to see the magic.
* [Timg](https://github.com/hzeller/timg) is a slower alternative to chafa for inline images. But it has better rendering when displaying only the image. Install both to get the best of both world but if you need to choose one, choose Chafa.
* [Python-pil](http://python-pillow.github.io/) is required to only display the first frame of animated gif with chafa if chafa version is lower than 1.10.
Nice to have:
* [Xsel](http://www.vergenet.net/~conrad/software/xsel/) allows to `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)
* [Python-setproctitle](https://github.com/dvarrazzo/py-setproctitle) will change the process name from "python" to "offpunk". Useful to kill it without killing every python service.
* [RipGrep](https://github.com/BurntSushi/ripgrep) is used, if found, to add colours to your in-page searches ("find" or "/").

View File

@ -3118,22 +3118,25 @@ Marks are temporary until shutdown (not saved to disk)."""
return "\t\x1b[1;31mNot Installed\x1b[0m\n"
output = "Offpunk " + _VERSION + "\n"
output += "===========\n"
output += "Highly recommended:\n"
output += " - python-cryptography : " + has(_HAS_CRYPTOGRAPHY)
output += " - python-magic : " + has(_HAS_MAGIC)
output += " - xdg-open : " + has(_HAS_XDGOPEN)
output += "\nWeb browsing:\n"
output += " - python-requests : " + has(_DO_HTTP)
output += " - python-feedparser : " + has(_DO_FEED)
output += " - python-bs4 : " + has(_HAS_SOUP)
output += " - python-readability : " + has(_HAS_READABILITY)
output += " - python-setproctitle : " + has(_HAS_SETPROCTITLE)
output += " - xdg-open : " + has(_HAS_XDGOPEN)
output += " - ripgrep : " + has(shutil.which("rg"))
output += " - xsel : " + has(_HAS_XSEL)
output += " - timg : " + has(_HAS_TIMG)
if _NEW_CHAFA:
output += " - chafa 1.10+ : " + has(_HAS_CHAFA)
else:
output += " - chafa : " + has(_HAS_CHAFA)
output += " - python-pil : " + has(_HAS_PIL)
output += "\nNice to have:\n"
output += " - python-setproctitle : " + has(_HAS_SETPROCTITLE)
output += " - ripgrep : " + has(shutil.which("rg"))
output += " - xsel : " + has(_HAS_XSEL)
output += "\nFeatures :\n"
if _NEW_CHAFA: