docite package

Subpackages

Submodules

docite.cli module

References

docite.cli.main(args: List[str]) None[source]

Wrapper allowing convert_with_refs() to be called with string arguments in a CLI fashion.

Parameters:

args (List[str]) – command line parameters as list of strings (for example ["--inputfile", "input.md"]).

docite.cli.parse_args(args: List[str]) Namespace[source]

Parse command line parameters

Parameters:

args (List[str]) – command line parameters as list of strings (for example ["--help"]).

Returns:

command line parameters namespace

Return type:

argparse.Namespace

docite.cli.run() None[source]

Calls main() passing the CLI arguments extracted from sys.argv

This function can be used as entry point to create console scripts with setuptools.

docite.cli.setup_logging(loglevel: int) None[source]

Setup basic logging

Parameters:

loglevel (int) – minimum loglevel for emitting messages

docite.convert module

docite.convert.convert_with_refs(inputfile: str | Path, outputfile: str | Path, bibfile: str | Path, stylefile: str | Path | None = None) None[source]

Convert a markdown file to a PDF with references

Parameters:
  • inputfile (Union[str, Path]) – input markdown file

  • outputfile (Union[str, Path]) – output PDF file

  • bibfile (Union[str, Path]) – bibliography file

  • style (Optional[Union[str, Path]]) – citation style file (default: None). If None, the IEEE citation style is used.

Returns:

None

docite.convert.remove_citation_metadata(inputfile: str | Path, outputfile: str | Path | None = None) None[source]

Remove citation metadata from a markdown file

Parameters:
  • inputfile (Union[str, Path]) – input markdown file

  • outputfile (Union[str, Path]) – output markdown file. If None, the input file is overwritten.

Returns:

None

docite.convert.substitute_label_refs(inputfile: str | Path, outputfile: str | Path | None = None) None[source]

Substitute label references in a markdown file

Parameters:
  • inputfile (Union[str, Path]) – input markdown file

  • outputfile (Union[str, Path]) – output markdown file. If None, the input file is overwritten.

Returns:

None

docite.utils module

docite.utils.download_pandoc() None[source]

Download pandoc if not already installed

Returns:

None

docite.utils.get_path_to_assets() Path[source]

Get the path to the assets directory

Returns:

path to the assets directory

Return type:

Path

Module contents