Overview

Incremental Search

Chemr has fuzzy matched incremental search. You can query any old how.

On-demand Indexers

Chemr includes indexing system for generating index. You can index any web sites on your demand.

Built on Electron

Chemr is developed with modern web technologies: Vue 3, TypeScript, and Electron. Extending and modifying is very easy.

Screenshots

macOS

Windows

Download

Packaged release

Download pre-built binaries for Windows, macOS, and Linux from GitHub Releases.

Download on GitHub

Build from source

Or create your own build with following:

Clone and Install

git clone https://github.com/cho45/Chemrtron.git
cd Chemrtron
npm install

Run / Build

npm run dev (Development)
npm run build (Build)

Packaged application is located under dist/

Usage

Introduction

  1. Enable indexer at settings dialog.
  2. Start initial indexing by selecting icon.
  3. Ready to query.

Select Index

Press Control + Enter to open select index dialog.

Or Alt + [Number] / Command + [Number] for selecting index directly.

Keyboard shortcuts

Alt + Space (Global) Default shortcut key for activating Chemr window. This is customizable on settings.
⌘L
Control + L
Focus to query text area.
Control + N
Select next item.
Control + P
Select previous item.
Control + U Clear current query.
⌘↵
Control + Enter
Open index selection dialog.
⌘[
Control + [
Back navigation.
⌘]
Control + ]
Forward navigation.
⌘[Number]
Control + [Number]
Select index by index.

Reindex by hand

To reindex by hand for updating to latest index. Right click or double click index icon and open menu by clicking gear icon.

Including Indexers

Or you can write new indexer easily.

Create New Indexer

Indexer definition files are written in JavaScript and loaded from following paths:

  1. $HOME/.chemr/indexers/*.js
  2. src/indexers/*.js (Built-in)

You can put your own indexer to $HOME/.chemr/indexers/.

Indexer definition file

This is a sample indexer definition for PHP:


export default {
  id: 'php',
  name: 'PHP',
  color: '#4F5B93',

  async index(ctx) {
    const url = 'https://www.php.net/manual/en/indexes.functions.php';
    const doc = await ctx.fetchDocument(url);

    const links = doc.querySelectorAll('ul.gen-index a');
    for (const link of links) {
      const text = link.textContent.trim();
      const href = link.getAttribute('href');
      if (href) {
        ctx.pushIndex(text, href);
      }
    }
  },

  urlTemplate: 'https://www.php.net/manual/en/${url}'
};
id : string
Unique identifier for this indexer.
name : string
Display name.
async index(ctx: IndexerContext): Promise<void>
A function for creating index. Use ctx.pushIndex(name, url) to add entries.
urlTemplate : string
Template for generating final URLs. ${url} will be replaced by the URL passed to pushIndex.
css : string
Custom CSS to be injected into the document view.

IndexerContext

IndexerContext is passed as index() argument.

pushIndex(name: string, url: string)
Add specified index entry.
fetchDocument(url: string): Promise<Document>

Fetches a URL and returns a DOM Document object (parsed via linkedom).

fetchJSON(url: string): Promise<any>
Fetches a URL and parses it as JSON.
fetchText(url: string): Promise<string>
Fetches a URL and returns its text content.
crawl(urls: string[], callback: (url, doc): void): Promise<void>
Crawl specified URLs and call callback for each document.

Contributing

Chemr is an open source project. You can read the code and submit patches anytime.

If you want to contribute, see CONTRIBUTING.md.

Supports

Report issues to GitHub Issues.

Privacy Policy

Chemr does not collect any personal information.