public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Wildcard for multiple input files in the defaults file variable "input-files"
@ 2020-11-18 21:05 periodicpoint
       [not found] ` <877c4243-b6d8-4a9b-b763-24e361cd8576n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 14+ messages in thread
From: periodicpoint @ 2020-11-18 21:05 UTC (permalink / raw)
  To: pandoc-discuss


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

When issuing pandoc from the comand line you can combine (concatenate) 
multiple input files by using “pandoc -s file1.md file2.md file3.md -o 
output.pdf” or by using a wildcard "pandoc -s *.md -o output.pdf".

When issuing pandoc using a defaults.yaml file with the --defaults option 
and the files "input-files:" variable you have to specify the individual 
input files:

"
input-files:
- 'file1.md'
- 'file2.md'
- 'file3.md'
"

Is there an option like “input-files: ["*"]” to include all input files 
within a directory?

-- 
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/877c4243-b6d8-4a9b-b763-24e361cd8576n%40googlegroups.com.

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

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

* Re: Wildcard for multiple input files in the defaults file variable "input-files"
       [not found] ` <877c4243-b6d8-4a9b-b763-24e361cd8576n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2020-11-19 17:59   ` John MacFarlane
       [not found]     ` <m2pn49448q.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org>
  0 siblings, 1 reply; 14+ messages in thread
From: John MacFarlane @ 2020-11-19 17:59 UTC (permalink / raw)
  To: periodicpoint, pandoc-discuss


periodicpoint <entscheidbarkeit-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:

> "
> input-files:
> - 'file1.md'
> - 'file2.md'
> - 'file3.md'
> "
>
> Is there an option like “input-files: ["*"]” to include all input files 
> within a directory?

No, there isn't.

-- 
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/m2pn49448q.fsf%40MacBook-Pro.hsd1.ca.comcast.net.


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

* Re: Wildcard for multiple input files in the defaults file variable "input-files"
       [not found]     ` <m2pn49448q.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org>
@ 2020-11-19 21:32       ` periodicpoint
       [not found]         ` <69f5620d-6fe5-4a80-920a-8125ed7c6ec2n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 14+ messages in thread
From: periodicpoint @ 2020-11-19 21:32 UTC (permalink / raw)
  To: pandoc-discuss


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

Thank you very much for the quick response.

Personally, I think it would be a nice simple feature. It would make things 
much easier in cases of large projects (such as dissertations) where the 
input files change frequently.

Would you mind if I create a corresponding fearture rerquest?

On Thursday, November 19, 2020 at 6:59:51 PM UTC+1 John MacFarlane wrote:

>
> periodicpoint <entschei...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
>
> > "
> > input-files:
> > - 'file1.md'
> > - 'file2.md'
> > - 'file3.md'
> > "
> >
> > Is there an option like “input-files: ["*"]” to include all input files 
> > within a directory?
>
> No, there isn't.
>

-- 
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/69f5620d-6fe5-4a80-920a-8125ed7c6ec2n%40googlegroups.com.

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

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

* Re: Wildcard for multiple input files in the defaults file variable "input-files"
       [not found]         ` <69f5620d-6fe5-4a80-920a-8125ed7c6ec2n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2020-11-19 21:55           ` Albert Krewinkel
  2020-11-19 22:33           ` AW: " denis.maier-FfwAq0itz3ofv37vnLkPlQ
  2020-11-19 22:36           ` John MacFarlane
  2 siblings, 0 replies; 14+ messages in thread
From: Albert Krewinkel @ 2020-11-19 21:55 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

periodicpoint writes:

> Thank you very much for the quick response.
>
> Personally, I think it would be a nice simple feature. It would make things 
> much easier in cases of large projects (such as dissertations) where the 
> input files change frequently.
>
> Would you mind if I create a corresponding fearture rerquest?

Things to keep in mind: `*` is a valid character in a filepath. How
would we distinguish between a pattern and a plain filename? Would we
have to disallow certain filenames?


> On Thursday, November 19, 2020 at 6:59:51 PM UTC+1 John MacFarlane wrote:
>
>>
>> periodicpoint <entschei...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
>>
>> > "
>> > input-files:
>> > - 'file1.md'
>> > - 'file2.md'
>> > - 'file3.md'
>> > "
>> >
>> > Is there an option like “input-files: ["*"]” to include all input files 
>> > within a directory?
>>
>> No, there isn't.
>>


-- 
Albert Krewinkel
GPG: 8eed e3e2 e8c5 6f18 81fe  e836 388d c0b2 1f63 1124

-- 
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/87ima1ui3q.fsf%40zeitkraut.de.


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

* AW: Wildcard for multiple input files in the defaults file variable "input-files"
       [not found]         ` <69f5620d-6fe5-4a80-920a-8125ed7c6ec2n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  2020-11-19 21:55           ` Albert Krewinkel
@ 2020-11-19 22:33           ` denis.maier-FfwAq0itz3ofv37vnLkPlQ
  2020-11-19 22:36           ` John MacFarlane
  2 siblings, 0 replies; 14+ messages in thread
From: denis.maier-FfwAq0itz3ofv37vnLkPlQ @ 2020-11-19 22:33 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

Hey, I don't have a working example ready, but shouldn't this be possible with pipes? Like finding all files that match a certain pattern, feeding them into cat and feeding the result into pandoc?
________________________________________
Von: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> im Auftrag von periodicpoint <entscheidbarkeit-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Gesendet: Donnerstag, 19. November 2020 22:32:55
An: pandoc-discuss
Betreff: Re: Wildcard for multiple input files in the defaults file variable "input-files"

Thank you very much for the quick response.

Personally, I think it would be a nice simple feature. It would make things much easier in cases of large projects (such as dissertations) where the input files change frequently.

Would you mind if I create a corresponding fearture rerquest?

On Thursday, November 19, 2020 at 6:59:51 PM UTC+1 John MacFarlane wrote:

periodicpoint <entschei...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:

> "
> input-files:
> - 'file1.md'
> - 'file2.md'
> - 'file3.md'
> "
>
> Is there an option like “input-files: ["*"]” to include all input files
> within a directory?

No, there isn't.

--
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/69f5620d-6fe5-4a80-920a-8125ed7c6ec2n%40googlegroups.com<https://groups.google.com/d/msgid/pandoc-discuss/69f5620d-6fe5-4a80-920a-8125ed7c6ec2n%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/72a09e03d470419ab4b8ebf4733c03ad%40ub.unibe.ch.


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

* Re: Wildcard for multiple input files in the defaults file variable "input-files"
       [not found]         ` <69f5620d-6fe5-4a80-920a-8125ed7c6ec2n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  2020-11-19 21:55           ` Albert Krewinkel
  2020-11-19 22:33           ` AW: " denis.maier-FfwAq0itz3ofv37vnLkPlQ
@ 2020-11-19 22:36           ` John MacFarlane
       [not found]             ` <m2ft55geix.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org>
  2 siblings, 1 reply; 14+ messages in thread
From: John MacFarlane @ 2020-11-19 22:36 UTC (permalink / raw)
  To: periodicpoint, pandoc-discuss


Why not just specify the input files on the command line?
Then you can use shell expansion:  file*.md

periodicpoint <entscheidbarkeit-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:

> Thank you very much for the quick response.
>
> Personally, I think it would be a nice simple feature. It would make things 
> much easier in cases of large projects (such as dissertations) where the 
> input files change frequently.
>
> Would you mind if I create a corresponding fearture rerquest?
>
> On Thursday, November 19, 2020 at 6:59:51 PM UTC+1 John MacFarlane wrote:
>
>>
>> periodicpoint <entschei...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
>>
>> > "
>> > input-files:
>> > - 'file1.md'
>> > - 'file2.md'
>> > - 'file3.md'
>> > "
>> >
>> > Is there an option like “input-files: ["*"]” to include all input files 
>> > within a directory?
>>
>> No, there isn't.
>>
>
> -- 
> 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/69f5620d-6fe5-4a80-920a-8125ed7c6ec2n%40googlegroups.com.

-- 
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/m2ft55geix.fsf%40MacBook-Pro.hsd1.ca.comcast.net.


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

* Re: Wildcard for multiple input files in the defaults file variable "input-files"
       [not found]             ` <m2ft55geix.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org>
@ 2020-11-20 12:08               ` periodicpoint
  2020-11-20 16:46               ` BPJ
  1 sibling, 0 replies; 14+ messages in thread
From: periodicpoint @ 2020-11-20 12:08 UTC (permalink / raw)
  To: pandoc-discuss


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

Yes, that's a good objection, `*` is a valid character in a file path. I 
have no idea how to solve this problem right away. 

Yes, it would be possible to solve the problem simply via the command line. 
However, IMHO that would take away the elegance of the approach via the 
defaults file, where you call pandoc with only one option.

Furthermore, it would be consistent to have such an option in the defaults 
file, as the defaults are supposed to map the possible command line 
options, if I understand it correctly. (Of course the wildcard 
functionality is actually a function of the shell as a function of pandoc 
per se.)

Would it be possible to introduce an extra variable or argument for the 
defaults file or as a command line option like:

`input-dir: "/path/contents/"`?


On Thursday, November 19, 2020 at 11:36:56 PM UTC+1 John MacFarlane wrote:

>
> Why not just specify the input files on the command line?
> Then you can use shell expansion: file*.md
>
> periodicpoint <entschei...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
>
> > Thank you very much for the quick response.
> >
> > Personally, I think it would be a nice simple feature. It would make 
> things 
> > much easier in cases of large projects (such as dissertations) where the 
> > input files change frequently.
> >
> > Would you mind if I create a corresponding fearture rerquest?
> >
> > On Thursday, November 19, 2020 at 6:59:51 PM UTC+1 John MacFarlane wrote:
> >
> >>
> >> periodicpoint <entschei...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
> >>
> >> > "
> >> > input-files:
> >> > - 'file1.md'
> >> > - 'file2.md'
> >> > - 'file3.md'
> >> > "
> >> >
> >> > Is there an option like “input-files: ["*"]” to include all input 
> files 
> >> > within a directory?
> >>
> >> No, there isn't.
> >>
> >
> > -- 
> > 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-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> > To view this discussion on the web visit 
> https://groups.google.com/d/msgid/pandoc-discuss/69f5620d-6fe5-4a80-920a-8125ed7c6ec2n%40googlegroups.com
> .
>

-- 
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/89d25945-2e24-466e-bbfd-2ab75cf78aafn%40googlegroups.com.

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

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

* Re: Wildcard for multiple input files in the defaults file variable "input-files"
       [not found]             ` <m2ft55geix.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org>
  2020-11-20 12:08               ` periodicpoint
@ 2020-11-20 16:46               ` BPJ
       [not found]                 ` <CADAJKhDh7Cr1gHCRvP=NhCMLcbj6aF8rMnn4c+9Oo1Fk42DazA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  1 sibling, 1 reply; 14+ messages in thread
From: BPJ @ 2020-11-20 16:46 UTC (permalink / raw)
  To: pandoc-discuss; +Cc: periodicpoint

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

Just to clarify: you don't *have to* give the input/output files in the
defaults file just because you are using a defaults file. You can still
give the files on the command line using shell globbing and have
everything/anything else in the defaults file. That's why they are called
defaults: you can override them on the command line.

-- 
Better --help|less than helpless

Den tors 19 nov. 2020 23:37John MacFarlane <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> skrev:

>
> Why not just specify the input files on the command line?
> Then you can use shell expansion:  file*.md
>
> periodicpoint <entscheidbarkeit-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
>
> > Thank you very much for the quick response.
> >
> > Personally, I think it would be a nice simple feature. It would make
> things
> > much easier in cases of large projects (such as dissertations) where the
> > input files change frequently.
> >
> > Would you mind if I create a corresponding fearture rerquest?
> >
> > On Thursday, November 19, 2020 at 6:59:51 PM UTC+1 John MacFarlane wrote:
> >
> >>
> >> periodicpoint <entschei...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
> >>
> >> > "
> >> > input-files:
> >> > - 'file1.md'
> >> > - 'file2.md'
> >> > - 'file3.md'
> >> > "
> >> >
> >> > Is there an option like “input-files: ["*"]” to include all input
> files
> >> > within a directory?
> >>
> >> No, there isn't.
> >>
> >
> > --
> > 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/69f5620d-6fe5-4a80-920a-8125ed7c6ec2n%40googlegroups.com
> .
>
> --
> 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/m2ft55geix.fsf%40MacBook-Pro.hsd1.ca.comcast.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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CADAJKhDh7Cr1gHCRvP%3DNhCMLcbj6aF8rMnn4c%2B9Oo1Fk42DazA%40mail.gmail.com.

[-- Attachment #2: Type: text/html, Size: 4386 bytes --]

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

* Re: Wildcard for multiple input files in the defaults file variable "input-files"
       [not found]                 ` <CADAJKhDh7Cr1gHCRvP=NhCMLcbj6aF8rMnn4c+9Oo1Fk42DazA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2020-11-20 21:47                   ` periodicpoint
       [not found]                     ` <ffdbcb61-fc16-4b6c-a530-a8172dd4da3fn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 14+ messages in thread
From: periodicpoint @ 2020-11-20 21:47 UTC (permalink / raw)
  To: pandoc-discuss


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

Thank you for the clarification. Yes, of course I fully understand that 
fact. However, my question or my suggestion (`input-dir: 
"/pat/to/inputfiles/"`) remains completely unaffected by this fact. See my 
messages above.
On Friday, November 20, 2020 at 5:46:20 PM UTC+1 BP wrote:

> Just to clarify: you don't *have to* give the input/output files in the 
> defaults file just because you are using a defaults file. You can still 
> give the files on the command line using shell globbing and have 
> everything/anything else in the defaults file. That's why they are called 
> defaults: you can override them on the command line.
>
> -- 
> Better --help|less than helpless
>
> Den tors 19 nov. 2020 23:37John MacFarlane <j...-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> skrev:
>
>>
>> Why not just specify the input files on the command line?
>> Then you can use shell expansion:  file*.md
>>
>> periodicpoint <entschei...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
>>
>> > Thank you very much for the quick response.
>> >
>> > Personally, I think it would be a nice simple feature. It would make 
>> things 
>> > much easier in cases of large projects (such as dissertations) where 
>> the 
>> > input files change frequently.
>> >
>> > Would you mind if I create a corresponding fearture rerquest?
>> >
>> > On Thursday, November 19, 2020 at 6:59:51 PM UTC+1 John MacFarlane 
>> wrote:
>> >
>> >>
>> >> periodicpoint <entschei...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
>> >>
>> >> > "
>> >> > input-files:
>> >> > - 'file1.md'
>> >> > - 'file2.md'
>> >> > - 'file3.md'
>> >> > "
>> >> >
>> >> > Is there an option like “input-files: ["*"]” to include all input 
>> files 
>> >> > within a directory?
>> >>
>> >> No, there isn't.
>> >>
>> >
>> > -- 
>> > 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-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>> > To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/pandoc-discuss/69f5620d-6fe5-4a80-920a-8125ed7c6ec2n%40googlegroups.com
>> .
>>
>> -- 
>> 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-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>>
> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/pandoc-discuss/m2ft55geix.fsf%40MacBook-Pro.hsd1.ca.comcast.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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/ffdbcb61-fc16-4b6c-a530-a8172dd4da3fn%40googlegroups.com.

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

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

* Re: Wildcard for multiple input files in the defaults file variable "input-files"
       [not found]                     ` <ffdbcb61-fc16-4b6c-a530-a8172dd4da3fn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2020-11-20 22:26                       ` BPJ
       [not found]                         ` <CADAJKhDqtoDj2ruqN7aEmeb+7vdVq-K8mYMyAKy=PGRPdhgSxg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 14+ messages in thread
From: BPJ @ 2020-11-20 22:26 UTC (permalink / raw)
  To: pandoc-discuss

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

An `input-dir` field in default files would be nice to have, but I
generally prefer to find solutions using what is already there rather than
yearning for as yet not existing nice-to-have features. Things tend to get
done sooner that way. This doesn't mean that I'm opposed to new features;
for example I used to use a wrapper which read options from a file and
injected them into the pandoc command line which I abandoned without
hesitation when default files were implemented, but I would request a new
feature only as a last resort when things can't be done with what is
already there.

-- 
Better --help|less than helpless

Den fre 20 nov. 2020 22:48periodicpoint <entscheidbarkeit-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> skrev:

> Thank you for the clarification. Yes, of course I fully understand that
> fact. However, my question or my suggestion (`input-dir:
> "/pat/to/inputfiles/"`) remains completely unaffected by this fact. See my
> messages above.
> On Friday, November 20, 2020 at 5:46:20 PM UTC+1 BP wrote:
>
>> Just to clarify: you don't *have to* give the input/output files in the
>> defaults file just because you are using a defaults file. You can still
>> give the files on the command line using shell globbing and have
>> everything/anything else in the defaults file. That's why they are called
>> defaults: you can override them on the command line.
>>
>> --
>> Better --help|less than helpless
>>
>> Den tors 19 nov. 2020 23:37John MacFarlane <j...-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> skrev:
>>
>>>
>>> Why not just specify the input files on the command line?
>>> Then you can use shell expansion:  file*.md
>>>
>>> periodicpoint <entschei...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
>>>
>>> > Thank you very much for the quick response.
>>> >
>>> > Personally, I think it would be a nice simple feature. It would make
>>> things
>>> > much easier in cases of large projects (such as dissertations) where
>>> the
>>> > input files change frequently.
>>> >
>>> > Would you mind if I create a corresponding fearture rerquest?
>>> >
>>> > On Thursday, November 19, 2020 at 6:59:51 PM UTC+1 John MacFarlane
>>> wrote:
>>> >
>>> >>
>>> >> periodicpoint <entschei...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
>>> >>
>>> >> > "
>>> >> > input-files:
>>> >> > - 'file1.md'
>>> >> > - 'file2.md'
>>> >> > - 'file3.md'
>>> >> > "
>>> >> >
>>> >> > Is there an option like “input-files: ["*"]” to include all input
>>> files
>>> >> > within a directory?
>>> >>
>>> >> No, there isn't.
>>> >>
>>> >
>>> > --
>>> > 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-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>>> > To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/pandoc-discuss/69f5620d-6fe5-4a80-920a-8125ed7c6ec2n%40googlegroups.com
>>> .
>>>
>>> --
>>> 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-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>>>
>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/pandoc-discuss/m2ft55geix.fsf%40MacBook-Pro.hsd1.ca.comcast.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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pandoc-discuss/ffdbcb61-fc16-4b6c-a530-a8172dd4da3fn%40googlegroups.com
> <https://groups.google.com/d/msgid/pandoc-discuss/ffdbcb61-fc16-4b6c-a530-a8172dd4da3fn%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/CADAJKhDqtoDj2ruqN7aEmeb%2B7vdVq-K8mYMyAKy%3DPGRPdhgSxg%40mail.gmail.com.

[-- Attachment #2: Type: text/html, Size: 6611 bytes --]

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

* Re: Wildcard for multiple input files in the defaults file variable "input-files"
       [not found]                         ` <CADAJKhDqtoDj2ruqN7aEmeb+7vdVq-K8mYMyAKy=PGRPdhgSxg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2020-11-23 16:20                           ` Daniel Staal
       [not found]                             ` <6d2e0c8e-ce58-ffb2-e21d-bbdb64437aee-Jdbf3xiKgS8@public.gmane.org>
  0 siblings, 1 reply; 14+ messages in thread
From: Daniel Staal @ 2020-11-23 16:20 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

On 11/20/20 5:26 PM, BPJ wrote:
> An `input-dir` field in default files would be nice to have, but I 
> generally prefer to find solutions using what is already there rather 
> than yearning for as yet not existing nice-to-have features. Things tend 
> to get done sooner that way. This doesn't mean that I'm opposed to new 
> features; for example I used to use a wrapper which read options from a 
> file and injected them into the pandoc command line which I abandoned 
> without hesitation when default files were implemented, but I would 
> request a new feature only as a last resort when things can't be done 
> with what is already there.

Honestly, this request seems to be the type of thing `make` was designed 
for...

Daniel T. Staal

-- 
---------------------------------------------------------------
This email copyright the author.  Unless otherwise noted, you
are expressly allowed to retransmit, quote, or otherwise use
the contents for non-commercial purposes.  This copyright will
expire 5 years after the author's death, or in 30 years,
whichever is longer, unless such a period is in excess of
local copyright law.
---------------------------------------------------------------


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

* Re: Wildcard for multiple input files in the defaults file variable "input-files"
       [not found]                             ` <6d2e0c8e-ce58-ffb2-e21d-bbdb64437aee-Jdbf3xiKgS8@public.gmane.org>
@ 2020-11-23 17:51                               ` periodicpoint
       [not found]                                 ` <18006866-44bf-4b7c-86f0-b669cd434c8en-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 14+ messages in thread
From: periodicpoint @ 2020-11-23 17:51 UTC (permalink / raw)
  To: pandoc-discuss


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

I have described the problem and outlined a possible solution. However, it 
is quite possible that I have not made myself clear enough. Please let me 
try again.

Of course, I am aware of 'make' as well as globbing and that the problem 
described can be easily solved outside pandoc. What I am interested in is a 
solution that works with pandoc itself. I am aware that my feature request 
is just a nice to have. But I think it is a very nice to have and easy to 
implement, as far as I can tell.

*State of the art, the `--defaults' feature*
In the shell, the input files can be specified directly without the 
`--defaults' option (`pandoc input1.md input2.md -o output.pdf') or many 
files in a directory can be globbed with the wildcard character `*' 
(`pandoc *.md -o output.pdf').

Pandoc allows you to conveniently list frequently used shell options in a 
single defaults file. Examples are `cite-method:` or `filters:`.
In the defaults file you can easily specify the input files: 'input-files: 
-input1.md, -input2.md'.

The elegance of this approach lies in its simplicity. Pandoc can be called 
with a single option, namely 'pandoc --defaults="/path/to/defaults/`. 
Templating becomes so incredibly simple.

*The problem*
In larger projects like dissertations, the file names of the input files 
often change, old files are deleted and new ones are added. In such cases 
it is useful and helpful to give all files in one directory by default. But 
if you want to transfer all files in a directory as input, you cannot use 
the `input-files:` variable in the defaults file you have to use the shell 
again.

*Proposed solution*
One way to solve this problem would be to introduce a shell option and 
corresponding defaults variable, that takes in all input files as a 
directory path. This option or variable could be called: `input-dir: 
`/path/to/input_files/`.

This solution has at least the following three advantages:
1. It is a clean pandoc internal solution for a common requirement when 
writing with pandoc.
2. It is possible to continue to use a defaults file even if the input 
files change frequently, without having to constantly change the variable 
"input-files:`".
3. Templating remains clean and simple even for larger projects.

I understand the previous objections. Some of them are valid. I understand 
that such a feature is not a high priority. Of course, it is just a 
proposal.

In any case, thank you for your time.

On Monday, November 23, 2020 at 5:20:08 PM UTC+1 DSt...-Jdbf3xiKgS8@public.gmane.org wrote:

> On 11/20/20 5:26 PM, BPJ wrote:
> > An `input-dir` field in default files would be nice to have, but I 
> > generally prefer to find solutions using what is already there rather 
> > than yearning for as yet not existing nice-to-have features. Things tend 
> > to get done sooner that way. This doesn't mean that I'm opposed to new 
> > features; for example I used to use a wrapper which read options from a 
> > file and injected them into the pandoc command line which I abandoned 
> > without hesitation when default files were implemented, but I would 
> > request a new feature only as a last resort when things can't be done 
> > with what is already there.
>
> Honestly, this request seems to be the type of thing `make` was designed 
> for...
>
> Daniel T. Staal
>
> -- 
> ---------------------------------------------------------------
> This email copyright the author. Unless otherwise noted, you
> are expressly allowed to retransmit, quote, or otherwise use
> the contents for non-commercial purposes. This copyright will
> expire 5 years after the author's death, or in 30 years,
> whichever is longer, unless such a period is in excess of
> local copyright law.
> ---------------------------------------------------------------
>

-- 
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/18006866-44bf-4b7c-86f0-b669cd434c8en%40googlegroups.com.

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

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

* Re: Wildcard for multiple input files in the defaults file variable "input-files"
       [not found]                                 ` <18006866-44bf-4b7c-86f0-b669cd434c8en-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2020-11-23 18:08                                   ` John MacFarlane
       [not found]                                     ` <m2y2isc5fj.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org>
  0 siblings, 1 reply; 14+ messages in thread
From: John MacFarlane @ 2020-11-23 18:08 UTC (permalink / raw)
  To: periodicpoint, pandoc-discuss

periodicpoint <entscheidbarkeit-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:

> *The problem*
> In larger projects like dissertations, the file names of the input files 
> often change, old files are deleted and new ones are added. In such cases 
> it is useful and helpful to give all files in one directory by default. But 
> if you want to transfer all files in a directory as input, you cannot use 
> the `input-files:` variable in the defaults file you have to use the shell 
> again.

Personally, I think it's a good idea to hard-code all the files
you need in the defaults file.  Otherwise, inadvertently adding
a file to the directory may lead to an unexpected new section of
your dissertation.  Of course, I understand why you might
want this nonetheless.

> *Proposed solution*
> One way to solve this problem would be to introduce a shell option and 
> corresponding defaults variable, that takes in all input files as a 
> directory path. This option or variable could be called: `input-dir: 
> `/path/to/input_files/`.
>
> This solution has at least the following three advantages:
> 1. It is a clean pandoc internal solution for a common requirement when 
> writing with pandoc.
> 2. It is possible to continue to use a defaults file even if the input 
> files change frequently, without having to constantly change the variable 
> "input-files:`".
> 3. Templating remains clean and simple even for larger projects.

I'd like to avoid this; to me it seems to mix shell functions
with pandoc functions, and it will give crazy results if you
have a mix of, say, markdown and image files in a directory.


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

* Re: Wildcard for multiple input files in the defaults file variable "input-files"
       [not found]                                     ` <m2y2isc5fj.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org>
@ 2020-11-23 18:35                                       ` periodicpoint
  0 siblings, 0 replies; 14+ messages in thread
From: periodicpoint @ 2020-11-23 18:35 UTC (permalink / raw)
  To: pandoc-discuss


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

Okay, those are reasonable objections. Thank you very much for your 
assessment, I really appreciate it.

On Monday, November 23, 2020 at 7:08:18 PM UTC+1 John MacFarlane wrote:

> periodicpoint <entschei...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
>
> > *The problem*
> > In larger projects like dissertations, the file names of the input files 
> > often change, old files are deleted and new ones are added. In such 
> cases 
> > it is useful and helpful to give all files in one directory by default. 
> But 
> > if you want to transfer all files in a directory as input, you cannot 
> use 
> > the `input-files:` variable in the defaults file you have to use the 
> shell 
> > again.
>
> Personally, I think it's a good idea to hard-code all the files
> you need in the defaults file. Otherwise, inadvertently adding
> a file to the directory may lead to an unexpected new section of
> your dissertation. Of course, I understand why you might
> want this nonetheless.
>
> > *Proposed solution*
> > One way to solve this problem would be to introduce a shell option and 
> > corresponding defaults variable, that takes in all input files as a 
> > directory path. This option or variable could be called: `input-dir: 
> > `/path/to/input_files/`.
> >
> > This solution has at least the following three advantages:
> > 1. It is a clean pandoc internal solution for a common requirement when 
> > writing with pandoc.
> > 2. It is possible to continue to use a defaults file even if the input 
> > files change frequently, without having to constantly change the 
> variable 
> > "input-files:`".
> > 3. Templating remains clean and simple even for larger projects.
>
> I'd like to avoid this; to me it seems to mix shell functions
> with pandoc functions, and it will give crazy results if you
> have a mix of, say, markdown and image files in a directory.
>
>

-- 
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/3df547bc-a679-4fd1-9736-027b806f25dfn%40googlegroups.com.

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

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

end of thread, other threads:[~2020-11-23 18:35 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-18 21:05 Wildcard for multiple input files in the defaults file variable "input-files" periodicpoint
     [not found] ` <877c4243-b6d8-4a9b-b763-24e361cd8576n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2020-11-19 17:59   ` John MacFarlane
     [not found]     ` <m2pn49448q.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org>
2020-11-19 21:32       ` periodicpoint
     [not found]         ` <69f5620d-6fe5-4a80-920a-8125ed7c6ec2n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2020-11-19 21:55           ` Albert Krewinkel
2020-11-19 22:33           ` AW: " denis.maier-FfwAq0itz3ofv37vnLkPlQ
2020-11-19 22:36           ` John MacFarlane
     [not found]             ` <m2ft55geix.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org>
2020-11-20 12:08               ` periodicpoint
2020-11-20 16:46               ` BPJ
     [not found]                 ` <CADAJKhDh7Cr1gHCRvP=NhCMLcbj6aF8rMnn4c+9Oo1Fk42DazA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2020-11-20 21:47                   ` periodicpoint
     [not found]                     ` <ffdbcb61-fc16-4b6c-a530-a8172dd4da3fn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2020-11-20 22:26                       ` BPJ
     [not found]                         ` <CADAJKhDqtoDj2ruqN7aEmeb+7vdVq-K8mYMyAKy=PGRPdhgSxg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2020-11-23 16:20                           ` Daniel Staal
     [not found]                             ` <6d2e0c8e-ce58-ffb2-e21d-bbdb64437aee-Jdbf3xiKgS8@public.gmane.org>
2020-11-23 17:51                               ` periodicpoint
     [not found]                                 ` <18006866-44bf-4b7c-86f0-b669cd434c8en-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2020-11-23 18:08                                   ` John MacFarlane
     [not found]                                     ` <m2y2isc5fj.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org>
2020-11-23 18:35                                       ` periodicpoint

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