Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
A tool/library for formatting and cataloging audio files, mainly for files with no metadata.
General tool/library for extracting simple metadata and producing new file formats from only a filename(s).
Metadata can be catalogued and viewed via a sql database created by audiodotturn
Extraction and construction reports can be generated in multiple file formats.
pip install audiodotturn
User configuration settings can be set in a config.ini file placed in one of the following locations
User Configuration options shown below
[DATABASE]
path = <DATABASE PATH>
[PROGRAM]
exts = <COMMA SEPERATED LIST OF EXTS ie. .mp3, .mp4, .wav>
dry = <True/False>
To make sure the config settings are loaded correctly you can run adt -s
to get an overview of the current settings being used
External libraries:
Standard:
The extract, construct, and database modules are non-dependent on any other part of the program
Rich is only neccessary for use with the adt module or run module. The run module will soon be non-dependent on rich. It is only used for better user experience.
Refer to USAGE
Refer to EXAMPLES
Database path is set in config or during runtime.
A new database will be created upon the first database update.
Increased database funcitonality can be obtained through importing adt
as a library.
See examples in EXAMPLES
This project is licensed under the MIT License. See the LICENSE file for more info.
usage: adt [-h] [-v] [-p CFGPATH] [-d DBPATH] [-s] {extract,construct,database} ...
Format, organize and retrieve data from audio files.
positional arguments:
{extract,construct,database}
extract Extraction commands
construct Construction commands
database Database commands
options:
-h, --help show this help message and exit
-v, --version Show current version of audiodotturn
-p CFGPATH, --cfgpath CFGPATH
Path to a specific configuration file to use for the session.
-d DBPATH, --dbpath DBPATH
Path to .db file for library database
-s, --settings Show current settings
usage: adt extract [-h] [-o OUT] [-f FILE] [-m MULTI [MULTI ...]] [-l DIR]
options:
-h, --help show this help message and exit
-o OUT, --out OUT Output format for extraction, default is dict.
-f FILE, --file FILE Extract info from single file.
-m MULTI [MULTI ...], --multi MULTI [MULTI ...]
Extract info from multiple files.
-l DIR, --dir DIR Extract info from files in a directory.
usage: adt construct [-h] [-a] [-c CONSTRUCTOR] [-f FILE] [-m MULTI [MULTI ...]]
options:
-h, --help show this help message and exit
-a, --auto Set auto-choice
-c CONSTRUCTOR, --constructor CONSTRUCTOR
Constructor to use
-f FILE, --file FILE Construct from a single file
-m MULTI [MULTI ...], --multi MULTI [MULTI ...]
Construct from multiple files
usage: adt database [-h] [-f UPDATEFILE] [-m UPDATEMULTI [UPDATEMULTI ...]] [-A] [-S] [-Ai ARTISTID] [-Si SONGID]
options:
-h, --help show this help message and exit
-f UPDATEFILE, --updatefile UPDATEFILE
Update database via file.
-m UPDATEMULTI [UPDATEMULTI ...], --updatemulti UPDATEMULTI [UPDATEMULTI ...]
Update database via multiple files.
-A, --artists View all artists within the database
-S, --songs View all songs by each artist within the database
-Ai ARTISTID, --artistid ARTISTID
View songs by artist id
-Si SONGID, --songid SONGID
View song by song id
import audiodotturn
file = 'turn (ft. tester) "long john" ft. me, turner.wav'
files = [
'turn (ft. tester) "long john" ft. me, turner.wav',
'YG Feat. Dj Mustard "Pop It, Shake It" (Uncut) (WSHH Exclusive - Official Music Video) [kQ2KSPz4iSw].wav',
'Lady Gaga, Ariana Grande - Rain On Me (Official Music Video) [AOm9Fv8NTG0].mp3'
]
audiodotturn = audiodotturn.AudioDotTurn()
extraction = audiodotturn.extract_file(file)
extractions = audiodotturn.extract_files(files)
for extract in extraction:
print('extraction single:\n', extract, '\n')
for extract in extractions:
print('extraction:\n', extract, '\n')
constructions = audiodotturn.construct("enclosed", extraction, auto=False)
auto_constructions = audiodotturn.construct("simple", extractions, auto=True)
print(constructions, '\n')
print(auto_constructions, '\n')
from rich.pretty import pprint
import audiodotturn
file = 'turn (ft. tester) "long john" ft. me, turner.wav'
adt_runner = audiodotturn.AudioDotTurn()
adt_runner.extract_file(file)
_dict = adt_runner.extractor.get_extraction("dict")
_yaml = adt_runner.extractor.get_extraction("yaml")
_str = adt_runner.extractor.get_extraction("str")
_values = adt_runner.extractor.get_extraction("values")
from rich.pretty import pprint
from rich.console import Console
import audiodotturn
console = Console()
file = 'turn (ft. tester) "long john" ft. me, turner.wav'
adt_runner = audiodotturn.AudioDotTurn()
extraction = adt_runner.extract_file(file)
adt_runner.update_database(extraction)
artists = adt_runner.get_all_artists()
for artist in artists:
print(artist["artist_id"])
print(artist["name"])
# The above produces:
#
# 1
# turn
FAQs
A tool/library for formatting and cataloging audio files, mainly for files with no metadata.
We found that audiodotturn demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.