liquidz / clj-vimhelp

Vim help file parser/convertor written by Clojure

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

clj-vimhelp

Vim help file parser/convertor written by Clojure.

GitHub Actions for test workflow GitHub Actions for lint workflow

Getting Started

Download binary from releases.

# Download latest vimhelp to the current working directory
curl -L https://raw.githubusercontent.com/liquidz/clj-vimhelp/main/script/download | bash
./vimhelp --help

Convertor

Convert vim help file to HTML.

Usage

clojure -Sdeps '{:deps {liquidz/clj-vimhelp {:git/url "https://github.com/liquidz/clj-vimhelp" :sha "38dea58d0516f8f6bbc424da14300c831a824242"}}}' \
    -m vimhelp.core <file1> <file2> ... <fileN> [OPTIONS]
Table 1. Options
Short Long Note Default value

-c

--css URL

CSS URL

[]

-t

--title TITLE

Help title

no title

-s

--style STYLE

CSS style rules

-o

--output OUTPUT

Output directory

-w

--wrapper WRAPPER

Body wrapper div class

container

--copyright COPYRIGHT

Copyright text

--blob BLOB

Blob URL

--index INDEX

Index file name

-v

--verbose

-h

--help

Parser

Parse vim help to to Clojure data structure.

Usage

(require '[vimhelp.parser :as p]
         '[clojure.java.io :as io])

(with-open [r (io/reader "/path/to/vim/help/file")]
  (p/parse r))

Parsed data structure

Line category Text category Example

:text

:tag

 *tag*

:ref

 |tag|

:command

 `command`

:constant

 {const}

:divider

====
----

:section-header

 HEADER   *section-tag*

:header

 HEADER~

:url

 https://example.com

:example

>
 hello
<

Native image

  • GraalVM is required.

  • $GRAALVM_HOME must be defined.

  • Run make native-image to make native image.

License

Copyright © 2019-2020 Masashi Iizuka

This program and the accompanying materials are made available under the terms of the Eclipse Public License 2.0 which is available at http://www.eclipse.org/legal/epl-2.0.

This Source Code may also be made available under the following Secondary Licenses when the conditions for such availability set forth in the Eclipse Public License, v. 2.0 are satisfied: GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version, with the GNU Classpath Exception which is available at https://www.gnu.org/software/classpath/license.html.

About

Vim help file parser/convertor written by Clojure

License:Eclipse Public License 2.0


Languages

Language:Clojure 86.0%Language:Makefile 10.0%Language:Shell 3.9%