tagrenamer.fs package

Submodules

tagrenamer.fs.directory module

Represent a directory found on the file system.

class tagrenamer.fs.directory.Directory(output, path, hooks={}, parent=None, dl=1)[source]

Bases: Node

Represent a directory found on the file system.

Hooks: - traverse_filter (obj, path), return True/False - mkdir (obj)

addChild(child)[source]

Add a child node.

enableDryRun()[source]

Enable a dry-run mode on this object and its children..

mkdir()[source]

Make this directory if it doesn’t exist on disk yet.

mkdirs(path)[source]

Make multiple directories at once and assure that a path exists.

move(dest, onlyReferences=False)[source]

Move the file system object onto a different location.

remove()[source]

Delete this directory and it’s siblings from disk.

removeChild(child)[source]

Remove a child from this node.

traverse()[source]

Traverse into subdirectories and load our children.

tagrenamer.fs.file module

Represent an ordinary file found on the file system.

class tagrenamer.fs.file.File(output, path, extension, hooks={}, parent=None, dl=1)[source]

Bases: Node

Represent an ordinary file found on the file system.

tagrenamer.fs.musicfile module

Represent a file of a known music file format found on the file system.

class tagrenamer.fs.musicfile.MusicFile(output, path, extension, hooks={}, parent=None, dl=1)[source]

Bases: File

Represent a file of a known music file format found on the file system.

Hooks: - sanitize (obj)

extract()[source]

Extract all meta data using the Taglib library.

sanitize()[source]

Sanitize the extracted data ready for file system level usage.

tagrenamer.fs.node module

Represent any file, directory or other reference found on the file system.

class tagrenamer.fs.node.Node(output, path, hooks={}, parent=None, dl=1)[source]

Bases: object

Represent any file, directory or other reference found on the file system.

Hooks: - init (obj) - remove (obj) - move (obj, dest) - shell_collect (command)

dl = 1
enableDryRun()[source]

Enable a dry-run mode on this object so that no real will things happen.

exists()[source]

Determine whether the object really exists or not.

invoke(hook, *args)[source]

Invoke the given hook when they have been registered at object construction.

move(dest, newFileName=None, onlyReferences=False)[source]

Move the file system object onto a different location..

remove()[source]

Delete the file system object from disk.

shellCollect(command, *args)[source]

Collect the shell equivalent of a file or directory action.

Module contents