This is the pandocl Reference Manual, version 0.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 07:14:25 2024 GMT+0.
The main system appears first, followed by any subsystem dependency.
pandocl
A universal document converter.
Fernando Borretti <eudoxiahp@gmail.com>
Fernando Borretti <eudoxiahp@gmail.com>
(GIT )
MIT
# Pandocl
A document converter built on [CommonDoc][cdoc].
# Usage
## Converting
The ‘convert‘ function takes two required arguments: The pathname of the input
and the pathname of the output. Two optional keyword arguments, ‘:input-format‘
and ‘:output-format‘, can be used to specify the format when the pathname is not
enough to guess. It returns the parsed document.
“‘lisp
CL-USER> (pandocl:convert #p"input.tex" #p"output.html")
#<COMMON-DOC:DOCUMENT "My Document">
CL-USER> (pandocl:emit #p"input.tex" #p"output.html"
:input-format :vertex
:output-format :html)
#<COMMON-DOC:DOCUMENT "My Document">
“‘
## Parsing
The ‘parse‘ function takes a pathname and optionally an input format (Otherwise
it guesses it from the pathname) and returns a CommonDoc document.
“‘lisp
CL-USER> (pandocl:parse #p"path/to/doc.tex")
#<COMMON-DOC:DOCUMENT "My Document">
CL-USER> (pandocl:parse #p"path/to/doc.tex" :format :vertex)
#<COMMON-DOC:DOCUMENT "My Document">
“‘
## Emitting
The ‘emit‘ function takes a document, a pathname to write it to, and optionally
a format for the output (Otherwise it tries to guess from the pathname). It
takes an extra two keyword arguments, ‘:if-exists‘ and ‘:if-does-not-exist‘,
which control behaviour when opening the file (See [with-open-file][w-o-f]). The
function returns the document.
“‘lisp
CL-USER> (pandocl:emit doc #p"path/to/output.html")
#<COMMON-DOC:DOCUMENT "My Document">
CL-USER> (pandocl:emit doc #p"path/to/output.html" :format :html)
#<COMMON-DOC:DOCUMENT "My Document">
“‘
# Formats
## Supported
Supported input formats:
* [‘:vertex‘](https://github.com/CommonDoc/vertex)
* [‘:scriba‘](https://github.com/CommonDoc/scriba)
Supported output formats:
* [‘:html‘](https://github.com/CommonDoc/common-html)
## File extensions
When Pandocl tries to guess which format to use from a pathname type, it uses
the following rules:
* ‘.tex‘: VerTeX
* ‘.scr‘: Scriba
* ‘.html‘: HTML
[cdoc]: https://github.com/CommonDoc/common-doc
[w-o-f]: http://www.lispworks.com/documentation/HyperSpec/Body/m_w_open.htm#with-open-file
# License
Copyright (c) 2015 Fernando Borretti
Licensed under the MIT License.
0.1
common-doc
(system).
common-doc-contrib
(system).
vertex
(system).
scriba
(system).
parenml
(system).
thorn
(system).
common-html
(system).
src
(module).
Modules are listed depth-first from the system components tree.
Files are sorted by type and then listed depth-first from the systems components trees.
pandocl/src/pandocl.lisp
src
(module).
convert
(function).
emit
(function).
guess-format
(function).
pandocl-error
(condition).
parse
(function).
parse-string
(function).
unknown-file-extension
(condition).
unsupported-format
(condition).
+format-class-map+
(special variable).
+format-extension-map+
(special variable).
+supported-input-formats+
(special variable).
+supported-output-formats+
(special variable).
check-supported-format
(function).
check-supported-input-format
(function).
check-supported-output-format
(function).
extension
(reader method).
find-format
(function).
format-name
(reader method).
Packages are listed by definition order.
pandocl
common-lisp
.
convert
(function).
emit
(function).
guess-format
(function).
pandocl-error
(condition).
parse
(function).
parse-string
(function).
unknown-file-extension
(condition).
unsupported-format
(condition).
+format-class-map+
(special variable).
+format-extension-map+
(special variable).
+supported-input-formats+
(special variable).
+supported-output-formats+
(special variable).
check-supported-format
(function).
check-supported-input-format
(function).
check-supported-output-format
(function).
extension
(generic reader).
find-format
(function).
format-name
(generic reader).
Definitions are sorted by export status, category, package, and then by lexicographic order.
Convert a file to another format.
Dump a document to a file, optionally specifying an output format.
Try to guess the CommonDoc format from a pathname, or signal unknown-file-extension.
Parse a document from a file, optionally specifying an input format.
Parse a string, necessarily specifying an input format.
The base class of Pandocl-related errors.
condition
.
Signalled when Pandocl tries to guess a file format from a file extension and fails.
Signalled when a user-specified format is not known.
The name of the format.
:format-name
This slot is read-only.
A plist of format names to classes.
A list of file extensions to format names.
A list of supported input formats.
A list of supported output formats.
If the input format is not supported, raise unsupported-format.
If the output format is not supported, raise unsupported-format.
Find the class corresponding to a format name.
unknown-file-extension
)) ¶unsupported-format
)) ¶Jump to: | C E F G M P |
---|
Jump to: | C E F G M P |
---|
Jump to: | +
E F S |
---|
Jump to: | +
E F S |
---|
Jump to: | C F M P S U |
---|
Jump to: | C F M P S U |
---|