John MacFarlane
71e76175be
getT2TMeta: Take list of source files instead of single.
...
Get latest modification time.
2014-07-30 17:25:00 -07:00
John MacFarlane
e4913d6dba
Allow --self-contained to get content from MediaBag.
...
Added a parameter to makeSelfContained (API change).
2014-07-30 15:26:40 -07:00
John MacFarlane
234652a4b8
PDF, Docx, EPUB, and ODT writers now automatically use MediaBag.
...
The MediaBag is thread through from the reader, with no need
to extract to files.
2014-07-30 14:07:31 -07:00
John MacFarlane
77aa72ec24
pandoc: Thread media bag into WriterOptions.
...
This will make it available to docx and epub readers, etc.,
so we don't have to extract media to a directory when going
from docx -> epub.
2014-07-30 13:20:44 -07:00
John MacFarlane
b5210bc175
Added --extract-media option.
...
This has been documented to affect the epub and docx readers, so
we should either add the epub reader before the next release or
change the documentation.
2014-07-30 11:44:25 -07:00
Jesse Rosenthal
f733b50150
Make toplevel pandoc bin make use of mediabag.
...
Note that at the moment the mediabag is discarded. This will have to be
changed to make use of it.
2014-07-30 12:48:07 -04:00
Matthew Pickering
43304d6bd6
Txt2Tags Reader: Added recognition of macros
2014-07-27 00:12:56 +01:00
Matthew Pickering
ab3589ff0b
Txt2Tags Reader: Integrated into pandoc
2014-07-27 00:12:56 +01:00
Clare Macrae
3cb76d9560
Merge branch 'master' of git://github.com/jgm/pandoc into dokuwiki
2014-07-01 22:10:08 +01:00
John MacFarlane
264e366f1a
Filters: respect shebang if filter is executable.
...
Closes #1389 .
2014-06-30 14:03:47 -07:00
Clare Macrae
717e16660d
Merge remote-tracking branch 'jgm/master' into dokuwiki
2014-06-29 19:22:31 +01:00
John MacFarlane
b1a8f1fa1a
Fixed --filter
so it doesn't search PATH for a filter with a path.
...
This fixed a bug wherein `--filter ./caps.py` would run `caps.py` from
the system path, even if there was a `caps.py` in the working directory.
2014-06-27 18:30:57 -07:00
Jesse Rosenthal
aa194d387c
Add track changes option to command line.
2014-06-25 14:09:01 -04:00
John MacFarlane
08fe16e972
Fixed compiler warnings.
2014-06-21 11:26:43 -07:00
John MacFarlane
f5c8b05a1a
Filters: don't print misleading error message.
...
Previously pandoc would say that a filter was not found,
even in a case where the filter had a syntax error.
2014-06-20 23:08:00 -07:00
mpickering
3bc818d2d3
Integrated the docx reader into the main pandoc program.
...
Changes also include generalising the types of reader allowed. The
mechanism now mimics the more general output mechanism.
2014-06-16 07:18:40 -04:00
Albert Krewinkel
8fdbef841d
Update copyright notices for 2014, add missing notices
2014-05-09 00:46:08 +02:00
John MacFarlane
5dfeb5d52f
Allow html4 as synonym of html as reader.
...
It already worked for writer.
2014-04-27 21:01:30 -07:00
John MacFarlane
c8f97d3d41
Fix #1267 .
...
We now check the writerName for a lua script in pandoc.hs, so that
lowercasing and format parsing aren't done. Note this behavior
change: getWriter in Text.Pandoc no longer returns a custom writer on
input "foo.lua".
2014-04-27 20:56:50 -07:00
John MacFarlane
f80678df7f
A bit of refactoring that shouldn't change any semantics.
...
In preparation for a fix to #1267 .
2014-04-27 20:38:15 -07:00
John MacFarlane
11120d619b
Give more useful error message if '-t pdf' is specified.
...
Closes #1155 .
2014-04-05 23:44:57 -07:00
John MacFarlane
3fe6b57b60
Make it possible to run filters that aren't executable.
...
Pandoc first tries to find the executable (searching the path
if path isn't given). If it fails, but the file exists and has
a .py, .pl, .rb, .hs, or .php extension, pandoc runs the filter
using the appropriate interpreter.
This should make it easier to use filters on Windows, and make
it more convenient for everyone.
Closes #1096 .
2014-04-05 15:51:04 -07:00
John MacFarlane
3df75bc160
PDF: Changes to error reporting, to handle non-UTF8 error output.
2014-03-19 11:09:36 -07:00
Albert Krewinkel
24b2ac43b0
Add a simple Emacs Org-mode reader
...
The basic structure of org-mode documents is recognized; however,
org-mode features like todo markers, tags etc. are not supported yet.
2014-03-04 10:40:40 +01:00
John MacFarlane
69f7b1dbf3
Added readerTrace to ReaderOptions, --trace command line opt.
...
This is to debug backtracking-related parsing bugs.
So far it is only implemented for markdown, but it would
be good to extend it to latex and html readers.
2014-02-25 22:43:58 -08:00
John MacFarlane
9ae10b4352
The --bibliography
option now sets the biblio-files
variable.
...
So, if you're using `--natbib` or `--biblatex`, you can just use
`--bibliography=foo.bib` instead of `-V bibliofiles=foo`.
2014-01-03 10:11:21 -08:00
John MacFarlane
36cda45d70
Merge pull request #1005 from nougad/consistent_bibliography
...
Don't add pandoc-citeproc filter if natbib or biblatex is used
2014-01-02 21:15:41 -08:00
Henry de Valence
f6d151889c
HLint: redundant parens
...
Remove parens enclosing a single element.
2013-12-19 20:43:25 -05:00
Henry de Valence
0c5e7cf8cb
HLint: use elem
and notElem
...
Replaces long conditional chains with calls to `elem` and `notElem`.
2013-12-19 20:19:24 -05:00
John MacFarlane
9b6f1fc495
Allow https: to work in pandoc command line arguments.
...
(Use openURL from Shared instead of simpleHTTP.)
2013-12-05 11:28:22 -08:00
John MacFarlane
bc6bb3be5c
Allow "epub2" as synonym for "epub", "html4" for "html".
2013-11-30 15:36:18 -08:00
John MacFarlane
f2f8ddabc8
Don't look for slidy files in data files w/ --self-contained.
2013-10-21 11:24:25 -07:00
Florian Eitel
e24963ade6
Fixed stupid copy&paste error
...
How could this happend? sry
2013-09-30 16:56:31 +02:00
Florian Eitel
a26d25a80b
Don't add pandoc-citeproc filter if natbib or biblatex is used
...
See https://github.com/jgm/pandoc-templates/issues/42
2013-09-30 15:55:59 +02:00
John MacFarlane
652f9a88f4
Handle Boolean values in --metadata
.
...
Note that anything not parseable as a YAML boolean or string
is treated as a literal string.
Note that you can still get a string value with "yes" or any
of the strings interpretable as booleans:
-M boolvalue=yes -M stringvalue='"yes"'
2013-09-19 20:21:35 -07:00
John MacFarlane
3397af30e4
More informative error when a filter is not found in path.
...
No more "resource vanished (broken pipe)"!
2013-09-17 21:38:34 -07:00
John MacFarlane
32afe85754
Allow --metadata
to be repeated for the same key to form a list.
...
This also has the effect that `--bibliography` can be repeated,
as before.
2013-09-17 21:04:27 -07:00
John MacFarlane
479cefa4c2
More robust check for '-F pandoc-filters', allowing pathnames.
2013-09-14 16:01:41 -07:00
John MacFarlane
d47eadaf56
--bibliography
again implies -F pandoc-citeproc
.
...
But only if pandoc-citeproc isn't already specified as a filter.
2013-09-10 20:23:03 -07:00
John MacFarlane
4381c37b10
--bibliography
no longer implies -F pandoc-citeproc
.
...
This could lead to double filtering if the user specifies `-F`
too.
2013-09-08 22:46:30 -07:00
John MacFarlane
8977b2aaed
Changed --metadata to return Boolean True if no value.
...
Also documented in README.
2013-09-01 16:22:40 -07:00
John MacFarlane
1240edbc3b
Change for latest pandoc-citeproc.
2013-09-01 16:09:00 -07:00
John MacFarlane
39cdafd505
Restore --bibliography, --csl, --citation-abbreviations.
...
These are now implemented as:
--bibliography FILE => --metadata bibliography=FILE --filter pandoc-citeproc
--csl FILE => --metadata csl=FILE
--citation-abbreviations FILE => --metadata csl-abbreviations=FILE
2013-09-01 15:54:48 -07:00
John MacFarlane
53f61019e2
Added --metadata/-M
option.
...
This is like `--variable/-V`, but actually adds to metadata, not
just variables.
2013-09-01 15:40:28 -07:00
John MacFarlane
a68805bebd
Added -F
as shortcut for --filter
.
2013-08-25 07:47:22 -07:00
John MacFarlane
deb59b6235
Removed dependency on citeproc-hs.
...
Going forward we'll use pandoc-citeproc, as an external filter.
The `--bibliography`, `--csl`, and `--citation-abbreviation` fields
have been removed. Instead one must include `bibliography`, `csl`,
or `csl-abbrevs` fields in the document's YAML metadata. The filter
can then be used as follows:
pandoc --filter pandoc-citeproc
The `Text.Pandoc.Biblio` module has been removed. Henceforth,
`Text.CSL.Pandoc` from pandoc-citations can be used by library users.
The Markdown and LaTeX readers now longer format bibliographies and
citations. That must be done using `processCites` or `processCites'`
from Text.CSL.Pandoc.
All bibliography-related fields have been removed from `ReaderOptions`
and `WriterOptions`: `writerBiblioFiles`, `readerReferences`,
`readerCitationStyle`.
API change.
2013-08-24 22:33:01 -07:00
John MacFarlane
6e222ce225
Improved error reporting on filters.
...
Avoid showing spurious output and avoid double error messages.
2013-08-24 12:54:39 -07:00
John MacFarlane
8926230175
Print stderr output of filters to stderr.
2013-08-14 13:02:54 -07:00
John MacFarlane
f6b5735d09
Added module for writing python scripts, with several examples.
...
See scripts subdirectory.
2013-08-13 23:11:33 -07:00
John MacFarlane
bd73d73a28
Removed --print-sample-lua-writer
, added --print-default-data-file
.
...
Closes #943 .
2013-08-13 18:29:57 -07:00