# BC125Py
A Python-based interface for the Uniden BC125AT radio scanner.
This project aims to be a Linux replacement for the Windows-only
Uniden software for the BC125AT. Presently, BC125Py only has a
command line interface, but couples well with Libreoffice Calc/MS Excel. Rest assured, the
CLI is not hard to use at all! View the [changelog here](CHANGELOG.md).
# Installation
`sudo pip install bc125py`
*It is recommended to install bc125py as root.*
# Quick Start
Most commands **must be ran as root**.
Plug the BC125AT into your computer, and power the device on.
### Import scanner channels
`sudo bc125py import --csv channels.csv`
Then, edit the CSV file in a spreadsheet editor!
**Note:** Depending on your CSV editor, the channels may be offset by 1 or 2
**Note:** All 500 channels are together. Bank 1 starts at 1 or 2, bank 2 starts at 51 or 52, etc...
**Note:** omitting the `--csv` flag will import all channels
**and** settings, and use the **json** file format.
### Export channels to scanner
`sudo bc125py export --csv channels.csv`
**Note:** omitting the `--csv` flag will export all channels
**and** settings, and use the **json** file format.
### Validate your files before exporting (sudo-less)
`bc125py validate scanner.json` or `bc125py validate --csv scanner.csv`
### Launch scanner shell
`sudo bc125py shell`
The shell allows you to send commands directly to the device.
The `shell` subcommand accepts a script filename as an optional parameter.
Specifying `-` as the input script will tell the shell to read from stdin.
The shell remembers its history by default. This can be cleared by deleting
`~/.bc125py_history` (but usually for the root user), or by running the shell
subcommand with the `-c` or `--clear-history` flags.
### Factory reset the scanner
`sudo bc125py wipe`
This will **erase all channels** and reset all settings.
### Rescue the scanner from Program Mode
`sudo bc125py unlock`
# More Usage
The following are top level flags, to be use after the
`bc125py` but before the subcommand.
| Flag | Usage |
| --- | --- |
| `-v` | Enable debug messages |
| `-l`, `--log` LOG | Additionally print all debug messages to LOG_FILE |
| `-p`, `--port` PORT | Force BC125Py to use port (device file) PORT |
| `--legacy-detect` | Use the legacy automatic port detection method. Try this if BC125Py does not initially detect your scanner. This may produce duplicate results |
### import/export and `--csv`
By default, import and export will process all of the scanner's channels
and settings, and work with json files. The `--csv` flag tells these
command to process channels only, and work with csv files.
### Shell Scripts
The `shell` subcommand accepts an optional parameter for an input file,
to be processed as a script. Run `help` once inside the shell to learn
more. The recommended extension for these scripts is `.125at`; see
the [docs directory](docs/) for examples.
### Human-Friendly CTCSS/DCS Tones
As of version 0.10.0, bc125py supports human-friendly CTCSS/DCS tones.
Your old save files will still work. To view a list of possible tone values,
run `bc125py --help-tones`
### TLP
TLP, a power management tool on some laptops,
may interfere with the operation of BC125Py.
To use BC125Py on a TLP-enabled laptop, follow
[this guide](https://askubuntu.com/questions/1239176/how-to-disable-tlp)
to disable it. This is easily reversible afterwards.
If you are aware of a better way to work around TLP, please fork and submit a PR!
### stdin/stdout
The import, export, and shell subcommands may accept a single dash
( `-` ) as a filename to use stdin/stdout. In this mode, the `import`
subcommand will write to stdout. `export` and `shell` will read from stdin.
# Contributing
* The module `bc125py`, excluding `app`, should only contain library (non-executable) code.
* `sdo.py` shall be for all scanner-data abstraction classes.
* The `app` module shall be for all executable code.
* `app/cli.py` shall be the CLI portion of the program.
* `app/core.py` shall be all common functions for the executable portion of the program, both CLI and GUI.
* `app/log.py` shall be the logger. **Use the logger wherever possible!**
The 'main' branch shall be the most up-to-date version of the project. Once the main branch reaches
stability, the version number will be incremented, a release will be generated, and a 'release-x.x.x'
branch will be created to preserve the repository at its state.
Raw data
{
"_id": null,
"home_page": "https://github.com/itsmaxymoo/bc125py",
"name": "bc125py",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": null,
"author": "Max Loiacono",
"author_email": "max.loiacono@protonmail.com",
"download_url": "https://files.pythonhosted.org/packages/15/f3/b00b1d67ccc37435441371e3ba77e58a7a7353674cb7b9e2890e1f89e3d0/bc125py-1.0.0.tar.gz",
"platform": null,
"description": "# BC125Py\n\nA Python-based interface for the Uniden BC125AT radio scanner.\n\nThis project aims to be a Linux replacement for the Windows-only\nUniden software for the BC125AT. Presently, BC125Py only has a\ncommand line interface, but couples well with Libreoffice Calc/MS Excel. Rest assured, the\nCLI is not hard to use at all! View the [changelog here](CHANGELOG.md).\n\n\n# Installation\n\n`sudo pip install bc125py`\n\n*It is recommended to install bc125py as root.*\n\n\n# Quick Start\n\nMost commands **must be ran as root**.\n\nPlug the BC125AT into your computer, and power the device on.\n\n### Import scanner channels\n\n`sudo bc125py import --csv channels.csv`\n\nThen, edit the CSV file in a spreadsheet editor!\n\n**Note:** Depending on your CSV editor, the channels may be offset by 1 or 2 \n**Note:** All 500 channels are together. Bank 1 starts at 1 or 2, bank 2 starts at 51 or 52, etc... \n**Note:** omitting the `--csv` flag will import all channels \n**and** settings, and use the **json** file format.\n\n### Export channels to scanner\n\n`sudo bc125py export --csv channels.csv`\n\n**Note:** omitting the `--csv` flag will export all channels\n**and** settings, and use the **json** file format.\n\n### Validate your files before exporting (sudo-less)\n\n`bc125py validate scanner.json` or `bc125py validate --csv scanner.csv`\n\n### Launch scanner shell\n\n`sudo bc125py shell`\n\nThe shell allows you to send commands directly to the device.\nThe `shell` subcommand accepts a script filename as an optional parameter.\nSpecifying `-` as the input script will tell the shell to read from stdin.\n\nThe shell remembers its history by default. This can be cleared by deleting\n`~/.bc125py_history` (but usually for the root user), or by running the shell\nsubcommand with the `-c` or `--clear-history` flags.\n\n### Factory reset the scanner\n\n`sudo bc125py wipe`\n\nThis will **erase all channels** and reset all settings.\n\n### Rescue the scanner from Program Mode\n\n`sudo bc125py unlock`\n\n# More Usage\n\nThe following are top level flags, to be use after the\n`bc125py` but before the subcommand.\n\n| Flag | Usage |\n| --- | --- |\n| `-v` | Enable debug messages |\n| `-l`, `--log` LOG | Additionally print all debug messages to LOG_FILE |\n| `-p`, `--port` PORT | Force BC125Py to use port (device file) PORT |\n| `--legacy-detect` | Use the legacy automatic port detection method. Try this if BC125Py does not initially detect your scanner. This may produce duplicate results |\n\n### import/export and `--csv`\n\nBy default, import and export will process all of the scanner's channels\nand settings, and work with json files. The `--csv` flag tells these\ncommand to process channels only, and work with csv files.\n\n### Shell Scripts\n\nThe `shell` subcommand accepts an optional parameter for an input file,\nto be processed as a script. Run `help` once inside the shell to learn\nmore. The recommended extension for these scripts is `.125at`; see\nthe [docs directory](docs/) for examples.\n\n### Human-Friendly CTCSS/DCS Tones\n\nAs of version 0.10.0, bc125py supports human-friendly CTCSS/DCS tones.\nYour old save files will still work. To view a list of possible tone values,\nrun `bc125py --help-tones`\n\n### TLP\n\nTLP, a power management tool on some laptops,\nmay interfere with the operation of BC125Py.\nTo use BC125Py on a TLP-enabled laptop, follow\n[this guide](https://askubuntu.com/questions/1239176/how-to-disable-tlp)\nto disable it. This is easily reversible afterwards.\nIf you are aware of a better way to work around TLP, please fork and submit a PR!\n\n### stdin/stdout\n\nThe import, export, and shell subcommands may accept a single dash\n( `-` ) as a filename to use stdin/stdout. In this mode, the `import`\nsubcommand will write to stdout. `export` and `shell` will read from stdin.\n\n\n# Contributing\n\n* The module `bc125py`, excluding `app`, should only contain library (non-executable) code.\n* `sdo.py` shall be for all scanner-data abstraction classes.\n* The `app` module shall be for all executable code.\n* `app/cli.py` shall be the CLI portion of the program.\n* `app/core.py` shall be all common functions for the executable portion of the program, both CLI and GUI.\n* `app/log.py` shall be the logger. **Use the logger wherever possible!**\n\nThe 'main' branch shall be the most up-to-date version of the project. Once the main branch reaches\nstability, the version number will be incremented, a release will be generated, and a 'release-x.x.x'\nbranch will be created to preserve the repository at its state.\n",
"bugtrack_url": null,
"license": "MIT License",
"summary": "A Python-based interface for the Uniden BC125AT",
"version": "1.0.0",
"project_urls": {
"Bug Tracker": "https://github.com/itsmaxymoo/bc125py/issues",
"Homepage": "https://github.com/itsmaxymoo/bc125py"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "6c554ff63c1c49baa163bdb396bc573509630c1d9207ec61f55e85c958615aa6",
"md5": "85f6d88814f7d2b536a2f8a0fcb120ab",
"sha256": "d5651251d3839e8a9ae6d5e3522d9f3bee7d4c59ce1ed30a5abce89b6b07728e"
},
"downloads": -1,
"filename": "bc125py-1.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "85f6d88814f7d2b536a2f8a0fcb120ab",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 25444,
"upload_time": "2024-08-27T15:18:48",
"upload_time_iso_8601": "2024-08-27T15:18:48.724526Z",
"url": "https://files.pythonhosted.org/packages/6c/55/4ff63c1c49baa163bdb396bc573509630c1d9207ec61f55e85c958615aa6/bc125py-1.0.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "15f3b00b1d67ccc37435441371e3ba77e58a7a7353674cb7b9e2890e1f89e3d0",
"md5": "e432122f3eff895f9d066a6a3a52f18e",
"sha256": "e313b6727f32a658bf4f6cf564ad06a92d138edacd644765ef7434c3c28b0085"
},
"downloads": -1,
"filename": "bc125py-1.0.0.tar.gz",
"has_sig": false,
"md5_digest": "e432122f3eff895f9d066a6a3a52f18e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 27737,
"upload_time": "2024-08-27T15:18:50",
"upload_time_iso_8601": "2024-08-27T15:18:50.264447Z",
"url": "https://files.pythonhosted.org/packages/15/f3/b00b1d67ccc37435441371e3ba77e58a7a7353674cb7b9e2890e1f89e3d0/bc125py-1.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-08-27 15:18:50",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "itsmaxymoo",
"github_project": "bc125py",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [],
"lcname": "bc125py"
}