Struct pandoc::Pandoc
[−]
[src]
pub struct Pandoc { /* fields omitted */ }the argument builder
Methods
impl Pandoc[src]
fn new() -> Pandoc
Get a new Pandoc object This function returns a builder object to configure the Pandoc execution.
fn add_latex_path_hint<'p, T: AsRef<Path> + ?Sized>(&'p mut self,
path: &T)
-> &'p mut Pandoc
path: &T)
-> &'p mut Pandoc
this path is searched first for latex, then PATH, then some hardcoded hints
fn add_pandoc_path_hint<'p, T: AsRef<Path> + ?Sized>(&'p mut self,
path: &T)
-> &'p mut Pandoc
path: &T)
-> &'p mut Pandoc
this path is searched first for pandoc, then PATH, then some hardcoded hints
fn set_doc_class<'p>(&'p mut self, class: DocumentClass) -> &'p mut Pandoc
sets or overwrites the document-class
fn set_show_cmdline<'p>(&'p mut self, flag: bool) -> &'p mut Pandoc
Set whether Pandoc should print the used command-line
If set to true, the command-line to execute pandoc (as a subprocess) will be displayed on stdout.
fn set_output_format<'p>(&'p mut self, format: OutputFormat) -> &'p mut Pandoc
sets or overwrites the output format
fn set_input_format<'p>(&'p mut self, format: InputFormat) -> &'p mut Pandoc
sets or overwrites the input format
fn add_input<'p, T: AsRef<Path> + ?Sized>(&'p mut self,
filename: &T)
-> &'p mut Pandoc
filename: &T)
-> &'p mut Pandoc
adds more input files, the order is relevant the order of adding the files is the order in which they are processed
fn set_output<'p>(&'p mut self, output: OutputKind) -> &'p mut Pandoc
sets or overwrites the output filename
fn set_bibliography<'p, T: AsRef<Path> + ?Sized>(&'p mut self,
filename: &T)
-> &'p mut Pandoc
filename: &T)
-> &'p mut Pandoc
filename of the bibliography database
fn set_csl<'p, T: AsRef<Path> + ?Sized>(&'p mut self,
filename: &T)
-> &'p mut Pandoc
filename: &T)
-> &'p mut Pandoc
filename of a citation style file
fn set_toc<'p>(&'p mut self) -> &'p mut Pandoc
enable table of contents
fn set_chapters<'p>(&'p mut self) -> &'p mut Pandoc
enable chapters
fn set_number_sections<'p>(&'p mut self) -> &'p mut Pandoc
prefix section names with indices x.y.z
fn set_latex_template<'p, T: AsRef<Path> + ?Sized>(&'p mut self,
filename: &T)
-> &'p mut Pandoc
filename: &T)
-> &'p mut Pandoc
set a custom latex template
fn set_slide_level<'p>(&'p mut self, level: u32) -> &'p mut Pandoc
sets the header level that causes a new slide to be generated
fn set_variable<'p, T: AsRef<str> + ?Sized, U: AsRef<str> + ?Sized>(&'p mut self,
key: &T,
value: &U)
-> &'p mut Pandoc
key: &T,
value: &U)
-> &'p mut Pandoc
set a custom variable try not to use this, there are convenience functions for most things
fn add_filter<'p>(&'p mut self, filter: fn(String) -> String) -> &'p mut Pandoc
closures that take a json string and return a json string
fn add_option<'p>(&'p mut self, option: PandocOption) -> &'p mut Pandoc
fn add_options<'p>(&'p mut self, options: &[PandocOption]) -> &'p mut Pandoc
fn generate_latex_template<T: AsRef<str> + ?Sized>(self, filename: &T)
generate a latex template from the given settings
Warning: this function can panic in a lot of places.
fn execute(self) -> Result<PandocOutput, PandocError>
Execute the Pandoc configured command.
A successful Pandoc run can return either the path to a file written by
the operation, or the result of the operation from stdio.
The PandocOutput variant returned depends on the OutputKind
configured:
Trait Implementations
impl Default for Pandoc[src]
impl Clone for Pandoc[src]
fn clone(&self) -> Pandoc
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0
Performs copy-assignment from source. Read more