blob: 98359d08a5b2f1478b3d79a4bd9c68032cdcce91 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
This is a script copied from Pandoc's repository.
Description
----------
From Pandoc's documentation:
> This filter counts the words in the body of a document (omitting metadata
> like titles and abstracts), including words in code. It should be more
> accurate than wc -w run directly on a Markdown document, since the latter
> will count markup characters, like the # in front of an ATX header, or tags
> in HTML documents, as words.
Setup
----
$ cd ~/bin/ # cd to ~/bin/
$ wget https://git.yctct.com/wcm/plain/wcm.lua # download the script
$ chmod +x wcm.lua # make the script executable
Make sure ~/bin/ is on $PATH.
Usage
-----
$ pandoc --lua-filter=$HOME/bin/wcm.lua file.md
Source
------
Pandoc's repository.
Author
-----
jgm
License
-------
MIT License
|