From: <denis.maier-NSENcxR/0n0@public.gmane.org>
To: <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Cc: <albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>
Subject: AW: Custom readers and writer paths
Date: Mon, 6 Jun 2022 20:02:40 +0000 [thread overview]
Message-ID: <f27c064156a4413ba048992ce0338c68@unibe.ch> (raw)
In-Reply-To: <CADAJKhDdwHuvBjTCAAwrFY6RcaZ+d_FRMnkVp3MMUtntrsBdYg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
Yes please. Not Luarocks, at least unless someone can show an easy way to install it on Windows?
Denis
________________________________________
Von: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> im Auftrag von BPJ <bpj-J3H7GcXPSITLoDKTGw+V6w@public.gmane.org>
Gesendet: Montag, 6. Juni 2022 21:53:16
An: pandoc-discuss
Cc: Albert Krewinkel
Betreff: Re: Custom readers and writer paths
Den mån 6 juni 2022 20:39John MacFarlane <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org<mailto:jgm@berkeley.edu>> skrev:
Albert Krewinkel <albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org<mailto:albert%2Bpandoc@zeitkraut.de>> writes:
> I'm not sure if it's better or worse, but we could also look for the
> reader in LUA_PATH (via `require`). Using a bit of pseudo-code:
>
> if file_exists(reader_path) then
> dofile(reader_path)
> reader = Reader
> else
> reader = require (reader_path:gsub('.lua$', ''))
> end
>
> The reader library would have to `return` the Reader function instead of
> just defining it as a global.
Probably better not to change the interface in this way.
Maybe treating these like filters is the most sensible/least
surprising thing to do.
IMO the most sensible. That way you can just clone readers/writers off GitHub without authors needing to go through the hassle of setting up a Lua rock. Having to do that will likely discourage people from publishing their code at all. Also of course templates, filters, defaults all work that way already. I have my data dir in my dropbox directory and symlink it in ~/.local/share, or rclone it on my Android devices (via Termux) where dropbox isn't a regular storage directory.
Should we have readers/ and writers/
subdirectories of user data? Or custom-readers/ custom-writers/ ?
Since they are already subdirectories of the dedicated pandoc data directory `readers/` and `writers/` should suffice. Seven characters less to type for each compared to `custom-*`.
--
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<mailto:pandoc-discuss%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/yh480kv8tdd4de.fsf%40johnmacfarlane.net.
--
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CADAJKhDdwHuvBjTCAAwrFY6RcaZ%2Bd_FRMnkVp3MMUtntrsBdYg%40mail.gmail.com<https://groups.google.com/d/msgid/pandoc-discuss/CADAJKhDdwHuvBjTCAAwrFY6RcaZ%2Bd_FRMnkVp3MMUtntrsBdYg%40mail.gmail.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/f27c064156a4413ba048992ce0338c68%40unibe.ch.
next prev parent reply other threads:[~2022-06-06 20:02 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-06 16:58 John MacFarlane
[not found] ` <m2h74xhgpp.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
2022-06-06 17:41 ` Albert Krewinkel
[not found] ` <874k0xpszm.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>
2022-06-06 18:38 ` John MacFarlane
[not found] ` <yh480kv8tdd4de.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
2022-06-06 19:53 ` BPJ
[not found] ` <CADAJKhDdwHuvBjTCAAwrFY6RcaZ+d_FRMnkVp3MMUtntrsBdYg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2022-06-06 20:02 ` denis.maier-NSENcxR/0n0 [this message]
2022-06-06 20:19 ` John MacFarlane
2022-06-06 20:41 ` Albert Krewinkel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f27c064156a4413ba048992ce0338c68@unibe.ch \
--to=denis.maier-nsencxr/0n0@public.gmane.org \
--cc=albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org \
--cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).