Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Clone in Desktop Download ZIP
JavaScript HTML Shell
Branch: master

Merge pull request #2 from hotchpotch/Arduino

Added indexer for arduino.cc
latest commit b92065fbae
@cho45 authored
Failed to load latest commit information.
bower_components update
dev update
indexers Added indexer for arduino.cc
lib init
node_modules/glob init
sketch init
src update
README.md readme
bower.json update
config.js add development mode
indexer.html relocate
main.js fix indexers
package.json init
sketch.js update
viewer.html update

README.md

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

  1. ~/.chemer/indexers/*.js
  2. ./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.

index context APIs

pushIndex(name, url)

fetchDocument(url) : Promise<HTMLDocument>

fetchJSON(url) : Promise<Object>

fetchText(url) : Promise<string>

fetchAsXHR(opts) : Promise<XMLHttpRequest>

crawl(list: Array<string | object>, callback: function (url, doc: HTMLDocument):void)

Something went wrong with that request. Please try again.