Package: audiodotturn
THIS PROJECT HAS MIGRATED TO RUST, CHECK OUTSongParse, A LIBRARY AND CLI TOOL WRITTEN IN RUSTaudiodotturn 0.5.5General 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 audiodotturnExtraction and construction reports can be generated in multiple file formats.INSTALLATIONpipinstallaudiodotturnCONFIGURATIONUser configuration settings can be set in a config.ini file placed in one of the following locations~/.config/audiodotturn/config.ini,~/config/audiodotturn/config.ini,~/audiodotturn/config.ini,~/.audiodotturn/config.ini,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 runadt -sto get an overview of the current settings being usedDependenciesExternal libraries:richpyyamlStandard:ostypingdatetimesqlite3rejsonargparseshutilUSAGEThe extract, construct, and database modules are non-dependent on any other part of the programRich 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 toUSAGEEXAMPLESRefer toEXAMPLESChoosing a constructor"simple":
This will produce several file options formatted as a standard audio track ie. Artist - Title ft. Feat (etc etc).mp3"enclosed":
This will produce several file options formatted as an enclosed file name ie. (Artist)(Title)(Feat)(etc)(yt-id).mp3Creating a databaseDatabase 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 importingadtas a library.
See examples inEXAMPLESLicenseThis project is licensed under the MIT License. See the LICENSE file for more info.GENERALusage:adt[-h][-v][-pCFGPATH][-dDBPATH][-s]{extract,construct,database}...Format,organizeandretrievedatafromaudiofiles.positionalarguments:{extract,construct,database}extractExtractioncommandsconstructConstructioncommandsdatabaseDatabasecommandsoptions:-h,--helpshowthishelpmessageandexit-v,--versionShowcurrentversionofaudiodotturn-pCFGPATH,--cfgpathCFGPATHPathtoaspecificconfigurationfiletouseforthesession.-dDBPATH,--dbpathDBPATHPathto.dbfileforlibrarydatabase-s,--settingsShowcurrentsettingsEXTRACTusage:adtextract[-h][-oOUT][-fFILE][-mMULTI[MULTI...]][-lDIR]options:-h,--helpshowthishelpmessageandexit-oOUT,--outOUTOutputformatforextraction,defaultisdict.-fFILE,--fileFILEExtractinfofromsinglefile.-mMULTI[MULTI...],--multiMULTI[MULTI...]Extractinfofrommultiplefiles.-lDIR,--dirDIRExtractinfofromfilesinadirectory.CONSTRUCTusage:adtconstruct[-h][-a][-cCONSTRUCTOR][-fFILE][-mMULTI[MULTI...]]options:-h,--helpshowthishelpmessageandexit-a,--autoSetauto-choice-cCONSTRUCTOR,--constructorCONSTRUCTORConstructortouse-fFILE,--fileFILEConstructfromasinglefile-mMULTI[MULTI...],--multiMULTI[MULTI...]ConstructfrommultiplefilesDATABASEusage:adtdatabase[-h][-fUPDATEFILE][-mUPDATEMULTI[UPDATEMULTI...]][-A][-S][-AiARTISTID][-SiSONGID]options:-h,--helpshowthishelpmessageandexit-fUPDATEFILE,--updatefileUPDATEFILEUpdatedatabaseviafile.-mUPDATEMULTI[UPDATEMULTI...],--updatemultiUPDATEMULTI[UPDATEMULTI...]Updatedatabaseviamultiplefiles.-A,--artistsViewallartistswithinthedatabase-S,--songsViewallsongsbyeachartistwithinthedatabase-AiARTISTID,--artistidARTISTIDViewsongsbyartistid-SiSONGID,--songidSONGIDViewsongbysongidaudiodotturn package basic usageEXTRACTING AND CONSTRUCTINGimportaudiodotturnfile='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)forextractinextraction:print('extraction single:\n',extract,'\n')forextractinextractions: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')EXTRACTION IN DESIRED FORMATfromrich.prettyimportpprintimportaudiodotturnfile='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")UPDATING DATABASEfromrich.prettyimportpprintfromrich.consoleimportConsoleimportaudiodotturnconsole=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()forartistinartists:print(artist["artist_id"])print(artist["name"])# The above produces:## 1# turn