plugins: add documentation
This commit is contained in:
parent
8791d82cdd
commit
7372dc85a9
25
README.md
25
README.md
|
@ -41,7 +41,7 @@ Why use Bebop instead of something else?
|
||||||
validation so you can just smash your numpad to take your ship to unknown
|
validation so you can just smash your numpad to take your ship to unknown
|
||||||
places (see usage section below for details).
|
places (see usage section below for details).
|
||||||
- History, cache, client certificates, bookmarks (it's just a text file with
|
- History, cache, client certificates, bookmarks (it's just a text file with
|
||||||
bindings), downloads and more!
|
bindings), downloads, plugins and more!
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -75,25 +75,25 @@ sudo pip3 install --upgrade bebop-browser
|
||||||
Note that you can also simply clone this repo and use `python3 -m bebop` to run
|
Note that you can also simply clone this repo and use `python3 -m bebop` to run
|
||||||
from the source instead of installing it.
|
from the source instead of installing it.
|
||||||
|
|
||||||
Now for platform specific info…
|
### Platform specific info
|
||||||
|
|
||||||
### Linux
|
#### Linux
|
||||||
|
|
||||||
Linux is the main platform I can test so you should be good to go, and don't
|
Linux is the main platform I can test so you should be good to go, and don't
|
||||||
hesitate to report issues.
|
hesitate to report issues.
|
||||||
|
|
||||||
### BSD
|
#### BSD
|
||||||
|
|
||||||
I don't know! Let me know your experience with it if you did try it.
|
I don't know! Let me know your experience with it if you did try it.
|
||||||
|
|
||||||
### macOS
|
#### macOS
|
||||||
|
|
||||||
It should work on macOS like on other UNIX-like systems. I have limited access
|
It should work on macOS like on other UNIX-like systems. I have limited access
|
||||||
to devices running macOS so cross your fingers… The main difference I've seen is
|
to devices running macOS so cross your fingers… The main difference I've seen is
|
||||||
that some keys may behave a bit differently and that text attributes such as
|
that some keys may behave a bit differently and that text attributes such as
|
||||||
italics or dim may not work.
|
italics or dim may not work.
|
||||||
|
|
||||||
### Windows
|
#### Windows
|
||||||
|
|
||||||
Bebop relies heavily on ncurses to display its content to the terminal, and it
|
Bebop relies heavily on ncurses to display its content to the terminal, and it
|
||||||
does not work great on Windows. You need to install the curses support
|
does not work great on Windows. You need to install the curses support
|
||||||
|
@ -103,6 +103,19 @@ separately as most Python distributions on Windows do not have it: the package
|
||||||
Seems like there is no color support out of the box nor text attributes. It
|
Seems like there is no color support out of the box nor text attributes. It
|
||||||
works OK in cmd.exe, but it feels completely broken on Windows Terminal.
|
works OK in cmd.exe, but it feels completely broken on Windows Terminal.
|
||||||
|
|
||||||
|
### Plugins
|
||||||
|
|
||||||
|
Since v0.2.0 you can use and develop plugins for Bebop. Installing a plugin
|
||||||
|
requires you to install the corresponding Python package, usually from PyPI,
|
||||||
|
then enable the plugin in your config file. Check the internal help page or the
|
||||||
|
`bebop/plugin.py` module for more information.
|
||||||
|
|
||||||
|
Here is a list of plugins I did, available on PyPI:
|
||||||
|
|
||||||
|
- `bebop-browser-finger`: support for Finger protocol ([readme][plugin-finger])
|
||||||
|
|
||||||
|
[plugin-finger]: plugins/finger/README.md
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Usage
|
Usage
|
||||||
|
|
|
@ -6,6 +6,15 @@ browser to install anything.
|
||||||
|
|
||||||
Support for plugins is very simple right now: a plugin can only register an URL
|
Support for plugins is very simple right now: a plugin can only register an URL
|
||||||
scheme to handle.
|
scheme to handle.
|
||||||
|
|
||||||
|
To create a plugin, follow these steps:
|
||||||
|
|
||||||
|
- Implement a class inheriting one of the plugin classes from this module.
|
||||||
|
- Put it in package named `bebop_<plugin-name>`.
|
||||||
|
- Make this module export a `plugin` variable which is a plugin instance.
|
||||||
|
- Put the plugin name in `enabled_plugins` config to load on next start.
|
||||||
|
|
||||||
|
There is at least one plugin in this repository in the `plugins` directory.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from abc import ABC, abstractmethod
|
from abc import ABC, abstractmethod
|
||||||
|
|
Reference in a new issue