Compare commits

...

5 commits

Author SHA1 Message Date
dece f4bc3f7568 help: bad fix for missing config keys
The unknown config value will be displayed without warning or anything
to the user in the help page, which can be confusing e.g. when mixing
dash and underscore in keys. oh well
2022-01-02 17:34:27 +01:00
dece b1c3f6c518 board: update 2022-01-02 17:33:39 +01:00
dece 04e7a02407 readme: clarify plugin installation with pipx 2022-01-02 17:06:49 +01:00
dece 325c285675 browser: add quit info in the C-c message 2021-12-14 16:48:09 +01:00
dece 41aff7acba browser: add i keybind to show page info 2021-12-14 16:48:09 +01:00
4 changed files with 19 additions and 5 deletions

View file

@ -34,6 +34,9 @@ table of contents
better default editor than vim better default editor than vim
search engine search engine
auto-open some media types auto-open some media types
don't store explicit port 1965 in URL prefixes (e.g. for identities)
fix shifted line detection when text goes belong the horizontal limit
auto-rewrite missing "/" in empty URL paths

View file

@ -54,9 +54,8 @@ have it installed, check out this Gemini link `gemini://dece.space/dev/faq/using
[py-faq-http]: https://portal.mozz.us/gemini/dece.space/dev/faq/using-python-programs.gmi [py-faq-http]: https://portal.mozz.us/gemini/dece.space/dev/faq/using-python-programs.gmi
The easier installation method is using Pip, either user or system-wide The recommended installation method is using Pipx, but using Pip is fine, either
installation. I recommend user installation, but a system-wide installation user or system-wide installation.
should not cause issues as there are no dependencies.
```bash ```bash
# User installation: # User installation:
@ -124,6 +123,16 @@ Here is a list of plugins I did, available on PyPI:
[plugin-finger]: plugins/finger/README.md [plugin-finger]: plugins/finger/README.md
[plugin-gopher]: plugins/gopher/README.md [plugin-gopher]: plugins/gopher/README.md
Plugins have to be installed in the same Python environment as Bebop. If you
installed Bebop using Pipx, this is done using the `inject` command.
```bash
# Installating the Gopher plugin in the user environment:
pip3 install --user bebop-browser-gopher
# Installating the Gopher plugin for a Pipx installation:
pipx inject bebop-browser bebop-browser-gopher
```
Usage Usage

View file

@ -204,7 +204,7 @@ class Browser:
try: try:
self.handle_inputs() self.handle_inputs()
except KeyboardInterrupt: except KeyboardInterrupt:
self.set_status("Cancelled.") self.set_status("Operation cancelled (to quit, type :q).")
if self.config["persistent_history"]: if self.config["persistent_history"]:
self.history.save() self.history.save()
@ -267,6 +267,8 @@ class Browser:
self.move_to_search_result(Browser.SEARCH_NEXT) self.move_to_search_result(Browser.SEARCH_NEXT)
elif char == ord("N"): elif char == ord("N"):
self.move_to_search_result(Browser.SEARCH_PREVIOUS) self.move_to_search_result(Browser.SEARCH_PREVIOUS)
elif char == ord("i"):
self.show_page_info()
elif curses.ascii.isdigit(char): elif curses.ascii.isdigit(char):
self.handle_digit_input(char) self.handle_digit_input(char)
elif char == curses.KEY_MOUSE: elif char == curses.KEY_MOUSE:

View file

@ -104,7 +104,7 @@ def get_help(config, plugins):
config_list = "\n".join( config_list = "\n".join(
( (
f"* {key} = {config[key]} (default {repr(DEFAULT_CONFIG[key])})" f"* {key} = {config[key]} (default {repr(DEFAULT_CONFIG[key])})"
if config[key] != DEFAULT_CONFIG[key] if key in DEFAULT_CONFIG and config[key] != DEFAULT_CONFIG[key]
else f"* {key} = {config[key]}" else f"* {key} = {config[key]}"
) )
for key in sorted(config) for key in sorted(config)