change process name to offpunk
This commit is contained in:
parent
f6820ba244
commit
f669bd9bed
|
@ -62,7 +62,7 @@ Announces about Offpunk will be made on Ploum’s Gemlog => gemini://rawtext.cl
|
||||||
## Dependencies
|
## Dependencies
|
||||||
|
|
||||||
Offpunk has no "strict dependencies", i.e. it will run and work without anything
|
Offpunk has no "strict dependencies", i.e. it will run and work without anything
|
||||||
else beyond the Python standard library. However, it will "opportunistically
|
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
|
import" a few other libraries if they are available to offer an improved
|
||||||
experience or some other features. Python libraries requests, bs4 and readabliity are required for http/html support.
|
experience or some other features. Python libraries requests, bs4 and readabliity are required for http/html support.
|
||||||
|
|
||||||
|
@ -84,6 +84,7 @@ Run command `version` in offpunk to see if you are missing some dependencies.
|
||||||
* [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)
|
* [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.
|
* [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.
|
||||||
* [Python-pil](http://python-pillow.github.io/) is required to only display the first frame of animated gif with chafa.
|
* [Python-pil](http://python-pillow.github.io/) is required to only display the first frame of animated gif with chafa.
|
||||||
|
* [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.
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
|
|
|
@ -45,6 +45,13 @@ import urllib.parse
|
||||||
import uuid
|
import uuid
|
||||||
import webbrowser
|
import webbrowser
|
||||||
|
|
||||||
|
try:
|
||||||
|
import setproctitle
|
||||||
|
setproctitle.setproctitle("offpunk")
|
||||||
|
_HAS_SETPROCTITLE = True
|
||||||
|
except ModuleNotFoundError:
|
||||||
|
_HAS_SETPROCTITLE = False
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import editor
|
import editor
|
||||||
_HAS_EDITOR = True
|
_HAS_EDITOR = True
|
||||||
|
@ -2630,6 +2637,7 @@ Think of it like marks in vi: 'mark a'='ma' and 'go a'=''a'."""
|
||||||
output += " - python-bs4 : " + has(_HAS_SOUP)
|
output += " - python-bs4 : " + has(_HAS_SOUP)
|
||||||
output += " - python-readability : " + has(_HAS_READABILITY)
|
output += " - python-readability : " + has(_HAS_READABILITY)
|
||||||
output += " - python-xdg : " + has(_HAS_XDG)
|
output += " - python-xdg : " + has(_HAS_XDG)
|
||||||
|
output += " - python-setproctitle : " + has(_HAS_SETPROCTITLE)
|
||||||
output += " - chafa : " + has(_HAS_CHAFA)
|
output += " - chafa : " + has(_HAS_CHAFA)
|
||||||
output += " - xsel : " + has(_HAS_XSEL)
|
output += " - xsel : " + has(_HAS_XSEL)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue