dvcurator.rename ================ .. py:module:: dvcurator.rename Functions --------- .. autoapisummary:: dvcurator.rename.project_name dvcurator.rename.last_name_prefix dvcurator.rename.add_filename_prefix dvcurator.rename.replace_spaces dvcurator.rename.remove_all_accents dvcurator.rename.basic_rename dvcurator.rename.anonymize Module Contents --------------- .. py:function:: project_name(citation) Generate project name string, used in dropbox folder name and github project name :param citation: Citation block generated by `get_citation()` :return: String to use as the folder name or project name :rtype: String .. py:function:: last_name_prefix(citation) Extract the last name of the first author (and second) for filename prefix :param citation: Citation block generated by `get_citation()` :return: String of last name (or other prefix if >1 author) :rtype: String .. py:function:: add_filename_prefix(folder, prefix) Add a prefix to all files in a folder :param folder: Folder to rename files in :type folder: Path, as string :param prefix: Prefix to add to filenames :type prefix: String .. py:function:: replace_spaces(folder) Remove spaces in all filenames in a folder :param folder: Folder to rename files in :type folder: Path, as string .. py:function:: remove_all_accents(folder) Remove all accented characters in filenames in a folder :param folder: Folder to rename files in :type folder: Path, as string .. py:function:: basic_rename(folder, citation) Run a series of operations to properly format filenames in a folder according to QDR guidelines. Add prefix, remove accents, replace spaces. :param folder: Folder to rename files in :type folder: Path, as string :param citation: Citation block generated by `get_citation()` :return: Path to the new folder with renamed files :rtype: String .. py:function:: anonymize(folder, citation) Anonymize the filenames, replacing names with ANONYMIZED :param folder: folder of the files to rename :type folder: path, as string :param citation: Citation block generated by `get_citation()`