Open a link with a command read from a database.
Python program that opens a link with a command read from a database.
- Link pasterfu with a program to make links from that program open into program of your choice.
- Make your own rule database defining what link to open in what way
Made especially to use with RSS feed readers like newsboat. Or any other program where you might want to open a specific in a manner based on the link you are opening.
- Python 3.8 or newer
- Pyperclip will be installed when installing pasterfu with pip
- In Ubuntu
sudo apt install python3
- With Windows download and install Python 3
- You could consider selecting
Add Python to PATHduring install
- You could consider selecting
- Install Python 3 - Requirements
pip install pasterfu
- Create your config file rules. Configuration
- For more info check Wiki Configuration
- pasterfu will work with OS default browser even without configs
You propably need to use a command like:
pip3 install --upgrade pasterfu
python3 -m pip install --upgrade pasterfu
If you installed python without setting up path you need to include path when running pip.
py.exe -m pip install --upgrade pasterfu
pasterfu --link LINK
Replace the "LINK" with the link you wish to open. Check Wiki Usage for more info.
If you installed python without setting up path you need to include path when running pasterfu.
For Python 3.8:
%LOCALAPPDATA%\Programs\Python\Python38\Scripts\pasterfu.exe --link LINK
To see your current configurations
Set default browser of your choice
pasterfu --config --edit 0 --input "firefox"
- Default browser will be used if link to be opened has no match in database rules.
OS default internet browser will be used if no matching key is found.
Read more at Wiki Configuration.
To see your current rules run
Rules can be added/edited with
pasterfu --db --edit 0 --input "https://www.twitch.tv/"
--editis given ID number that doesen't exist yet a new rule will be created.
Adding command valaues into rule:
pasterfu --db --edit 0x0 --input "firefox"
--edit 0x0means in rule #0 command #0
Database file can be found in
~/.config/pasterfu.json. Or in
Open link using the link argument.
pasterfu -l "https://gitlab.com"
Open link piping into stdin.
echo "https://gitlab.com" | pasterfu
Make rule to open gitlab pages.
pasterfu -d 0 "https://gitlab.com"
Make rule to open rule #1 type links in Firefox:
`pasterfu -de 1x0 -i "firefox"`
Set your default browser.
pasterfu -ce 0 "firefox"
By using '%clip' you can copy a link with pyperclip.
pasterfu -de 1x0 -i "%copy"
TODO list found here Wiki TODO
Tests can be run with
run_tests.bat. These require
pytest. Both can be found in PyPI.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size pasterfu-0.8.0-py3-none-any.whl (24.3 kB)||File type Wheel||Python version py3||Upload date||Hashes View|
|Filename, size pasterfu-0.8.0.tar.gz (11.9 kB)||File type Source||Python version None||Upload date||Hashes View|