public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Does $DATADIR work?
@ 2017-10-18 13:34 BillS
       [not found] ` <fe0be057-6f62-462c-a784-5d1ce4963ccc-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: BillS @ 2017-10-18 13:34 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 1338 bytes --]

I have been asked to set up pandoc for an HPC cluster and while most of the 
set up has gone fairly smoothly, we are having issues resolving the path to 
the templates and other "data" files -- they resolve to the build directory 
not the install directory. 

When we test with the --data-dir argument it works fine, but we would like 
to be able to set it 'once and forever'. In the man pages/user guide it 
looks as though there is an option to set an environment variable 
($DATADIR) that would do the same thing as the command line argument, but 
we have not been able to get that to work. 

Is the $DATADIR environment variable supported? Is there a better way to 
'once and forever' point to the correct data directory? 

Thank you for any hints and pointers.

-- 
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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/fe0be057-6f62-462c-a784-5d1ce4963ccc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 1843 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Does $DATADIR work?
       [not found] ` <fe0be057-6f62-462c-a784-5d1ce4963ccc-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2017-10-18 15:52   ` John MacFarlane
       [not found]     ` <20171018155238.GF78597-9Rnp8PDaXcadBw3G0RLmbRFnWt+6NQIA@public.gmane.org>
  2017-10-19 10:30   ` Kolen Cheung
  1 sibling, 1 reply; 7+ messages in thread
From: John MacFarlane @ 2017-10-18 15:52 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

$DATADIR appears in the manual just as a placeholder for
whatever your user data directory is (see --data-dir).
The environment variable has no effect.  I've made a tweak
in the manual to make that clearer.

Note that the default user data dir is ~/.pandoc (on *nix),
so if you just symlink that wherever you like, that's the
most convenient solution.

+++ BillS [Oct 18 17 06:34 ]:
>   I have been asked to set up pandoc for an HPC cluster and while most of
>   the set up has gone fairly smoothly, we are having issues resolving the
>   path to the templates and other "data" files -- they resolve to the
>   build directory not the install directory.
>   When we test with the --data-dir argument it works fine, but we would
>   like to be able to set it 'once and forever'. In the man pages/user
>   guide it looks as though there is an option to set an environment
>   variable ($DATADIR) that would do the same thing as the command line
>   argument, but we have not been able to get that to work.
>   Is the $DATADIR environment variable supported? Is there a better way
>   to 'once and forever' point to the correct data directory?
>   Thank you for any hints and pointers.
>
>   --
>   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 [1]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>   To post to this group, send email to
>   [2]pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>   To view this discussion on the web visit
>   [3]https://groups.google.com/d/msgid/pandoc-discuss/fe0be057-6f62-462c-
>   a784-5d1ce4963ccc%40googlegroups.com.
>   For more options, visit [4]https://groups.google.com/d/optout.
>
>References
>
>   1. mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>   2. mailto:pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>   3. https://groups.google.com/d/msgid/pandoc-discuss/fe0be057-6f62-462c-a784-5d1ce4963ccc-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org?utm_medium=email&utm_source=footer
>   4. https://groups.google.com/d/optout


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Does $DATADIR work?
       [not found]     ` <20171018155238.GF78597-9Rnp8PDaXcadBw3G0RLmbRFnWt+6NQIA@public.gmane.org>
@ 2017-10-18 18:28       ` BillS
       [not found]         ` <07f482a3-86ca-4b30-9dfe-d15c6c6ce68b-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: BillS @ 2017-10-18 18:28 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 1187 bytes --]

Thank you John, 
The symlink approach is not flexible enough for our situation, but we can 
tell folk to to use the --data-dir argument. 
Thanks for the help.

On Wednesday, October 18, 2017 at 8:52:54 AM UTC-7, John MacFarlane wrote:
>
> $DATADIR appears in the manual just as a placeholder for 
> whatever your user data directory is (see --data-dir). 
> The environment variable has no effect.  I've made a tweak 
> in the manual to make that clearer. 
>
> Note that the default user data dir is ~/.pandoc (on *nix), 
> so if you just symlink that wherever you like, that's the 
> most convenient solution. 
>
>

-- 
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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/07f482a3-86ca-4b30-9dfe-d15c6c6ce68b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 1780 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Does $DATADIR work?
       [not found]         ` <07f482a3-86ca-4b30-9dfe-d15c6c6ce68b-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2017-10-19  0:32           ` John MACFARLANE
  2018-05-23 18:54             ` Luis Rivera
  0 siblings, 1 reply; 7+ messages in thread
From: John MACFARLANE @ 2017-10-19  0:32 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

You could always alias pandoc to 'pandoc --datadir whatever'.

+++ BillS [Oct 18 17 11:28 ]:
>   Thank you John,
>   The symlink approach is not flexible enough for our situation, but we
>   can tell folk to to use the --data-dir argument.
>   Thanks for the help.
>   On Wednesday, October 18, 2017 at 8:52:54 AM UTC-7, John MacFarlane
>   wrote:
>
>     $DATADIR appears in the manual just as a placeholder for
>     whatever your user data directory is (see --data-dir).
>     The environment variable has no effect.  I've made a tweak
>     in the manual to make that clearer.
>     Note that the default user data dir is ~/.pandoc (on *nix),
>     so if you just symlink that wherever you like, that's the
>     most convenient solution.
>
>   --
>   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 [1]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>   To post to this group, send email to
>   [2]pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>   To view this discussion on the web visit
>   [3]https://groups.google.com/d/msgid/pandoc-discuss/07f482a3-86ca-4b30-
>   9dfe-d15c6c6ce68b%40googlegroups.com.
>   For more options, visit [4]https://groups.google.com/d/optout.
>
>References
>
>   1. mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>   2. mailto:pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>   3. https://groups.google.com/d/msgid/pandoc-discuss/07f482a3-86ca-4b30-9dfe-d15c6c6ce68b-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org?utm_medium=email&utm_source=footer
>   4. https://groups.google.com/d/optout


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Does $DATADIR work?
       [not found] ` <fe0be057-6f62-462c-a784-5d1ce4963ccc-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  2017-10-18 15:52   ` John MacFarlane
@ 2017-10-19 10:30   ` Kolen Cheung
  1 sibling, 0 replies; 7+ messages in thread
From: Kolen Cheung @ 2017-10-19 10:30 UTC (permalink / raw)
  To: pandoc-discuss

[-- Attachment #1: Type: text/plain, Size: 2999 bytes --]

I’m interested in hearing how you want to set up and use it. You mentioned HPC cluster, but is it HPC, or cluster? So is it like you want to set up an environment so that members of the same group can use pandoc in the same environment?

In any case, It seems like you want to be able to build something in a reproducible way. You could consider docker/shifter if the facility you’re using support it. Or you could write a makefile if it is “project-based” like a paper to be published. You can also consider using panzer (I haven’t used it myself but heard good comments about it) that allows setting up a “config file” define different “styles” where each is equiv. to a set of args and filters, etc. to be used.

There’s a couple of things that data-dir will be used to look up things, but none of them (as far as I can remember) requires them to be in that dir. e.g. if you have filters, they will work as long as it is in the PATH, if it is templates, you can again specify the template path in an arg (useful for makefile, config file, etc.)

One advantage of shifter is that you can control the whole stack of pandoc’s dependencies there, e.g. LaTeX (not that you can’t do so without it), because often time those in the HPC/HTC/clusters environments are quite old.

If it is project-based, it might actually be more convenient to set one up using GitHub + Travis CI. I have one project setup like this and we don’t even need our own server. Every time a git tag is created, the output (PDFs + ePubs + HTMLs) will be released in GitHub Releases automatically. I can share how it’s done if you want.

You could also checkout pypandoc, it’s available in conda as well, so you could setup a conda environment that way. This is especially useful if you also need pandoc filters written in Python. pandocfilters is available in conda. I’ve tried to add a recipe of panflute to conda but there’s something I don’t know how to do and didn’t have time to figure that out yet (it is related to the complication to support python2 users from python3 codes. help welcome). If you decide to go this way, bare in mind that newer versions of pypandoc’s conda recipe doesn’t really install pandoc for now and has a pandoc_download script to install it, which might be a problem to HPC/cluster users. You could use an older version of pypandoc or help fixing that open issue.

-- 
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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/5446abd7-adec-4b38-920a-a3cae3608072%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Does $DATADIR work?
  2017-10-19  0:32           ` John MACFARLANE
@ 2018-05-23 18:54             ` Luis Rivera
       [not found]               ` <0ae3aee0-12a7-49eb-af28-9db4a5b39a41-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Luis Rivera @ 2018-05-23 18:54 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 1485 bytes --]



On Wednesday, October 18, 2017 at 7:32:16 PM UTC-5, John MacFarlane wrote:
>
> > 
> >     $DATADIR appears in the manual just as a placeholder for 
> >     whatever your user data directory is (see --data-dir). 
> >     The environment variable has no effect.  I've made a tweak 
> >     in the manual to make that clearer. 
> >     Note that the default user data dir is ~/.pandoc (on *nix), 
> >     so if you just symlink that wherever you like, that's the 
> >     most convenient solution. 
> > 
>

Would it be possible to implement that feature, i.e. define a custom 
$PDDATADIR environment variable to place the data anywhere in my $HOME 
directory? I'm in the weird situation of running pandoc on cygwin on 
windows, and it would be easier to add something to bashrc to tell pandoc 
where to look for templates and csl styles and forget omit the --data-dir 
option, unless I require it.

Cheers,

Luis.

-- 
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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/0ae3aee0-12a7-49eb-af28-9db4a5b39a41%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 2167 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Does $DATADIR work?
       [not found]               ` <0ae3aee0-12a7-49eb-af28-9db4a5b39a41-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2018-05-24  3:58                 ` Kolen Cheung
  0 siblings, 0 replies; 7+ messages in thread
From: Kolen Cheung @ 2018-05-24  3:58 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 1649 bytes --]

The alias method mentioned above should solve the problem.

On Thursday, May 24, 2018 at 2:54:05 AM UTC+8, Luis Rivera wrote:
>
>
>
> On Wednesday, October 18, 2017 at 7:32:16 PM UTC-5, John MacFarlane wrote:
>>
>> > 
>> >     $DATADIR appears in the manual just as a placeholder for 
>> >     whatever your user data directory is (see --data-dir). 
>> >     The environment variable has no effect.  I've made a tweak 
>> >     in the manual to make that clearer. 
>> >     Note that the default user data dir is ~/.pandoc (on *nix), 
>> >     so if you just symlink that wherever you like, that's the 
>> >     most convenient solution. 
>> > 
>>
>
> Would it be possible to implement that feature, i.e. define a custom 
> $PDDATADIR environment variable to place the data anywhere in my $HOME 
> directory? I'm in the weird situation of running pandoc on cygwin on 
> windows, and it would be easier to add something to bashrc to tell pandoc 
> where to look for templates and csl styles and forget omit the --data-dir 
> option, unless I require it.
>
> Cheers,
>
> Luis.
>

-- 
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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/545f19fa-7c50-40bb-bed6-b220f2492bdb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 2443 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-05-24  3:58 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-18 13:34 Does $DATADIR work? BillS
     [not found] ` <fe0be057-6f62-462c-a784-5d1ce4963ccc-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2017-10-18 15:52   ` John MacFarlane
     [not found]     ` <20171018155238.GF78597-9Rnp8PDaXcadBw3G0RLmbRFnWt+6NQIA@public.gmane.org>
2017-10-18 18:28       ` BillS
     [not found]         ` <07f482a3-86ca-4b30-9dfe-d15c6c6ce68b-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2017-10-19  0:32           ` John MACFARLANE
2018-05-23 18:54             ` Luis Rivera
     [not found]               ` <0ae3aee0-12a7-49eb-af28-9db4a5b39a41-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2018-05-24  3:58                 ` Kolen Cheung
2017-10-19 10:30   ` Kolen Cheung

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).