bibpy.tools module

A collection of functionality for bibpy’s accompanying tools.

bibpy.tools.always_false(value)[source]

A function that always returns False.

bibpy.tools.always_true(value)[source]

A function that always returns True.

bibpy.tools.close_output_handles()[source]

Ensure we close stdout and stderr when piping.

bibpy.tools.compose_predicates(predicates, pred_combiner)[source]

Return a function that composes all the given predicates.

bibpy.tools.format_version(version)[source]

Format a version number used by bibpy’s accompanying tools.

bibpy.tools.get_abspath_for(curpath, path)[source]

Return the absolute path for a path relative to a current path.

bibpy.tools.iter_files(names, pattern, recursive)[source]

Yield all files matching a specific file pattern in a directory.

bibpy.tools.read_files(program_name, paths, processor, args)[source]

Read files from some paths and apply a processor function to each.