Chemrtron
A document viewer; fuzzy match incremental search.
Features
- Create index on-demand
- Same incremental search user interface to all document
Development
Install Electron
Chemrtron is built with Electron.
npm -g install electron-prebuilt
Clone Repository
git clone https://github.com/cho45/Chemrtron.git
Launch
cd Chemrtron
electron .
Indexer
Search Path
- ~/.chemer/indexers/*.js
- ./indexer/*.js
Indexer definition
id
string
Unique id of this indexer.
name
string
Display name of this indexer;
item
function(item: Object) => Object
Callback of item called when item will be shown.
beforeSearch
function(query: string) => string
A function for query translator.
index
function(ctx: IndexerContext) : Promise<String>
A function which returns Promise instance of index data.
Index data is following format:
[Search string]\t[URI]
[Search string]\t[URI]
...
Created index data is cached under ./cache as a file.