pandoc: нераспознанная опция `lua-filter` pandoc --lua-filter test.lua test.md - PullRequest
0 голосов
/ 05 ноября 2018

Я решил эту проблему. Взял совет человека, который предложил "спросить Ubuntu"

https://askubuntu.com/questions/1084723/issues-installing-pandoc-2-3-1-in-ubuntu-18-04-1

whereis pandoc

Он был установлен conda, когда я установил spyder.

conda update pandoc

$ pandoc --lua-filter wordcount.lua resume.md
1112 words in body

Я только начал писать фильтры для обработки моего резюме. к несчастью то, что кажется именно командой, перечисленной в руководстве по pandoc не работает для меня https://pandoc.org/lua-filters.html Я должно быть что-то упустил.

Код

$ pandoc --lua-filter wordcount.lua resume.md

pandoc: unrecognized option `--lua-filter'
Try pandoc --help for more information.

Вот моя версия Пандока:

$ pandoc --version
    pandoc 1.19.2.1
    Compiled with pandoc-types 1.17.0.4, texmath 0.9, skylighting 0.1.1.4
    Default user data directory: /home/harlan/.pandoc
    Copyright (C) 2006-2016 John MacFarlane
    Web:  http://pandoc.org
    This is free software; see the source for copying conditions.
    There is no warranty, not even for merchantability or fitness
    for a particular purpose.

Я воспользовался советом ниже в комментарии, но это не изменило мою версию pandoc:

harlan@harlan-MS-7976:~/Downloads$ sudo apt-get install -f ./pandoc-2.4-1-amd64.deb
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'pandoc' instead of './pandoc-2.4-1-amd64.deb'
The following NEW packages will be installed:
  pandoc
0 upgraded, 1 newly installed, 0 to remove and 301 not upgraded.
Need to get 0 B/17.0 MB of archives.
After this operation, 133 MB of additional disk space will be used.
Get:1 /home/harlan/Downloads/pandoc-2.4-1-amd64.deb pandoc amd64 2.4-1 [17.0 MB]
Selecting previously unselected package pandoc.
(Reading database ... 407228 files and directories currently installed.)
Preparing to unpack .../pandoc-2.4-1-amd64.deb ...
Unpacking pandoc (2.4-1) ...
Setting up pandoc (2.4-1) ...
harlan@harlan-MS-7976:~/Downloads$ pandoc --version
pandoc 1.19.2.1
Compiled with pandoc-types 1.17.0.4, texmath 0.9, skylighting 0.1.1.4
Default user data directory: /home/harlan/.pandoc
Copyright (C) 2006-2016 John MacFarlane
Web:  http://pandoc.org
This is free software; see the source for copying conditions.
There is no warranty, not even for merchantability or fitness
for a particular purpose.
...