openurl
Version, currently 0.1.02 versions
- 0.2.0latestJul 11, 2021
- 0.1.0not indexedJul 11, 2021
github.com/jo1gi/openurl
Opens urls in the specified program
Nothing has been indexed for 0.1.0 yet. The tag is recorded, its shard.yml has not been read, so the manifest and dependency list below are empty because they are unknown rather than because they are absent.
Installation
# Add this to your shard.yml
dependencies:
openurl:
github: jo1gi/openurl
version: ~> 0.1.0Then run:
shards installshard.yml
No shard.yml has been indexed for 0.1.0. You can read it on the repository.
Dependencies
Unknown: the shard.yml for this version has not been read yet.
README
This README is the one indexed from the repository at its latest ref, not from the tag for this version.
openurl
Opens urls based on rules in a yaml file.
Usage
To run, just execute the program with a url as the argument. The program will
expect a config file located at $XDG_CONFIG_HOME/openurl/config.yaml. The
program will then open the url with the command specified in the config.
Configuration
The Configuration file specifies which programs should open which urls. It consists of a list of rules for opening urls.
Here is an example where youtube is opened in vlc, all other websites are opened through firefox, and gemini capsules are opened in amfora.
- protocol: https?
command: firefox
subrules:
- domain: youtube.com
command: vlc
- protocol: gemini
command: amfora
The program checks each rule one by one. When it finds a rule set that matches the url, it will check if any subrules match the url. When the first matching rule is found, the corresponding command will be run with the url appended.
Each rules is comprised of a list of attributes that can be tested. Each attribute corresponds with a part of the url. This part will be checked to see if the given regex matches.
| Attrubute | Description | Example |
|---|---|---|
| protocol | Communication protocol | https://channels.nixos.org/nixos-21.05/latest-nixos-gnome-x86_64-linux.iso |
| domain | Website domain name and subdomain | https://channels.nixos.org/nixos-21.05/latest-nixos-gnome-x86_64-linux.iso |
| last_file | Last part of path | https://channels.nixos.org/nixos-21.05/latest-nixos-gnome-x86_64-linux.iso |
| filetype | File extension if it exists | https://channels.nixos.org/nixos-21.05/latest-nixos-gnome-x86_64-linux.iso |
| path | Anything after the domain and before parameters | https://channels.nixos.org/nixos-21.05/latest-nixos-gnome-x86_64-linux.iso |
| url | Matches everything | https://channels.nixos.org/nixos-21.05/latest-nixos-gnome-x86_64-linux.iso |
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This release
- Version
0.1.0- Tagged
- Jul 11, 2021
- Commit
687b836988d1- Indexed
- not yet
Dependents
No indexed shard depends on this one yet.
Repository
github.com/jo1gi/openurl
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 13, 2026
- Synced
- Aug 13, 2026
- Versions
- 2