colrev.env.utilsΒΆ

Collection of utility functions

Functions

custom_asdict_factory

Custom asdict factory for (dataclass)object-to-dict conversion

dict_set_nested

Set dict value by nested key, this works on empty dict

get_by_path

Access a nested object in root by item sequence.

get_package_file_content

Get the content of a file in the CoLRev package

get_template

Load a jinja template

inplace_change

Replace a string in a file

load_complementary_material_keywords

Load the list of keywords identifying complementary materials

load_complementary_material_prefixes

Load the list of prefixes identifying complementary materials

load_complementary_material_strings

Load the list of exact strings identifying complementary materials

percent_upper_chars

Get the percentage of upper-case characters in a string

remove_accents

Replace the accents in a string

retrieve_package_file

Retrieve a file from the CoLRev package