audiodotturn


Nameaudiodotturn JSON
Version 0.5.5 PyPI version JSON
download
home_page
SummaryA tool/library for formatting and cataloging audio files, mainly for files with no metadata.
upload_time2023-04-02 10:55:34
maintainer
docs_urlNone
author
requires_python>=3.11
licenseMIT License Copyright (c) 2023 tairenfd Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords audio music organizer metadata formatter tagger manager cli
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            THIS PROJECT HAS MIGRATED TO RUST, CHECK OUT [SongParse](https://github.com/tairenfd/SongParse), A LIBRARY AND CLI TOOL WRITTEN IN RUST
=========================================================================================================================================

audiodotturn 0.5.5
==================

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. 

INSTALLATION
============

```sh
    pip install audiodotturn
```

CONFIGURATION
=============

User 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

```ini
    [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

Dependencies
============

External libraries: 

- [rich](https://github.com/Textualize/rich)
- [pyyaml](https://github.com/yaml/pyyaml)

Standard: 

- os
- typing
- datetime
- sqlite3
- re 
- json 
- argparse 
- shutil

USAGE
=====

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](./USAGE.md)

EXAMPLES
========

Refer to [EXAMPLES](./EXAMPLES.md)

Choosing 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).mp3

Creating a database
===================

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](./EXAMPLES.md)

License
=======

![MIT](https://img.shields.io/badge/License-MIT-yellow.svg)

This project is licensed under the MIT License. See the LICENSE file for more info.

GENERAL
=======

```sh
    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
```

EXTRACT
=======

```sh
    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.
```

CONSTRUCT
=========

```sh
    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
```

DATABASE
========

```sh
    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
```

audiodotturn package basic usage
=======================

EXTRACTING AND CONSTRUCTING
---------------------------

```py
    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')
```

EXTRACTION IN DESIRED FORMAT
----------------------------

```py
    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")
```

UPDATING DATABASE
-----------------

```py
    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
```

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "audiodotturn",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.11",
    "maintainer_email": "",
    "keywords": "audio,music,organizer,metadata,formatter,tagger,manager,cli",
    "author": "",
    "author_email": "tairenfd <tairenfd@mailbox.org>",
    "download_url": "https://files.pythonhosted.org/packages/54/c7/fb8fe018cf2430d1e22cdbbee79a35c622f87aaeba60262dc947021da2ae/audiodotturn-0.5.5.tar.gz",
    "platform": null,
    "description": "THIS PROJECT HAS MIGRATED TO RUST, CHECK OUT [SongParse](https://github.com/tairenfd/SongParse), A LIBRARY AND CLI TOOL WRITTEN IN RUST\n=========================================================================================================================================\n\naudiodotturn 0.5.5\n==================\n\nGeneral tool/library for extracting simple metadata and producing new file formats from only a filename(s).\n\nMetadata can be catalogued and viewed via a sql database created by audiodotturn\n\nExtraction and construction reports can be generated in multiple file formats. \n\nINSTALLATION\n============\n\n```sh\n    pip install audiodotturn\n```\n\nCONFIGURATION\n=============\n\nUser configuration settings can be set in a config.ini file placed in one of the following locations\n\n- ~/.config/audiodotturn/config.ini,\n- ~/config/audiodotturn/config.ini,\n- ~/audiodotturn/config.ini,\n- ~/.audiodotturn/config.ini,\n\nUser Configuration options shown below\n\n```ini\n    [DATABASE]\n    path = <DATABASE PATH>\n\n    [PROGRAM]\n    exts = <COMMA SEPERATED LIST OF EXTS ie. .mp3, .mp4, .wav>\n    dry = <True/False>\n```\n\nTo make sure the config settings are loaded correctly you can run `adt -s` to get an overview of the current settings being used\n\nDependencies\n============\n\nExternal libraries: \n\n- [rich](https://github.com/Textualize/rich)\n- [pyyaml](https://github.com/yaml/pyyaml)\n\nStandard: \n\n- os\n- typing\n- datetime\n- sqlite3\n- re \n- json \n- argparse \n- shutil\n\nUSAGE\n=====\n\nThe extract, construct, and database modules are non-dependent on any other part of the program\n\nRich is only neccessary for use with the adt module or run module. The run module will soon be \nnon-dependent on rich. It is only used for better user experience.\n\nRefer to [USAGE](./USAGE.md)\n\nEXAMPLES\n========\n\nRefer to [EXAMPLES](./EXAMPLES.md)\n\nChoosing a constructor\n======================\n\n- \"simple\":\n    This will produce several file options formatted as a standard audio track ie. Artist - Title ft. Feat (etc etc).mp3\n- \"enclosed\":\n    This will produce several file options formatted as an enclosed file name ie. (Artist)(Title)(Feat)(etc)(yt-id).mp3\n\nCreating a database\n===================\n\nDatabase path is set in config or during runtime.\n\nA new database will be created upon the first database update.\n\nIncreased database funcitonality can be obtained through importing `adt` as a library.\nSee examples in [EXAMPLES](./EXAMPLES.md)\n\nLicense\n=======\n\n![MIT](https://img.shields.io/badge/License-MIT-yellow.svg)\n\nThis project is licensed under the MIT License. See the LICENSE file for more info.\n\nGENERAL\n=======\n\n```sh\n    usage: adt [-h] [-v] [-p CFGPATH] [-d DBPATH] [-s] {extract,construct,database} ...\n\n    Format, organize and retrieve data from audio files.\n\n    positional arguments:\n    {extract,construct,database}\n        extract             Extraction commands\n        construct           Construction commands\n        database            Database commands\n\n    options:\n    -h, --help            show this help message and exit\n    -v, --version         Show current version of audiodotturn\n    -p CFGPATH, --cfgpath CFGPATH\n                            Path to a specific configuration file to use for the session.\n    -d DBPATH, --dbpath DBPATH\n                            Path to .db file for library database\n    -s, --settings        Show current settings\n```\n\nEXTRACT\n=======\n\n```sh\n    usage: adt extract [-h] [-o OUT] [-f FILE] [-m MULTI [MULTI ...]] [-l DIR]\n\n    options:\n    -h, --help            show this help message and exit\n    -o OUT, --out OUT     Output format for extraction, default is dict.\n    -f FILE, --file FILE  Extract info from single file.\n    -m MULTI [MULTI ...], --multi MULTI [MULTI ...]\n                            Extract info from multiple files.\n    -l DIR, --dir DIR     Extract info from files in a directory.\n```\n\nCONSTRUCT\n=========\n\n```sh\n    usage: adt construct [-h] [-a] [-c CONSTRUCTOR] [-f FILE] [-m MULTI [MULTI ...]]\n\n    options:\n    -h, --help            show this help message and exit\n    -a, --auto            Set auto-choice\n    -c CONSTRUCTOR, --constructor CONSTRUCTOR\n                            Constructor to use\n    -f FILE, --file FILE  Construct from a single file\n    -m MULTI [MULTI ...], --multi MULTI [MULTI ...]\n                            Construct from multiple files\n```\n\nDATABASE\n========\n\n```sh\n    usage: adt database [-h] [-f UPDATEFILE] [-m UPDATEMULTI [UPDATEMULTI ...]] [-A] [-S] [-Ai ARTISTID] [-Si SONGID]\n\n    options:\n    -h, --help            show this help message and exit\n    -f UPDATEFILE, --updatefile UPDATEFILE\n                            Update database via file.\n    -m UPDATEMULTI [UPDATEMULTI ...], --updatemulti UPDATEMULTI [UPDATEMULTI ...]\n                            Update database via multiple files.\n    -A, --artists         View all artists within the database\n    -S, --songs           View all songs by each artist within the database\n    -Ai ARTISTID, --artistid ARTISTID\n                            View songs by artist id\n    -Si SONGID, --songid SONGID\n                            View song by song id\n```\n\naudiodotturn package basic usage\n=======================\n\nEXTRACTING AND CONSTRUCTING\n---------------------------\n\n```py\n    import audiodotturn\n\n    file = 'turn (ft. tester) \"long john\" ft. me, turner.wav'\n\n    files = [\n        'turn (ft. tester) \"long john\" ft. me, turner.wav',\n        'YG Feat. Dj Mustard \"Pop It, Shake It\" (Uncut) (WSHH Exclusive - Official Music Video) [kQ2KSPz4iSw].wav',\n        'Lady Gaga, Ariana Grande - Rain On Me (Official Music Video) [AOm9Fv8NTG0].mp3'\n    ]\n\n    audiodotturn = audiodotturn.AudioDotTurn()\n    extraction = audiodotturn.extract_file(file)\n    extractions = audiodotturn.extract_files(files)\n\n    for extract in extraction:\n        print('extraction single:\\n', extract, '\\n')\n\n    for extract in extractions:\n        print('extraction:\\n', extract, '\\n')\n\n    constructions = audiodotturn.construct(\"enclosed\", extraction, auto=False)\n    auto_constructions = audiodotturn.construct(\"simple\", extractions, auto=True)\n\n    print(constructions, '\\n')\n    print(auto_constructions, '\\n')\n```\n\nEXTRACTION IN DESIRED FORMAT\n----------------------------\n\n```py\n    from rich.pretty import pprint\n    import audiodotturn\n\n    file = 'turn (ft. tester) \"long john\" ft. me, turner.wav'\n\n    adt_runner = audiodotturn.AudioDotTurn()\n    adt_runner.extract_file(file)\n\n    _dict = adt_runner.extractor.get_extraction(\"dict\")\n    _yaml = adt_runner.extractor.get_extraction(\"yaml\")\n    _str = adt_runner.extractor.get_extraction(\"str\")\n    _values = adt_runner.extractor.get_extraction(\"values\")\n```\n\nUPDATING DATABASE\n-----------------\n\n```py\n    from rich.pretty import pprint\n    from rich.console import Console\n    import audiodotturn\n\n    console = Console()\n\n    file = 'turn (ft. tester) \"long john\" ft. me, turner.wav'\n\n    adt_runner = audiodotturn.AudioDotTurn()\n    extraction = adt_runner.extract_file(file)\n\n    adt_runner.update_database(extraction)\n\n    artists = adt_runner.get_all_artists()\n\n    for artist in artists:\n        print(artist[\"artist_id\"])\n        print(artist[\"name\"])\n\n    # The above produces:\n    #\n    # 1\n    # turn\n```\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2023 tairenfd  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "A tool/library for formatting and cataloging audio files, mainly for files with no metadata.",
    "version": "0.5.5",
    "split_keywords": [
        "audio",
        "music",
        "organizer",
        "metadata",
        "formatter",
        "tagger",
        "manager",
        "cli"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9f92fd1df41c6d498710a46979ba0b02b1dd86283ac839bf6b5f1a82b8d308df",
                "md5": "1f964f4c4a5507fd264b205bea7d410d",
                "sha256": "656b28a50797938d4aab2753990444ce2a765be553704170f12523d13fd9f48e"
            },
            "downloads": -1,
            "filename": "audiodotturn-0.5.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1f964f4c4a5507fd264b205bea7d410d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11",
            "size": 21218,
            "upload_time": "2023-04-02T10:55:32",
            "upload_time_iso_8601": "2023-04-02T10:55:32.812231Z",
            "url": "https://files.pythonhosted.org/packages/9f/92/fd1df41c6d498710a46979ba0b02b1dd86283ac839bf6b5f1a82b8d308df/audiodotturn-0.5.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "54c7fb8fe018cf2430d1e22cdbbee79a35c622f87aaeba60262dc947021da2ae",
                "md5": "2cc6e154bb5fb4899cd502fe775be375",
                "sha256": "ad3c0885a1ac82754abff83e073d65880023ba6a0a99df32103ce45631560a90"
            },
            "downloads": -1,
            "filename": "audiodotturn-0.5.5.tar.gz",
            "has_sig": false,
            "md5_digest": "2cc6e154bb5fb4899cd502fe775be375",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11",
            "size": 20513,
            "upload_time": "2023-04-02T10:55:34",
            "upload_time_iso_8601": "2023-04-02T10:55:34.955945Z",
            "url": "https://files.pythonhosted.org/packages/54/c7/fb8fe018cf2430d1e22cdbbee79a35c622f87aaeba60262dc947021da2ae/audiodotturn-0.5.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-04-02 10:55:34",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "audiodotturn"
}
        
Elapsed time: 0.20533s