public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Here is a building system for complex pandoc documents, testing needed
@ 2017-05-11  7:59 lf-araujo
       [not found] ` <83a45d4b-4b18-4cbf-868a-45324849a3a7-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: lf-araujo @ 2017-05-11  7:59 UTC (permalink / raw)
  To: pandoc-discuss


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



Hi everyone,

I have been working in a small utility that standardizes the folder 
structure for the production of complex pandoc documents. I have tested it 
in about 20 projects of mine and only now feel more comfortable sharing. 
Could you please explore and test? I am open for suggestions.

You can go get you hands dirty right away with:


wget http://tiny.cc/mighty_make -O Makefile

And run make help, or read about the project here 
<https://lf-araujo.github.io/lf-araujo.github.io/2017/04/08/mightymake.html>
.

Best,

lf
​

-- 
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/83a45d4b-4b18-4cbf-868a-45324849a3a7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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

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

* Re: Here is a building system for complex pandoc documents, testing needed
       [not found] ` <83a45d4b-4b18-4cbf-868a-45324849a3a7-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2017-05-11  8:42   ` John MacFarlane
  2017-08-28  2:20   ` lf-araujo
  1 sibling, 0 replies; 3+ messages in thread
From: John MacFarlane @ 2017-05-11  8:42 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

Looks useful. I suggest you add a link to it here:
https://github.com/jgm/pandoc/wiki/Pandoc-Extras
under Workflow I suppose.

+++ lf-araujo [May 11 17 00:59 ]:
>   Hi everyone,
>
>   I have been working in a small utility that standardizes the folder
>   structure for the production of complex pandoc documents. I have tested
>   it in about 20 projects of mine and only now feel more comfortable
>   sharing. Could you please explore and test? I am open for suggestions.
>
>   You can go get you hands dirty right away with:
>wget http://tiny.cc/mighty_make -O Makefile
>
>   And run make help, or read about the project [1]here.
>
>   Best,
>
>   lf
>   ​
>
>   --
>   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 [2]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>   To post to this group, send email to
>   [3]pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>   To view this discussion on the web visit
>   [4]https://groups.google.com/d/msgid/pandoc-discuss/83a45d4b-4b18-4cbf-
>   868a-45324849a3a7%40googlegroups.com.
>   For more options, visit [5]https://groups.google.com/d/optout.
>
>References
>
>   1. https://lf-araujo.github.io/lf-araujo.github.io/2017/04/08/mightymake.html
>   2. mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>   3. mailto:pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>   4. https://groups.google.com/d/msgid/pandoc-discuss/83a45d4b-4b18-4cbf-868a-45324849a3a7-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org?utm_medium=email&utm_source=footer
>   5. https://groups.google.com/d/optout

-- 
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/20170511084230.GG20236%40Administrateurs-iMac-3.local.
For more options, visit https://groups.google.com/d/optout.


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

* Re: Here is a building system for complex pandoc documents, testing needed
       [not found] ` <83a45d4b-4b18-4cbf-868a-45324849a3a7-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  2017-05-11  8:42   ` John MacFarlane
@ 2017-08-28  2:20   ` lf-araujo
  1 sibling, 0 replies; 3+ messages in thread
From: lf-araujo @ 2017-08-28  2:20 UTC (permalink / raw)
  To: pandoc-discuss


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



Hi,

Sorry for bumping this discussion. I am updating a builder I published in 
May, now with support for GNUMake in windows. I don’t run Windows in any 
machine or know anyone who runs it currently. Could anyone who have a 
Windows machine test the below code? There is one line that might cause 
errors, but shouldn’t crash the builder. It’s the if [[ "$OSTYPE" == 
"darwin" ]]; then open $@; else xdg-open $@;fi line. To test, only save the 
code as a Makefile in the same directory as gnumake.exe, create any simple 
test .md file in a subdirectory /source, and run it with make or make pdf. 

Examples of how to use the builder can be found here 
<https://lf-araujo.github.io/2017/08/14/mmv1.html>.


.DEFAULT_GOAL := pdf              






MD = $(wildcard source/*.md)              


PDF = output/$(notdir $(CURDIR)).pdf              


TEX = output/$(notdir $(CURDIR)).tex              


DOCX = output/$(notdir $(CURDIR)).docx              


HTML5 = output/$(notdir $(CURDIR)).html              


EPUB = output/$(notdir $(CURDIR)).epub              


BEAMER = output/$(notdir $(CURDIR))-presentation.pdf              






FILFILES = $(wildcard style/*.py)              


FILTERS := $(foreach FILFILES, $(FILFILES), --filter $(FILFILES))              


TEXFLAGS = -F pandoc-crossref -F pandoc-citeproc --latex-engine=xelatex              






ifneq ("$(wildcard style/template.tex)","")              


    TEXTEMPLATE := "--template=style/template.tex"              


endif              


ifneq ("$(wildcard style/reference.docx)","")              


    DOCXTEMPLATE := "--reference-docx=style/reference.docx"              


endif              


ifneq ("$(wildcard style/style.css)","")              


    CSS := "--include-in-header=style/style.css"              


endif              






help:              


    @echo '                                                                       '              


    @echo 'Makefile for automated typography using pandoc.                         '              


    @echo 'Version 1.1                        '              


    @echo '                                                                       '              


    @echo 'Usage:                                                                 '              


    @echo '   make prepare    first time use, setting the directories     '              


    @echo '   make html       generate a web version             '              


    @echo '   make pdf        generate a PDF file                '              


    @echo '   make docx       generate a Docx file               '              


    @echo '   make tex        generate a Latex file               '              


    @echo '   make beamer     generate a beamer presentation               '              


    @echo '   make all        generate all files                 '              


    @echo '   make update     update the makefile to last version       '              


    @echo '   make            will fallback to PDF               '              


    @echo '                                                                       '              


    @echo 'It implies some directories in the filesystem: source, output and style'              


    @echo 'It also implies that the bibliography will be defined via the yaml      '              


    @echo '                                                                       '              


    @echo 'Depends on pandoc-citeproc and pandoc-crossref                          '              


    @echo 'Get local templates with: pandoc -D latex/html/etc                       '              


    @echo '                                                                       '              














all : tex docx html5 epub pdf              










pdf:$(PDF)              


$(PDF): $(MD)              


    pandoc -o $@ source/*.md $(TEXTEMPLATE) $(TEXFLAGS) $(FILTERS) 2>output/pdf.log              


    if [[ "$OSTYPE" == "darwin" ]]; then open $@; else xdg-open $@;fi              






tex: $(TEX)              


$(TEX): $(MD)              


    pandoc -o $@ source/*.md $(TEXFLAGS) 2>output/tex.log              


    if [[ "$OSTYPE" == "darwin" ]]; then open $@; else xdg-open $@;fi              






docx: $(DOCX)              


$(DOCX): $(MD)              


    pandoc -o $@ source/*.md $(TEXFLAGS) $(DOCXTEMPLATE) --toc 2>output/docx.log              


    if [[ "$OSTYPE" == "darwin" ]]; then open $@; else xdg-open $@;fi              






html5: $(HTML5)              


$(HTML5): $(MD)              


    pandoc -o $@ source/*.md $(CSS) $(TEXFLAGS) --toc -t html5 2>output/html5.log              


    if [[ "$OSTYPE" == "darwin" ]]; then open $@; else xdg-open $@;fi              






epub: $(EPUB)              


$(EPUB): $(MD)              


    pandoc -o $@ source/*.md $(TEXFLAGS) --toc 2>output/epub.log              


    if [[ "$OSTYPE" == "darwin" ]]; then open $@; else xdg-open $@;fi              






beamer: $(BEAMER)              


$(BEAMER): $(MD)              


    pandoc -o $@ source/*.md $(TEXFLAGS) --toc -t beamer 2>output/beamer.log              


    if [[ "$OSTYPE" == "darwin" ]]; then open $@; else xdg-open $@;fi              






prepare:              


    command -v pandoc >/dev/null 2>&1 || { echo "I require pandoc but it's not installed.  Aborting." >&2; exit 1; }              


    command -v pandoc-crossref >/dev/null 2>&1 || { echo "I require pandoc-crossref but it's not installed.  Aborting." >&2; exit 1; }              


    command -v pandoc-citeproc >/dev/null 2>&1 || { echo "I require pandoc-citeproc but it's not installed.  Aborting." >&2; exit 1; }              


    mkdir "output"              


    mkdir "source"              


    mkdir "style"              






update:              


    wget http://tiny.cc/mighty_make -O Makefile              






clean:              


    rm -f "output/" *.md *.html *.pdf *.tex *.docx *.epub              






.PHONY: help prepare update beamer clean

Thank you.
​

-- 
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/f6801b2d-39b8-43f2-8a99-afd1b4d353f8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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

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

end of thread, other threads:[~2017-08-28  2:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-11  7:59 Here is a building system for complex pandoc documents, testing needed lf-araujo
     [not found] ` <83a45d4b-4b18-4cbf-868a-45324849a3a7-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2017-05-11  8:42   ` John MacFarlane
2017-08-28  2:20   ` lf-araujo

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