module homeblog.filename_helper

Short summary

module ensae_teaching_cs.homeblog.filename_helper

Helpers around file names.

source on GitHub

Functions

function truncated documentation
get_file_per_folder extract all folders in a folder and then all files in these folders
music_statistics provides statistics on a folder
normalize_folder normalize the filename of a whole folder and subfolders
normalize_name_and_numbers tries to match names and number in a file

Documentation

Helpers around file names.

source on GitHub

ensae_teaching_cs.homeblog.filename_helper.get_file_per_folder(folder, deep=1)[source]

extract all folders in a folder and then all files in these folders

Paramètres:
  • folder – folder
  • deep – number of folders to considers before the filename
Renvoie:

dictionary

source on GitHub

ensae_teaching_cs.homeblog.filename_helper.music_statistics(folder)[source]

provides statistics on a folder

Paramètres:folder – folder
Renvoie:dictionary { « folder »: { « last »: …, « missing »: } }

source on GitHub

ensae_teaching_cs.homeblog.filename_helper.normalize_folder(folder, fLOG=<function noLOG>)[source]

normalize the filename of a whole folder and subfolders

Paramètres:folder – folder
Renvoie:list of tuple (number, normalized name, extension, suggested name, original name)

source on GitHub

ensae_teaching_cs.homeblog.filename_helper.normalize_name_and_numbers(files)[source]

tries to match names and number in a file

Paramètres:files – list of files
Renvoie:list of tuple (number, normalized name, extension, suggested name, original name)

source on GitHub