GhettoRecorder


NameGhettoRecorder JSON
Version 3.0 PyPI version JSON
download
home_page
Summarymultiprocessor capable internet radio grabber
upload_time2023-06-02 16:36:56
maintainer
docs_urlNone
authorRené Horn
requires_python>=3.7
licenseMIT
keywords internet radio grabber
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            Documentation - GhettoRecorder
==============================
![alt logo of ghettorecorder](https://github.com/44xtc44/ghettorecorder/raw/dev/docs/source/_static/ghetto_url.svg)
Grab hundreds of radio stations `simultaneously`.

How to run installed package
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
GhettoRecorder
class module (example in ghetto_procenv).::

    from ghettorecorder import GhettoRecorder

    ghetto_01 = GhettoRecorder(radio, url)
    ghetto_01.com_in = mp.Queue(maxsize=1)  # eval exec communication for multiprocessing
    ghetto_01.audio_out = mp.Queue(maxsize=1)  # can also be normal queue.Queue()

Commandline
option (calls cmd.py).::

    ghetto_cmd or
    python3 -m ghettorecorder.cmd

Client Server
option (calls __main__.py).::

    ghetto_url or
    python3 -m ghettorecorder

Overview
~~~~~~~~~
* Queue communication. Multiprocessor ready.
* GhettoRecorder class has connector attributes for external modules.
* External modul *Blacklisting recorded titles* is already included.
* Optional Browser Frontend on Python multithreading HTTP server.

Links
~~~~~
* Snap: https://snapcraft.io/ghettorecorder
* GitHub: https://github.com/44xtc44/GhettoRecorder
* Issues to fix: https://github.com/44xtc44/GhettoRecorder/issues
* ReadTheDocs: https://ghettorecorder.readthedocs.io/ (see module index)

Configuration File
------------------
'Settings.ini' is the config file for GhettoRecorder.
INI files consist of sections to divide different settings.::

    [STATIONS]
    anime_jp = http://streamingv2.shoutcast.com/japanimradio-tokyo

    [GLOBAL]
    blacklist_enable = True
    save_to_dir = f:\54321


| [STATIONS]
| custom radio name and radio connection information (can be pls or m3u playlist)

| [GLOBAL]
| stores blacklist status and the *custom* parent directory location

Usage
-----
Main Menu
^^^^^^^^^
::

    menu 'Main'
    1 -- Record (local listen option)
    2 -- Change parent record path
    3 -- Enable/disable blacklists
    4 -- Set path to config, settings.ini
    5 -- aac file repair
    6 -- Exit


Record Menu
^^^^^^^^^^^
::

    0 	>> aacchill             <<
    1 	>> 80ies_nl             <<
    2 	>> anime_jp             <<
    3 	>> blues_uk             <<
    4 	>> br24                 <<
    ...
    Enter to record -->:

| Write the leading Number (list index) into the input field . Hit 'Enter'.
| OR
| Write or copy/paste the radio name into the input field. Hit 'Enter'.
| Add as many radios as you like.
| Hit 'Enter' without input to start grabbing.
| Listen to the first selected radio via local streaming ``http://localhost:1242/``

Change parent record path Menu
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
::

    option 'Change record parent path'
    1 -- New parent path for recorded radios. Write to config.
    2 -- Back to Main Menu
    Enter your choice: 1

        Write a new path to store files
    ..settings.ini [GLOBAL] section: {'blacklist_enable': 'True', 'save_to_dir': 'f:\\31'}
    Enter a new path, OS syntax (f:\10 or /home ) -->:

The default path is the directory of the module.
In most cases you want to store grabbed files somewhere else.

Blacklist Menu
^^^^^^^^^^^^^^
::

    Write a new blacklist option to settings.ini file
    ..settings.ini [GLOBAL] section: {'blacklist_enable': 'True', 'save_to_dir': 'f:\\31'}
    1 -- blacklist on (don't write title if already downloaded)
    2 -- blacklist off
    3 -- Back to Main Menu
    Enter your choice: 1

    	blacklist is ON: settings.ini file
    	Existing titles are not recorded again and again.
    file name is "blacklist.json" in the same folder as "settings.ini"
    ..settings.ini [GLOBAL] section: {'blacklist_enable': 'True', 'save_to_dir': 'f:\\31'}
    Hit Enter to leave -->:

| Blacklist writing can be switched on/off.
| Titles are listed for each of the radios and can be deleted to 'unlist' them.
| File name is ``blacklist.json`` and always in the same folder as 'settings.ini'.


Set path to config
^^^^^^^^^^^^^^^^^^
::

    Write Path to settings.ini and blacklist.json file
    Enter a new path, OS syntax (f:\10 or /home ) -->: F:\44
    	created: F:\44
    ..settings.ini [GLOBAL] section: {'blacklist_enable': 'True'}
    Hit Enter to leave -->:

| You can store your config file 'settings.ini' somewhere on the file system.
| Default place for grabbed files is the mentioned folder.
| If a custom save path is written to config, this path is used.


aac file repair
^^^^^^^^^^^^^^^
::

    Write a path to aac files. Only aac files will be touched.
    ..settings.ini [GLOBAL] section: {'blacklist_enable': 'True', 'save_to_dir': 'f:\\31'}
    Enter a path, OS syntax (f:\10 or /home ) -->:f:\6aac
    	created: f:\6aac
    	f:\6aac\aac_repair created
    [ COPY(s) in f:\6aac\aac_repair ]
    ----- 1 file(s) failed -----
    f:\6aac\Sergey Sirotin & Golden Light Orchestra - Around The World.aacp
    ValueError non-hexadecimal number found in fromhex() arg at position 5438113
    ----- 97 file(s) repaired -----
    f:\6aac\111_Slovo_Original_Mix.aac; cut(bytes): [330]
    f:\6aac\351 Lake Shore Drive - You Make My Day.aacp; cut(bytes): [389]

| The repair option uses a folder name as input.
| Repaired files are stored in 'aac_repair' sub folder.
| Cut bytes count is shown at the end of the line.
| Repair can fail if the file is corrupted not only at start or end.


Pip Install
^^^^^^^^^^^
::

   """ Linux """
   $ pip3 install ghettorecorder

   """ Windows """
   > pip install ghettorecorder


Uninstall
^^^^^^^^^

Python user

 * find the module location
 * uninstall and then remove remnants

remove::

   >$ pip3 show ghettorecorder
   >$ pip3 uninstall ghettorecorder

Location: ... /python310/site-packages

GhettoRecorder module
~~~~~~~~~~~~~~~~~~~~~~
Communication with the GhettoRecorder instance

       ========= ================= ======================================================
       port      action            description
       ========= ================= ======================================================
       com_in    commands input    tuple (radio, [str 'eval' or 'exec'], str 'command')
       com_out   status, err msg   (radio, [str 'eval' or 'exec'], response)
       audio_out copy of html resp server can loop through to a browser
       ========= ================= ======================================================

Feature attributes to switch on/off

       ========================== ==================================================================================
       attribute                  description
       ========================== ==================================================================================
       runs_meta                  call metadata periodically, create path for rec out; False: recorder is the file
       runs_record                disable writing to recorder file at all
       recorder_file_write        allow dumping current recorder file
       runs_listen                disable write to audio output queue; 3rd party can grab it. (listen blacklist)
       ========================== ==================================================================================

Snapcraft package
~~~~~~~~~~~~~~~~~~
The installer creates an icon with the name "GhettoRecorder".
You can use two command line options.::

    ghettorecorder.url
    ghettorecorder.cmd

First is Client, Server connection.
Second is command line menu.

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "GhettoRecorder",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "internet radio grabber",
    "author": "Ren\u00e9 Horn",
    "author_email": "Ren\u00e9 Horn <rene_horn@gmx.net>",
    "download_url": "https://files.pythonhosted.org/packages/82/f6/0ea8aefa7b2ed79f3e42abe170d7cfa3371b0950a7a6c4a2c3c124100f97/GhettoRecorder-3.0.tar.gz",
    "platform": null,
    "description": "Documentation - GhettoRecorder\r\n==============================\r\n![alt logo of ghettorecorder](https://github.com/44xtc44/ghettorecorder/raw/dev/docs/source/_static/ghetto_url.svg)\r\nGrab hundreds of radio stations `simultaneously`.\r\n\r\nHow to run installed package\r\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\nGhettoRecorder\r\nclass module (example in ghetto_procenv).::\r\n\r\n    from ghettorecorder import GhettoRecorder\r\n\r\n    ghetto_01 = GhettoRecorder(radio, url)\r\n    ghetto_01.com_in = mp.Queue(maxsize=1)  # eval exec communication for multiprocessing\r\n    ghetto_01.audio_out = mp.Queue(maxsize=1)  # can also be normal queue.Queue()\r\n\r\nCommandline\r\noption (calls cmd.py).::\r\n\r\n    ghetto_cmd or\r\n    python3 -m ghettorecorder.cmd\r\n\r\nClient Server\r\noption (calls __main__.py).::\r\n\r\n    ghetto_url or\r\n    python3 -m ghettorecorder\r\n\r\nOverview\r\n~~~~~~~~~\r\n* Queue communication. Multiprocessor ready.\r\n* GhettoRecorder class has connector attributes for external modules.\r\n* External modul *Blacklisting recorded titles* is already included.\r\n* Optional Browser Frontend on Python multithreading HTTP server.\r\n\r\nLinks\r\n~~~~~\r\n* Snap: https://snapcraft.io/ghettorecorder\r\n* GitHub: https://github.com/44xtc44/GhettoRecorder\r\n* Issues to fix: https://github.com/44xtc44/GhettoRecorder/issues\r\n* ReadTheDocs: https://ghettorecorder.readthedocs.io/ (see module index)\r\n\r\nConfiguration File\r\n------------------\r\n'Settings.ini' is the config file for GhettoRecorder.\r\nINI files consist of sections to divide different settings.::\r\n\r\n    [STATIONS]\r\n    anime_jp = http://streamingv2.shoutcast.com/japanimradio-tokyo\r\n\r\n    [GLOBAL]\r\n    blacklist_enable = True\r\n    save_to_dir = f:\\54321\r\n\r\n\r\n| [STATIONS]\r\n| custom radio name and radio connection information (can be pls or m3u playlist)\r\n\r\n| [GLOBAL]\r\n| stores blacklist status and the *custom* parent directory location\r\n\r\nUsage\r\n-----\r\nMain Menu\r\n^^^^^^^^^\r\n::\r\n\r\n    menu 'Main'\r\n    1 -- Record (local listen option)\r\n    2 -- Change parent record path\r\n    3 -- Enable/disable blacklists\r\n    4 -- Set path to config, settings.ini\r\n    5 -- aac file repair\r\n    6 -- Exit\r\n\r\n\r\nRecord Menu\r\n^^^^^^^^^^^\r\n::\r\n\r\n    0 \t>> aacchill             <<\r\n    1 \t>> 80ies_nl             <<\r\n    2 \t>> anime_jp             <<\r\n    3 \t>> blues_uk             <<\r\n    4 \t>> br24                 <<\r\n    ...\r\n    Enter to record -->:\r\n\r\n| Write the leading Number (list index) into the input field . Hit 'Enter'.\r\n| OR\r\n| Write or copy/paste the radio name into the input field. Hit 'Enter'.\r\n| Add as many radios as you like.\r\n| Hit 'Enter' without input to start grabbing.\r\n| Listen to the first selected radio via local streaming ``http://localhost:1242/``\r\n\r\nChange parent record path Menu\r\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n::\r\n\r\n    option 'Change record parent path'\r\n    1 -- New parent path for recorded radios. Write to config.\r\n    2 -- Back to Main Menu\r\n    Enter your choice: 1\r\n\r\n        Write a new path to store files\r\n    ..settings.ini [GLOBAL] section: {'blacklist_enable': 'True', 'save_to_dir': 'f:\\\\31'}\r\n    Enter a new path, OS syntax (f:\\10 or /home ) -->:\r\n\r\nThe default path is the directory of the module.\r\nIn most cases you want to store grabbed files somewhere else.\r\n\r\nBlacklist Menu\r\n^^^^^^^^^^^^^^\r\n::\r\n\r\n    Write a new blacklist option to settings.ini file\r\n    ..settings.ini [GLOBAL] section: {'blacklist_enable': 'True', 'save_to_dir': 'f:\\\\31'}\r\n    1 -- blacklist on (don't write title if already downloaded)\r\n    2 -- blacklist off\r\n    3 -- Back to Main Menu\r\n    Enter your choice: 1\r\n\r\n    \tblacklist is ON: settings.ini file\r\n    \tExisting titles are not recorded again and again.\r\n    file name is \"blacklist.json\" in the same folder as \"settings.ini\"\r\n    ..settings.ini [GLOBAL] section: {'blacklist_enable': 'True', 'save_to_dir': 'f:\\\\31'}\r\n    Hit Enter to leave -->:\r\n\r\n| Blacklist writing can be switched on/off.\r\n| Titles are listed for each of the radios and can be deleted to 'unlist' them.\r\n| File name is ``blacklist.json`` and always in the same folder as 'settings.ini'.\r\n\r\n\r\nSet path to config\r\n^^^^^^^^^^^^^^^^^^\r\n::\r\n\r\n    Write Path to settings.ini and blacklist.json file\r\n    Enter a new path, OS syntax (f:\\10 or /home ) -->: F:\\44\r\n    \tcreated: F:\\44\r\n    ..settings.ini [GLOBAL] section: {'blacklist_enable': 'True'}\r\n    Hit Enter to leave -->:\r\n\r\n| You can store your config file 'settings.ini' somewhere on the file system.\r\n| Default place for grabbed files is the mentioned folder.\r\n| If a custom save path is written to config, this path is used.\r\n\r\n\r\naac file repair\r\n^^^^^^^^^^^^^^^\r\n::\r\n\r\n    Write a path to aac files. Only aac files will be touched.\r\n    ..settings.ini [GLOBAL] section: {'blacklist_enable': 'True', 'save_to_dir': 'f:\\\\31'}\r\n    Enter a path, OS syntax (f:\\10 or /home ) -->:f:\\6aac\r\n    \tcreated: f:\\6aac\r\n    \tf:\\6aac\\aac_repair created\r\n    [ COPY(s) in f:\\6aac\\aac_repair ]\r\n    ----- 1 file(s) failed -----\r\n    f:\\6aac\\Sergey Sirotin & Golden Light Orchestra - Around The World.aacp\r\n    ValueError non-hexadecimal number found in fromhex() arg at position 5438113\r\n    ----- 97 file(s) repaired -----\r\n    f:\\6aac\\111_Slovo_Original_Mix.aac; cut(bytes): [330]\r\n    f:\\6aac\\351 Lake Shore Drive - You Make My Day.aacp; cut(bytes): [389]\r\n\r\n| The repair option uses a folder name as input.\r\n| Repaired files are stored in 'aac_repair' sub folder.\r\n| Cut bytes count is shown at the end of the line.\r\n| Repair can fail if the file is corrupted not only at start or end.\r\n\r\n\r\nPip Install\r\n^^^^^^^^^^^\r\n::\r\n\r\n   \"\"\" Linux \"\"\"\r\n   $ pip3 install ghettorecorder\r\n\r\n   \"\"\" Windows \"\"\"\r\n   > pip install ghettorecorder\r\n\r\n\r\nUninstall\r\n^^^^^^^^^\r\n\r\nPython user\r\n\r\n * find the module location\r\n * uninstall and then remove remnants\r\n\r\nremove::\r\n\r\n   >$ pip3 show ghettorecorder\r\n   >$ pip3 uninstall ghettorecorder\r\n\r\nLocation: ... /python310/site-packages\r\n\r\nGhettoRecorder module\r\n~~~~~~~~~~~~~~~~~~~~~~\r\nCommunication with the GhettoRecorder instance\r\n\r\n       ========= ================= ======================================================\r\n       port      action            description\r\n       ========= ================= ======================================================\r\n       com_in    commands input    tuple (radio, [str 'eval' or 'exec'], str 'command')\r\n       com_out   status, err msg   (radio, [str 'eval' or 'exec'], response)\r\n       audio_out copy of html resp server can loop through to a browser\r\n       ========= ================= ======================================================\r\n\r\nFeature attributes to switch on/off\r\n\r\n       ========================== ==================================================================================\r\n       attribute                  description\r\n       ========================== ==================================================================================\r\n       runs_meta                  call metadata periodically, create path for rec out; False: recorder is the file\r\n       runs_record                disable writing to recorder file at all\r\n       recorder_file_write        allow dumping current recorder file\r\n       runs_listen                disable write to audio output queue; 3rd party can grab it. (listen blacklist)\r\n       ========================== ==================================================================================\r\n\r\nSnapcraft package\r\n~~~~~~~~~~~~~~~~~~\r\nThe installer creates an icon with the name \"GhettoRecorder\".\r\nYou can use two command line options.::\r\n\r\n    ghettorecorder.url\r\n    ghettorecorder.cmd\r\n\r\nFirst is Client, Server connection.\r\nSecond is command line menu.\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "multiprocessor capable internet radio grabber",
    "version": "3.0",
    "project_urls": {
        "documentation": "https://GhettoRecorder.readthedocs.io/",
        "homepage": "https://github.com/44xtc44",
        "repository": "https://github.com/44xtc44/GhettoRecorder"
    },
    "split_keywords": [
        "internet",
        "radio",
        "grabber"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "00a2cb4070cd83929c99d0b714d8942b77a6473cddeed5abba60e8751dc84110",
                "md5": "c026b0607d44bdac2d05079d4fdd4be8",
                "sha256": "0b292d9604657330ef23a6f9be7e654c27e1b4b353dfee055980a6f2b74bdf0b"
            },
            "downloads": -1,
            "filename": "GhettoRecorder-3.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c026b0607d44bdac2d05079d4fdd4be8",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 90503,
            "upload_time": "2023-06-02T16:36:53",
            "upload_time_iso_8601": "2023-06-02T16:36:53.785617Z",
            "url": "https://files.pythonhosted.org/packages/00/a2/cb4070cd83929c99d0b714d8942b77a6473cddeed5abba60e8751dc84110/GhettoRecorder-3.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "82f60ea8aefa7b2ed79f3e42abe170d7cfa3371b0950a7a6c4a2c3c124100f97",
                "md5": "a4c56266af9badc6b106d603d145c3b2",
                "sha256": "a37d0abfd15ba1c7b00d762f829b3a540bf3f000b42cbbfad41890a462f91b3a"
            },
            "downloads": -1,
            "filename": "GhettoRecorder-3.0.tar.gz",
            "has_sig": false,
            "md5_digest": "a4c56266af9badc6b106d603d145c3b2",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 81859,
            "upload_time": "2023-06-02T16:36:56",
            "upload_time_iso_8601": "2023-06-02T16:36:56.297558Z",
            "url": "https://files.pythonhosted.org/packages/82/f6/0ea8aefa7b2ed79f3e42abe170d7cfa3371b0950a7a6c4a2c3c124100f97/GhettoRecorder-3.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-06-02 16:36:56",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "44xtc44",
    "github_project": "GhettoRecorder",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "ghettorecorder"
}
        
Elapsed time: 0.08094s