* Store custom lua writer centrally on my machine
@ 2022-04-02 19:43 'Jonathan Scholbach' via pandoc-discuss
[not found] ` <381ff81c-f666-4d1f-a3f4-62a626d08bfan-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: 'Jonathan Scholbach' via pandoc-discuss @ 2022-04-02 19:43 UTC (permalink / raw)
To: pandoc-discuss
[-- Attachment #1.1: Type: text/plain, Size: 2023 bytes --]
Hello pandocers!
I have managed to follow the description how to create the instruction how
to write a custom writer for pandoc <https://pandoc.org/custom-writers.html>,
say mywriter.lua. Locally, I can succesfully use it with the -t option of
pandoc. Now, I would like to make it available globally.
Is there a central path I can store it in my machine, so that I can invoke
pandoc with -t mywriter.lua
<https://pandoc.org/MANUAL.html#custom-readers-and-writers> in order to use
my custom writer, regardless from the directory I run this command?
For templates, I know I can use usr/share/pandoc/data/templates, as pandoc
will look for templates in that directory if it could not resolve the
reference to a template locally. Is there something similar for custom
writers?
I have looked through the documentation and searched the internet, but I
didn't find an answer. I also tried to guess a path. The following paths
did *not* work:
- /usr/share/pandoc/mywriter.lua
- /usr/share/pandoc/data/mywriter.lua
- /usr/share/pandoc/data/templates/mywriter.lua
- ~/.pandoc/mywriter.lua
- ~/.pandoc/templates/mywriter.lua
(If this is relevant, I work on an Ubuntu machine.)
If there is no such option, could it be added? I tried to understand the
Option parsing in the source code but had to give up quite soon, because I
don't know any Haskell.
I have also asked this question on StackOverflow
<https://stackoverflow.com/questions/71720215/central-path-to-store-pandoc-writer>,
but I figured, I would probably get better answers here on the list.
Thanks for your help!
Jonathan
--
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/381ff81c-f666-4d1f-a3f4-62a626d08bfan%40googlegroups.com.
[-- Attachment #1.2: Type: text/html, Size: 2602 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Store custom lua writer centrally on my machine
[not found] ` <381ff81c-f666-4d1f-a3f4-62a626d08bfan-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2022-04-03 18:36 ` Bastien DUMONT
0 siblings, 0 replies; 2+ messages in thread
From: Bastien DUMONT @ 2022-04-03 18:36 UTC (permalink / raw)
To: 'Jonathan Scholbach' via pandoc-discuss
You should be able to store all such files in ~/.local/share/pandoc. You can create subdirectories if needed. You can find more information in the manual under --data-dir.
Le Saturday 02 April 2022 à 12:43:14PM, 'Jonathan Scholbach' via pandoc-discuss a écrit :
> Hello pandocers!
>
> I have managed to follow the description how to create [1]the instruction how
> to write a custom writer for pandoc, say mywriter.lua. Locally, I can
> succesfully use it with the -t option of pandoc. Now, I would like to make it
> available globally.
>
> Is there a central path I can store it in my machine, so that I can invoke
> pandoc with [2]-t mywriter.lua in order to use my custom writer, regardless
> from the directory I run this command?
>
> For templates, I know I can use usr/share/pandoc/data/templates, as pandoc will
> look for templates in that directory if it could not resolve the reference to a
> template locally. Is there something similar for custom writers?
>
> I have looked through the documentation and searched the internet, but I didn't
> find an answer. I also tried to guess a path. The following paths did not work:
>
> • /usr/share/pandoc/mywriter.lua
> • /usr/share/pandoc/data/mywriter.lua
> • /usr/share/pandoc/data/templates/mywriter.lua
> • ~/.pandoc/mywriter.lua
> • ~/.pandoc/templates/mywriter.lua
>
> (If this is relevant, I work on an Ubuntu machine.)
>
> If there is no such option, could it be added? I tried to understand the Option
> parsing in the source code but had to give up quite soon, because I don't know
> any Haskell.
>
> I have also asked this question on [3]StackOverflow, but I figured, I would
> probably get better answers here on the list.
>
> Thanks for your help!
>
> Jonathan
>
> --
> You received this message because you are subscribed to the Google Groups
> "pandoc-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to [4]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To view this discussion on the web visit [5]https://groups.google.com/d/msgid/
> pandoc-discuss/381ff81c-f666-4d1f-a3f4-62a626d08bfan%40googlegroups.com.
>
> References:
>
> [1] https://pandoc.org/custom-writers.html
> [2] https://pandoc.org/MANUAL.html#custom-readers-and-writers
> [3] https://stackoverflow.com/questions/71720215/central-path-to-store-pandoc-writer
> [4] mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
> [5] https://groups.google.com/d/msgid/pandoc-discuss/381ff81c-f666-4d1f-a3f4-62a626d08bfan%40googlegroups.com?utm_medium=email&utm_source=footer
--
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/YknpE%2BjQYSFSXaEK%40localhost.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-04-03 18:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-02 19:43 Store custom lua writer centrally on my machine 'Jonathan Scholbach' via pandoc-discuss
[not found] ` <381ff81c-f666-4d1f-a3f4-62a626d08bfan-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2022-04-03 18:36 ` Bastien DUMONT
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).