ha
Custom markdown renderer and pre-publishing command line utility for Hsoub Academy, currently, it does the following:
Given this markdown model file:
- Remove Tashkeel from all titles.
- Copy resulted HTML output to clipboard.
- Auto-append original title, link, author to the end of the resulted HTML, if they exist in Front Matter.
- Count and show external links.
- Skip Front Matter rendering, but exposes it as
key->value
map for potential future use.
ToDo / Future work:
- Transform Youtube video links to embedded
<iframe>
.
- Checks for common writers pitfalls and tries to fix them (e.g. remove spaces before "،, ؟, !,").
- Count words, and suggest if a doc can be split into two posts.
- Optimize
.png | .jpg
images using tinypng.com API.
- More cli flags
- Windows, OS X binaries
- ... more
The tool is cross-platform and has no-dependency, except for xsel
or xclip
for clipboard support on Linux (one of them is probably already installed on your system).
Usage
To parse a given file, use ha parse markdown_file.md
or ha parse markdown_file.md --stats
or just -s
for printing out some stats.
for short: ha mardkown_file.md
.
For help, just type ha help
or ha -h
:
NAME:
ha - HsoubAcademy command line tool, Ha!
USAGE:
ha [global options] command [command options] [arguments...]
VERSION:
0.0.1
AUTHOR(S):
HsoubAcademy Team <academy@hsoub.com>
COMMANDS:
parse, p Parse a Markdown file
help, h Shows a list of commands or help for one command
GLOBAL OPTIONS:
--help, -h show help
--version, -v print the version
You can show help about a given command like so ha command -h
, e.g. ha parse -h
or ha help parse
:
NAME:
parse - Parse a Markdown file
USAGE:
command parse [command options] [arguments...]
OPTIONS:
-s, --stats Count words and show external links.
License
MIT License, see the LICENSE file.