=========
smartopen is a command line program that will transform text according
to handlers to URLs and open them
Usage
-----
``smartopen --help`` displays the program usage:
"""
Usage: smartopen [options]
Options:
-h, --help show this help message and exit
-c CONFIG, --config=CONFIG
config file to read
-u, --url print the first url handled
-a, --all print all handlers that match the query
-H HANDLERS, --handler=HANDLERS
name of the handler to use, in order
--print-handlers print all handlers in order they would be tried
"""
smartopen reads text from standard input or command line arguments.
The handlers are then iterated through in a configurable order and, if
the handler can transform the text into a URL, the URL is then
processed. Unless otherwise specified by command line options
(e.g. --url, --all), the first matching URL is then opened in firefox.
Handlers
--------
smartopen has a pluggable system of configurable handlers. The
setuptools entry point ``[smartopen.locations]`` is an extension point
for the handlers. Several handlers come with smartopen, or you can
write your own.
URL: a resolvable URL
Google: a google search
Wikipedia: a Wikipedia article
GoogleMaps: an address in google maps
etc.
Configuration
-------------
smartopen uses a configuration file that defines the order of the
handlers and their behavior.
A simple example is shown here:
http://k0s.org/hg/smartopen/file/tip/smartopen.ini
Interfacing With Your Environment
---------------------------------
While smartopen is useful of its own right, its utility may be
enhanced by using as part of an environment. For instance, I run the
fluxbox window manager which allows the use of hotkeys. By binding
smartopen to ``Ctrl+Alt+s`` and using ``xclip``, I can open a URL that is
mappable to a smartopen handler with a keyboard shortcut. The
relevant line from my ``~/.fluxbox/keys`` file reads:
Control Mod1 s :ExecCommand /home/jhammel/python/smartopen.py "$(xclip -o)" # smartopen
----
Posterity is gained...
----------------------
I mostly wrote smartopen to help me. That it has.
However...a few things....
- better way of setting up handlers?
- really, i want to push down to choose what i think the handler is,
but only should we I release the hand that Jesus becomes Magic
(sorry, I hate the movie too)
....and more?
Was reading about catfish....e.g.
http://www.addictivetips.com/ubuntu-linux-tips/catfish-file-searching-tool-for-ubuntu-linux/
...
"""
file search tool that support several different engines
A file search tool using different backends which is configurable via
the command line.
This program acts as a frontend for different file search engines.
The interface is intentionally lightweight and simple. But it takes
configuration options from the command line.
Currently find, locate, tracker, strigi, pinot, and beagle are
supported as backends
""".
Should smartopen....be a pluggable thing that takes text and finds
both *the handler* and *what to do with it*???
I mean, short of it being a neural network anyway....
Metadata
Release files for smartopen 0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| smartopen-0.2.tar.gz | 9.2 kB | Without provenance | Details for smartopen-0.2.tar.gz |
Release files / smartopen-0.2.tar.gz
| Download URL | smartopen-0.2.tar.gz |
|---|---|
| Size | 9.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f819c29f2bdcc8fa964dcb30fb035f05fab3223f11b8099cebd21fcca26a92cf
|
|
BLAKE2b-256 checksum How to use checksums |
f111fd340454f31d55e111c11d8f1c758bac9c9608cac39decd3bf6cde3c7cd9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for smartopen 0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.