super_auto_comb.fix_files

Functions

fix_files(dir, date[, regex_conflict])

Find and rename files from K+K counters conflicted by Pcloud cloud sync.

find_files(dir, date[, regex])

Return a list of files in a directory, matching the K+K filename format for a given date.

Module Contents

super_auto_comb.fix_files.fix_files(dir, date, regex_conflict='%y%m%d_?_Frequ (conflicted).txt')

Find and rename files from K+K counters conflicted by Pcloud cloud sync.

Parameters:
  • dir (str) – Input directory

  • date (datetime date) – Input date

  • regex_conflict (str, optional) – Regex matching conflicting files, by default “%y%m%d_?_Frequ (conflicted).txt”

Returns:

con_files – List of matching files found and hopefully fixed.

Return type:

list

super_auto_comb.fix_files.find_files(dir, date, regex='%y%m%d_?_Frequ.txt')

Return a list of files in a directory, matching the K+K filename format for a given date.

Parameters:
  • dir (str) – Input directory

  • date (datetime date) – Input date

  • regex_conflict (str, optional) – Regex for matching files, by default “%y%m%d_?_Frequ.txt”

Returns:

files – List of matching files.

Return type:

list