Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/liquidz/clj-vimhelp
Vim help file parser/convertor written by Clojure
https://github.com/liquidz/clj-vimhelp
clojure convertor parser vim vim-help
Last synced: about 1 month ago
JSON representation
Vim help file parser/convertor written by Clojure
- Host: GitHub
- URL: https://github.com/liquidz/clj-vimhelp
- Owner: liquidz
- License: epl-2.0
- Created: 2019-03-05T09:12:21.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2022-12-26T11:25:25.000Z (almost 2 years ago)
- Last Synced: 2024-05-01T23:26:35.857Z (7 months ago)
- Topics: clojure, convertor, parser, vim, vim-help
- Language: Clojure
- Homepage:
- Size: 52.7 KB
- Stars: 8
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.adoc
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
= clj-vimhelp
:toc:
:toc-placement: preamble
:toclevels: 2// Need some preamble to get TOC:
{empty}Vim help file parser/convertor written by Clojure.
image:https://github.com/liquidz/clj-vimhelp/workflows/test/badge.svg["GitHub Actions for test workflow", link="https://github.com/liquidz/clj-vimhelp/actions?query=workflow%3Atest"]
image:https://github.com/liquidz/clj-vimhelp/workflows/lint/badge.svg["GitHub Actions for lint workflow", link="https://github.com/liquidz/clj-vimhelp/actions?query=workflow%3Alint"]== Getting Started
Download binary from releases.[source,sh]
----
# 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 ... [OPTIONS]
----
.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
[source,clojure]
----
(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
[cols="a,a,l"]
|===
| 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 https://twitter.com/uochan[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.