Closed 0pLuS0 closed 2 years ago
Pandoc is only used for generating the man page. If you're building from source, and you want the man page, then it requires Pandoc. If you don't need the man page, you can disable the docs.
I understand it's a bit annoying to pull all those dependencies, but I haven't found tool better than Pandoc for dealing with doc generation. Docbook (which was what we used before) leaves much to be desired, although admittedly it's much lighter than Pandoc.
I know Pandoc is for the man pages, but this is so extreme, there has to be a better solution then this.
I thought there are a lot of good alternatives out there, and I thought Docutils is still very commonly used...
What about these?
docbook-to-man http://manpages.ubuntu.com/manpages/bionic/man1/docbook-to-man.1.html
AsciiDoc https://docs.asciidoctor.org/asciidoctor/latest/manpage-backend/
GNU Troff https://www.gnu.org/software/groff/
Of those, I think the only tool close to being good is AsciiDoctor, but it's not nearly as good as Pandoc.
I want to keep the documentation sources in Markdown, so whatever tool/pipeline is used needs to be able to go from markdown -> man. AsciiDoc is its own thing that looks similar to but isn't quite markdown. Markdown is preferred because it's pretty ubiquitous at this point, relatively easy to use/write, and supported by a lot of different tooling.
It's been a while since I really played around with man.
Could you convert it on your end, and just place in the source directories as an example man.1 and we simply gzip it on our end and be done with it?
If this isn't a good idea, what about including the pandoc precompiled binary with the conky source, and just having the conky source look for it's location and compile against it this way? I know sometimes other projects will do things like this, so hopefully this is a good alternative to consider.
pandoc has precompiled binaries, so you don't have to build it.
https://github.com/jgm/pandoc/releases/tag/2.19.2
I just tried pandoc-2.19.2-linux-amd64 and this seemed to of worked nicely.
Is there a -DCMAKE option I can use to point to where I place pandoc to compile against? For now I just placed the precompiled binary in /usr/bin
Here's my compile options I used;
mkdir build
cd build
cmake .. \
-DCMAKE_INSTALL_PREFIX=/usr \
-DBUILD_CURL=OFF \
-DBUILD_DOCS=ON \
-DBUILD_IBM=OFF \
-DBUILD_PORT_MONITORS=OFF \
-DBUILD_XDBE=ON \
-DBUILD_IMLIB2=ON \
-DBUILD_RSS=OFF \
-DBUILD_WLAN=OFF \
-DBUILD_NVIDIA=ON \
-DBUILD_PULSEAUDIO=OFF \
-DMAINTAINER_MODE=ON \
-DCMAKE_BUILD_TYPE=Release \
Here's the contents of my tar file, could you please tell me if this is all the docs and man?
usr/bin/conky
usr/doc/
usr/doc/conky-1.14.0/
usr/doc/conky-1.14.0/AUTHORS
usr/doc/conky-1.14.0/COPYING
usr/doc/conky-1.14.0/LICENSE
usr/doc/conky-1.14.0/LICENSE.BSD
usr/doc/conky-1.14.0/README
usr/doc/conky-1.14.0/README.cmake
usr/doc/conky-1.14.0/README.docker
usr/doc/conky-1.14.0/doc/
usr/doc/conky-1.14.0/doc/.gitignore
usr/doc/conky-1.14.0/doc/CMakeLists.txt
usr/doc/conky-1.14.0/doc/README.md
usr/doc/conky-1.14.0/doc/config_settings.yaml
usr/doc/conky-1.14.0/doc/lua.yaml
usr/doc/conky-1.14.0/doc/man.md.j2
usr/doc/conky-1.14.0/doc/render.py
usr/doc/conky-1.14.0/doc/variables.yaml
usr/doc/conky-1.14.0/extras/
usr/doc/conky-1.14.0/extras/CMakeLists.txt
usr/doc/conky-1.14.0/extras/convert.lua
usr/doc/conky-1.14.0/extras/gedit/
usr/doc/conky-1.14.0/extras/gedit/README.md
usr/doc/conky-1.14.0/extras/gedit/conky.lang
usr/doc/conky-1.14.0/extras/nano/
usr/doc/conky-1.14.0/extras/nano/README
usr/doc/conky-1.14.0/extras/nano/conky.nanorc.j2
usr/doc/conky-1.14.0/extras/vim/
usr/doc/conky-1.14.0/extras/vim/README
usr/doc/conky-1.14.0/extras/vim/ftdetect/
usr/doc/conky-1.14.0/extras/vim/ftdetect/conkyrc.vim
usr/doc/conky-1.14.0/extras/vim/syntax/
usr/doc/conky-1.14.0/extras/vim/syntax/conkyrc.vim.j2
usr/lib/
usr/lib/libconky_core.a
usr/man/
usr/man/man1/
usr/man/man1/conky.1.gz
I'm attaching a configure & make log, so you can check and see how this built with this precompiled pandoc binary I used.
The only issue I noticed is in the make-conky.log;
[WARNING] Could not convert TeX math cat in that it parses the contents of the file, so you can insert things like `, rendering as TeX:
insert things like `
THANKS
It sounds like you found a way. The warning at the end can be ignored.
I do see there is a small problem (wrong files in the dist, which I'll fix). To use your own binary for pandoc, just set the APP_PANDOC
variable. You can do this with cmake
command, or ccmake
, or even just edit CMakeCache.txt
in the build dir.
Here's the contents of my tar file, could you please tell me if this is all the docs and man?
usr/bin/conky usr/doc/ usr/doc/conky-1.14.0/ usr/doc/conky-1.14.0/AUTHORS usr/doc/conky-1.14.0/COPYING usr/doc/conky-1.14.0/LICENSE usr/doc/conky-1.14.0/LICENSE.BSD usr/doc/conky-1.14.0/README usr/doc/conky-1.14.0/README.cmake usr/doc/conky-1.14.0/README.docker usr/doc/conky-1.14.0/doc/ usr/doc/conky-1.14.0/doc/.gitignore usr/doc/conky-1.14.0/doc/CMakeLists.txt usr/doc/conky-1.14.0/doc/README.md usr/doc/conky-1.14.0/doc/config_settings.yaml usr/doc/conky-1.14.0/doc/lua.yaml usr/doc/conky-1.14.0/doc/man.md.j2 usr/doc/conky-1.14.0/doc/render.py usr/doc/conky-1.14.0/doc/variables.yaml usr/doc/conky-1.14.0/extras/ usr/doc/conky-1.14.0/extras/CMakeLists.txt usr/doc/conky-1.14.0/extras/convert.lua usr/doc/conky-1.14.0/extras/gedit/ usr/doc/conky-1.14.0/extras/gedit/README.md usr/doc/conky-1.14.0/extras/gedit/conky.lang usr/doc/conky-1.14.0/extras/nano/ usr/doc/conky-1.14.0/extras/nano/README usr/doc/conky-1.14.0/extras/nano/conky.nanorc.j2 usr/doc/conky-1.14.0/extras/vim/ usr/doc/conky-1.14.0/extras/vim/README usr/doc/conky-1.14.0/extras/vim/ftdetect/ usr/doc/conky-1.14.0/extras/vim/ftdetect/conkyrc.vim usr/doc/conky-1.14.0/extras/vim/syntax/ usr/doc/conky-1.14.0/extras/vim/syntax/conkyrc.vim.j2 usr/lib/ usr/lib/libconky_core.a usr/man/ usr/man/man1/ usr/man/man1/conky.1.gz
What is this file listing from exactly? Most of the files under usr/doc/conky-1.14.0
shouldn't be included in the package.
I just mentioned that is the contents of the tar file after I compiled conky.
My mistake, I added in the /doc & /extras directories by mistake.
Is there a -DBUILD compile flag I can use that will look for pandoc in another path besides /usr? Since I'm going to use the precompiled binary and I'll just keep it with tthe conky source.
Like -DBUILD_APP_PANDOC=/path/to/binary?
THANKS
P.S. As I asked before, could you just include the pandoc binary with the conky source to compile against? You have toluapp in the source to compile against, so I assumed this would be no different.
Here's a screen shot, I placed pandoc directory with the binary in the source. ( I guess place it under 3rdparty too)
Here's the contents of 1.14.0 now, after correcting my /doc mistake.
usr/bin/conky
usr/doc/conky-1.14.0/
usr/doc/conky-1.14.0/AUTHORS
usr/doc/conky-1.14.0/COPYING
usr/doc/conky-1.14.0/LICENSE
usr/doc/conky-1.14.0/LICENSE.BSD
usr/doc/conky-1.14.0/README
usr/doc/conky-1.14.0/README.cmake
usr/doc/conky-1.14.0/README.docker
usr/doc/conky-1.14.0/TODO
usr/lib/libconky_core.a
usr/man/man1/conky.1.gz
THANKS
What happened?
I'm running Slackware 15.0 and when I tried to compile 1.14.0 and I get this message at the term;
CMake Error at cmake/ConkyPlatformChecks.cmake:485 (message): Unable to find program 'pandoc' Call Stack (most recent call first): CMakeLists.txt:35 (include)
I see in the doc README.md, pandoc listed.
So I'm not looking Slackware biased here, look at Arch Linux for pandoc; (Dependencies (74))
https://archlinux.org/packages/community/x86_64/pandoc/
74 dependencies needed for pandoc.
I guess for now I'm going to have to use -DBUILD_DOCS=OFF if I want to use this version, but I would like to have docs installed.
Can we please get this changed, since pandoc has an extreme amount of Haskell dependencies. I don't understand why from version 1.13.1 to 1.14.0 this had to change and now include this extreme amount of Haskell dependency just for docs.
THANKS
Version
1.14.0
Which OS/distro are you seeing the problem on?
Slackware 15.0
P.S. Didn't mean to post this as an actual bug report, sorry.