-
Notifications
You must be signed in to change notification settings - Fork 2
Home
trovu is a spin-off from Serchilo / FindFind.it.
trovu allows you to define shortcuts for URLs / websites and then quickly access them in a command-line way, e.g.
-
g berlin
– search Google for "berlin". -
gd london, liverpool
– find a route on Google Maps from London to Liverpool. -
db b, m
– find the next * Bahn* train connection from Berlin to Munich.
- The shortcuts are kept in text and JSON files in a public Git(hub) repository (this one). Users can also use their own repository, thus:
- more freedom.
- trovu's parsing works completely client-side, so no search queries are sent out, only to the actual target site. Thus:
- faster processing,
- enhanced privacy.
First, lets look at the (example) settings:
- Namespace URL templates: For every namespace, the template defines where to look for its shortcuts. For site namespaces they point to the repository trovu-data. Optionally, for user namespaces they can point anywhere.
- o:
https://raw.githubusercontent.com/trovu/trovu-data/master/shortcuts/o/{%keyword}/{%argumentCount}.txt
- de:
https://raw.githubusercontent.com/trovu/trovu-data/master/shortcuts/de/{%keyword}/{%argumentCount}.txt
- .de:
https://raw.githubusercontent.com/trovu/trovu-data/master/shortcuts/.de/{%keyword}/{%argumentCount}.txt
- johndoe:
https://example.com/trovu/{%keyword}.{%argumentCount}.txt
- o:
Now, lets look at a processing of a query"
-
A query comes in, e.g.
g foobar
. -
The current namespace setting is
o,de,.de,johndoe
. -
The query is parsed – in the client by Javascript – into
- keyword:
g
- argument:
foobar
- keyword:
-
Based on the query and the namespace settings, the client Javascript tries to fetch 4 URLs:
-
From the fetches that succeeded, the results are evaluated in namespace order.
-
Since already the first text file exists, its URL is used for further processing
https://www.google.de/search?hl={$language}&q={%query}&ie=utf-8
-
The
{%query}
placeholder is being replace with the query argumentfoo
. -
A redirect to the URL is made.
This repository contains all the data, e.g.
- shortcuts
- mappings (later)
Fork this repository to add or edit shortcuts (and send then a pull request).
This repository contains the web frontend.
Future plans. (Can be picked up by anyone.)