collecting_society_worker package

Submodules

collecting_society_worker.archive_proc module

The one and only C3S archive processing utility

class collecting_society_worker.archive_proc.ArchProc[source]

Bases: object

start_proc()[source]

collecting_society_worker.fileTools module

The one and only C3S tools for filehandling of repertoire files or similar

collecting_society_worker.fileTools.checksum_correct(host_ssh, directory, filename)[source]
collecting_society_worker.fileTools.get_filename(filepath)[source]
collecting_society_worker.fileTools.get_path_only(filepath)[source]
collecting_society_worker.fileTools.get_rel_path(line, base_path)[source]
collecting_society_worker.fileTools.is_checksum_file(filename)[source]

collecting_society_worker.repro module

The one and only C3S repertoire processing utility

collecting_society_worker.repro.checksum_audiofile(srcdir, destdir, filename)[source]

Hashing a single file.

collecting_society_worker.repro.connect_db()[source]

get access to database

collecting_society_worker.repro.create_excerpt(audio, excerpt_path)[source]

well, as the functin name says…

collecting_society_worker.repro.create_preview(audio, preview_path)[source]

mix a cool audio preview file with low quality

collecting_society_worker.repro.directory_walker(processing_step_func, args)[source]

Walks through the specified directory tree.

Applies the specified repertoire processing step for each file.

Example: directory_walker(fingerprint_audiofile, (sourcedir, destdir))

collecting_society_worker.repro.drop_audiofile(srcdir, destdir, filename)[source]

Does nothing but setting the processing step from fingerprinted to dropped.

collecting_society_worker.repro.ensure_path_exists(path)[source]

If path doesn’t exist, create directory.

collecting_society_worker.repro.expand_envvars(section)[source]
collecting_society_worker.repro.fingerprint_audiofile(srcdir, destdir, filename)[source]

Audiofingerprint a single file.

Comes along with metadata lookup and store it on the EchoPrint server.

collecting_society_worker.repro.get_segments(audio)[source]

Yields the segments back to the caller one by one.

collecting_society_worker.repro.move_file(source, target)[source]

Moves a file from one path to another.

collecting_society_worker.repro.preview_audiofile(srcdir, destdir, filename)[source]

Creates a low-quality preview audio snippet for newly uploaded files.

collecting_society_worker.repro.reject_file(source, reason, reason_details)[source]

Moves a file to the ‘rejected’ folder and writes the reject reason to the database.

collecting_society_worker.test_connection module

collecting_society_worker.test_repertoire_processing module

collecting_society_worker.trytonAccess module

The one and only C3S proteus tools for accessing data in C3S tryton db

collecting_society_worker.trytonAccess.connect(pconfig)[source]

get access to tryton database for processing state updates use http only on local test instance (and uncomment [ssl] entries in server side trytond.conf for using http)

collecting_society_worker.trytonAccess.delete_content(filename)[source]

deletes a content (file) record of an uploaded file (.wav, .pdf)

Caution

Not yet functional!

collecting_society_worker.trytonAccess.delete_web_user(email)[source]

deletes webuser by email

Caution

Not yet functional!

collecting_society_worker.trytonAccess.get_content_by_filename(filename)[source]

Get a content by filename/uuid.

collecting_society_worker.trytonAccess.get_creation_by_content(content)[source]

Get a creation by content(.id).

collecting_society_worker.trytonAccess.get_obj_state(filename)[source]

returns the state of objects inherited from the state mixin

collecting_society_worker.trytonAccess.get_or_insert_web_user(email)[source]

Finds a web user by email; if she doesn’t exist, she will be created and returned

collecting_society_worker.trytonAccess.insert_content_by_filename(filename, user, pstate)[source]

insert an example content by filename/uuid.

collecting_society_worker.trytonAccess.set_content_unknown(filename)[source]

sets a content record’s processing_state to unknown

collecting_society_worker.trytonAccess.update_content_pstate(filename, pstate)[source]

update content’s state by filename/uuid.

Module contents