module homeblog.filename_helper
#
Short summary#
module ensae_teaching_cs.homeblog.filename_helper
Helpers around file names.
Functions#
function |
truncated documentation |
---|---|
extract all folders in a folder and then all files in these folders |
|
provides statistics on a folder |
|
normalize the filename of a whole folder and subfolders |
|
tries to match names and number in a file |
Documentation#
Helpers around file names.
- ensae_teaching_cs.homeblog.filename_helper.get_file_per_folder(folder, deep=1)#
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
- ensae_teaching_cs.homeblog.filename_helper.music_statistics(folder)#
provides statistics on a folder
- Paramètres:
folder – folder
- Renvoie:
dictionary { « folder »: { « last »: …, « missing »: } }
- ensae_teaching_cs.homeblog.filename_helper.normalize_folder(folder, fLOG=<function noLOG>)#
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)
- ensae_teaching_cs.homeblog.filename_helper.normalize_name_and_numbers(files)#
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)