Version 9 (modified by cho45, 6 years ago)

--

Chemr

http://f.hatena.ne.jp/images/fotolife/c/cho45/20071024/20071024233109.png

Chemr (is pronounced as きめぇwww) is an application for reading references.

Features

  • Reading CHM (Compiled HTML Help)
  • Reading CHM Bundle (original format)
  • Incremental index search
  • Useful keybinds
  • User StyleSheets?
  • Full-text search capability (currently not multilingual)

Chemr is designed for good indexed CHMs for example reference manuals.

Release/Download

Super Alpha (version 0):

http://lab.lowreal.net/test/chemr/

This package includes RubyCocoa? and the others dependencies, so will work as standalone.

Latest announces:

Customization

Chemr evaluates ~/.chemr/initrc.rb at launching and ~/.chemr/keybinds.rb at key pressed.

keybinds.rb sample:

keybinds["C-p"] = self.method(:prevCandidate)
keybinds["C-n"] = self.method(:nextCandidate)
keybinds["C-u"] = Proc.new {|s|
        @search.stringValue = ""
}

Bundle .chm (Original extension)

Chemr can also read .chm bundle for not compiled but indexed htmls. This format is useful because of not wasting long time for compiling htmls and not requiring Windows.

This has following structure and format:

  • Hoge.chm/
    • Contents/
      • Info.plist (describe below)
      • PkgInfo? (Just "BNDL????" 9bytes)
      • Resources/
        • index.html
        • keyword.yaml
        • toc.yaml
        • ....

Info.plist

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
        <key>CFBundleName</key>
        <string></string>
        <key>CFBundleInfoDictionaryVersion</key>
        <string>6.0</string>
        <key>CFBundlePackageType</key>
        <string>BNDL</string>
        <key>CFBundleSignature</key>
        <string>????</string>

        <key>CHMTitle</key>
        <string>Title of chm file</string>
        <key>CHMHome</key>
        <string>/index.html</string>
        <key>CHMKeyword</key>
        <string>/keyword.yaml</string>
        <key>CHMTOC</key>
        <string>/toc.yaml</string>
</dict>
</plist>

All path (CHMHome, CHMKeyword, CHMTOC) is absolute path from Resource directory.

keyword.yaml and toc.yaml has following structure

keyword.yaml

--- 
- 
  - Brief History
  - 
    - brief_history.html
- 
  - Scope
  - 
    - 1_scope.html
# ruby code
[
["keywordname", ["url from Resource dir."]]
["keywordname", ["url from Resource dir."]]
].to_yaml

toc.yaml

--- 
:children: 
  - 
    :local: brief_history.html
    :children: []
    :name: Brief History
  - 
    :local: 1_scope.html
    :children: [more childs....]
    :name: Scope

Repository

svn co http://svn.coderepos.org/share/lang/ruby/Chemr/

Also requires chmlib, its ruby binding and latest RubyCocoa?:

My Rakefile uses rubycocoa command which is deep in rubycocoa repository. But only for build, this is not required.

Build

$ rake

or...

$ xcodebuild
$ open build/Release/Chemr.app

If you want only to modify ruby sources. This process is not required. You can edit Chemr.app/Contents/Resources/*.rb directly, because these files are loaded dynamically.

Chemr draws upon

Licensed under GPL. See COPYING.