Skip to main content

Module sfx_lib

Module sfx_lib 

Source
Expand description

xil sfx-lib — inventory of the local SFX library from ID3 and MPEG headers, or of the account’s ElevenLabs sound-generation history with --api. Port of XILU005_discover_SFX.py.

Structs§

Args 🔒

Constants§

REFERENCE_DOC 🔒

Functions§

category 🔒
Filename → cheatsheet bucket, by prefix.
command
The clap definition behind --help, for man pages.
copy2 🔒
shutil.copy2: contents plus the modification time.
execute 🔒
export_kit 🔒
export_kit: (json_path, hints_path, md_path); md_path is empty when no reference doc was found.
fetch_api_records 🔒
fetch_api_records(api_key, max_items). None means the key lacks the permission: the warnings are logged and the command exits 1.
fetch_local_records
One record per .mp3 under sfx_dir, any depth, sorted by path.
fmt_duration 🔒
f"{seconds:.1f}s", or empty for None.
fmt_size 🔒
f"{bytes_ / 1024:.0f} KB".
get_str 🔒
normpath 🔒
os.path.normpath for the handful of shapes this command builds.
package_reference_path 🔒
Where Python looks first: <package>/../../docs/<doc>, which for the editable install is the Python checkout’s docs/ directory. The doc actually lives in docs/guides/ there, so this lookup fails on both sides and the CWD fallback decides; the path is still printed.
print_compact_api 🔒
print_compact_local 🔒
print_verbose_api 🔒
print_verbose_local 🔒
read_local_record
_read_local_record: ID3 text frames plus MPEG duration/bit rate.
run
same_file 🔒
write_pipe_hints_md 🔒
_write_pipe_hints_md: returns the written path.