Commit Graph
34 Commits
Author SHA1 Message Date
John MacFarlane f97ab76f81 Bump pandoc-cli to 0.1.1, depend on latest pandoc-lua-engine 2023-03-27 16:55:35 -07:00
Albert Krewinkel f9b6777a92 pandoc-cli: require hslua-cli-1.4.1
This fixes a bug where the program would not enter interactive mode if
`-v`, `-e`, or `-l` was used together with the `-i` command line flag.
2023-03-18 18:26:12 +01:00
Albert Krewinkel a23d14079c pandoc-cli: add a Lua REPL 2023-03-17 09:18:41 -07:00
Albert Krewinkel 0f7653cd10 Switch to hslua-2.3 2023-03-13 13:23:43 +01:00
Albert Krewinkel 28fa37e554 CI: test with GHC 9.2.5 and 9.4.4 2023-01-12 22:21:39 +01:00
Albert Krewinkel b55cd83a60 Update copyright years, it's 2023! 2023-01-10 20:28:27 +01:00
John MacFarlane 848f6b51b2 Text.Pandoc.App: Change parseOptionsFromArgs and parseOptions... (#8406)
They now return `Either OptInfo Opt`.

Add `OptInfo` type.

Add `handleOptInfo` function.  This performs the IO actions for
things like `--version` that were previously done in `parseOptionsFromArgs`.
An argument for a `ScriptingEngine` has been added, to facilitate
printing custom templates and custom extensions for Lua filters.
(However, at this stage nothing is yet done with it.)

[API change]
2022-11-02 19:07:22 -07:00
John MacFarlane 3e48d9701d Re-add TemplateHaskell pragma in pandoc-cli.
This was an hlint false positive.
2022-10-31 09:03:10 -07:00
John MacFarlane 8b3be07ae8 hlint suggestions. 2022-10-30 11:02:00 -07:00
John MacFarlane 135cfed2a3 Print starting server message to stderr instead of stdout. 2022-10-28 09:32:50 -07:00
John MacFarlane 552d3b42ae Issue message when starting up server indicating the port. 2022-10-28 09:30:24 -07:00
John MacFarlane 2e1f424daa Move defaultUserDataDir from T.P.Shared to T.P.Data [API change]. 2022-10-19 10:48:49 -07:00
John MacFarlane fde8635a18 Split Text.Pandoc.Version from Text.Pandoc.Shared.
This new module exports `pandocVersion` and `pandocVersionText`,
which are no longer exported from Text.Pandoc.Shared. [API change]

Also, we now set the `pandoc-version` variable centrally rather
than in the writers.  One effect is the man writer now emits
a comment with the pandoc version (this was intended before,
judging from the template, but it didn't happen because the
vairable wasn't set).
2022-10-19 09:16:13 -07:00
John MacFarlane f486fcde13 Rollback parameterize options on scripting engine.
Rolls back 0ab014ed1e.
We don't need this because we aren't needing to print the Lua
version in options any more; we're handling `--version` now at
the pandoc-cli level.
2022-10-13 17:59:49 -07:00
John MacFarlane 42b6e3907c Fix nightly flag build. 2022-10-01 09:56:50 -07:00
John MacFarlane 215d62ccd6 Remove build versions info from --version output. 2022-09-30 17:18:15 -07:00
John MacFarlane aa0e9c4d6e Move --version handling to pandoc-cli.
Print flag settings (lua, server) and versions of all relevant packages.
Add suffix for nightly builds.

Move `nightly` flag from pandoc to pandoc-cli.

Closes #8339.
2022-09-30 16:46:39 -07:00
Albert Krewinkel cfc2024d37 Use server as command to start the pandoc server 2022-09-30 18:41:51 +02:00
Albert Krewinkel b6a571d577 pandoc-cli: Allow building a binary without Lua support
Disabling the `lua` cabal flag will result in a binary without Lua.
2022-09-30 08:33:40 -07:00
Albert Krewinkel 5be9052f5f [API Change] Extract Lua code into new package pandoc-lua-engine
The flag 'lua53` must now be used with that package if pandoc is to be
compiled against Lua 5.3.
2022-09-30 08:33:40 -07:00
Albert Krewinkel 79980eee4a [API Change] Parameterize convertWithOpts over scripting engine. 2022-09-30 08:33:40 -07:00
Albert Krewinkel 0ab014ed1e [API Change] App: parameterize options over the scripting engine 2022-09-30 08:33:40 -07:00
Albert Krewinkel ddaadc88bc [API Change] Rename pandocVersion to pandocVersionText...
and add a new `pandocVersion` value with type `Version`. This is
consistent with the type used for `pandocTypesVersion` and allows to use
the value where a Version type is required.
2022-09-30 08:33:40 -07:00
John MacFarlane 9169eee7e1 Bump pandoc version to 3.0.
In light of the package splitting changes.
2022-09-29 08:18:02 -07:00
John MacFarlane fd1b3f2b6f Bump version to 2.20, depend on >= 2.20 in pandoc-cli, pandoc-server. 2022-09-28 08:50:11 -07:00
Albert Krewinkel efecff1f2f pandoc-cli: support -E flag in pandoc-lua 2022-09-27 08:42:27 -07:00
Albert Krewinkel 175b791529 pandoc-cli: support "lua" and "serve" as commands
Pandoc behaves like `pandoc-lua` and `pandoc-server` if the first
argument is `lua` and `serve`, respectively.
2022-09-27 08:42:27 -07:00
Albert Krewinkel a3fd6c674d pandoc-cli: update to hslua-cli-1.2 2022-09-27 08:42:27 -07:00
Albert Krewinkel 2bad9a9aa4 pandoc-cli: Avoid the CPP language extension
Alternative behavior for the *server* flag is implemented by using
separate modules.
2022-09-27 08:42:27 -07:00
Albert Krewinkel de0e3ff5f6 pandoc-lua: support more command line flags 2022-09-26 19:50:39 +02:00
John MacFarlane 13ee8b82da Add server flag to pandoc-cli.
This allows the executable to be built without support for
"server mode."
2022-09-26 09:25:54 -07:00
Albert Krewinkel e3648357cf Use hslua-cli package for pandoc-lua interface 2022-09-23 22:26:37 +02:00
Albert Krewinkel 22fa51ded1 Make pandoc behave like a Lua interpreter when called as pandoc-lua. (#8311) 2022-09-22 14:39:25 -07:00
John MacFarlane bd1d923b86 Split pandoc-server, pandoc-cli into separate packages. (#8309)
This also removes the unnecessary Setup.hs from pandoc.
Cabal does not need this with build-type 'simple'.
2022-09-22 09:47:07 -07:00