Skip to content

Commit bdb3256

Browse files
authored
Merge pull request #74 from masenf/beta-docs
Beta Documentation
2 parents de57598 + 1d705e8 commit bdb3256

File tree

6 files changed

+208
-16
lines changed

6 files changed

+208
-16
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -287,8 +287,8 @@ codeplug in `/tmp/my-codeplug` with local simplex zones included.
287287
python -m dzcb \
288288
--pnwdigital \
289289
--seattledmr \
290-
--default-k7abd /tmp/my-codeplug
291-
--dmrconfig
290+
--default-k7abd \
291+
--dmrconfig -- /tmp/my-codeplug
292292
```
293293

294294
# Complex Usage

doc/BETA.md

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# `dzcb` 0.3 Public Beta
2+
3+
Thank you for your interest in beta testing [`dzcb`](https://github.com/mycodeplug/dzcb).
4+
Please remember that this project is developed by a single person in spare time only.
5+
6+
See [HISTORY](./HISTORY.md) for motivation, criticisms, and feature development
7+
backstory.
8+
9+
## Scope of Current Testing
10+
11+
I have personally tested dzcb with the following radios:
12+
13+
* TYT MD-UV380 (editcp JSON and dmrconfig)
14+
* Anytone D878UV (CSV and dmrconfig)
15+
* Radioddity GD-77 (Stock firmware and dmrconfig)
16+
17+
I test the pnwdigital, seattledmr, custom k7abd, and repeaterbook sources.
18+
19+
Additionally, I have tested the exclude, order, and replacements CSV modifications
20+
as well as custom scanlists.
21+
22+
## Testing Needed
23+
24+
Testing is needed for the following popular radios:
25+
26+
* Anytone 578
27+
* TYT MD380 - UHF or VHF only
28+
* BTECH DMR-6x2
29+
* Baofeng RD-5R
30+
31+
Testing is needed for the `include` CSV and repeaterbook name format.
32+
33+
**I would also like feedback on general usability and quality of documentation.**
34+
35+
## Where to Start
36+
37+
At least scan through the [`dzcb` README](/README.md) to get an idea
38+
of what features are available and what formats are supported.
39+
40+
Look at
41+
[`mycodeplug/example-codeplug`](https://github.com/mycodeplug/example-codeplug)
42+
for a fully working example with sample CSV files and scripts to generate the
43+
codeplug.
44+
45+
If you're brand new to codeplug generators and github, please see the
46+
[WALKTHROUGH](/doc/WALKTHROUGH.md) for a step-by-step guide to building a
47+
codeplug online using github actions.
48+
49+
If you already use K7ABD's `anytone-config-builder`, then you likely already have
50+
files that will work with `dzcb`.
51+
52+
For example, to install dzcb and build existing ACB CSV files into dmrconfig codeplug
53+
files (requires python 3.6+):
54+
55+
```
56+
pip install dzcb~=0.3.1
57+
python -m dzcb --k7abd /path/to/existing/acb_csv --dmrconfig -- /tmp/new-codeplug
58+
```
59+
60+
## Known Issues
61+
62+
* Invalid CSV input may cause the program to exit without indicating which file was
63+
problematic. This will be fixed in a later release. See [issue #73](https://github.com/mycodeplug/dzcb/issues/73)
64+
65+
# Support
66+
67+
Unfortunately I'm not able to provide personalized support for connecting your
68+
radio, installing drivers, python, or CPS software, or any general DMR questions.
69+
70+
## Feedback and Feature Requests
71+
72+
Please file an [issue](https://github.com/mycodeplug/dzcb/issues/new) or email
73+
`[email protected]` with any usability feedback or feature requests. Be sure to
74+
include detailed descriptions, example usage, and sample files and command
75+
lines that will help me understand the request.
76+
77+
## Bugs
78+
79+
If you have discovered a bug, please file an
80+
[issue](https://github.com/mycodeplug/dzcb/issues/new) in this repository,
81+
including the full codeplug output directory and log file, the full error
82+
message, operating system and python version, and any other relevant details.

doc/HISTORY.md

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
# `dzcb` History
2+
3+
`dzcb` is written by Masen Furer KF7HVM <[email protected]>.
4+
5+
## Motivation
6+
7+
`dzcb` development began in late October 2020 in response to the lack of
8+
existing tools for creating a TYT MD-UV380 codeplug from a matrix of repeater
9+
frequencies and talkgroups.
10+
11+
The [PNWDigital](http://pnwdigital.net) group publishes information on its
12+
repeater system in standard format CSV files (K7ABD format) which are generated
13+
directly from the network cBridges, and I wanted to use these files to directly
14+
generate a cross-platform compatible codeplug targeting the TYT MD-UV380, using
15+
[editcp](https://www.farnsworth.org/dale/codeplug/editcp/).
16+
17+
And thus `dzcb` was born.
18+
19+
## Criticism
20+
21+
> Why did you need to write 3800 lines of code over 6 months to do what I could
22+
> do with an afternoon and a spreadsheet program?
23+
24+
Well, I _personally_ don't like editing codeplugs by hand, neither in a CPS or
25+
in a spreadsheet.
26+
27+
The CPS experience is hit or miss depending on what radio you have and
28+
any work done in a CPS to edit a codeplug will generally not be applicable
29+
to other radio types. Vendor CPS packages are "different enough" from each
30+
other, often buggy, and only support Windows.
31+
32+
The spreadsheet experience can be slightly better (at least you're using find/replace
33+
instead of clicking through lists and buggy forms). However, the problem
34+
with most CSV import formats is _they key on object name_, so renaming objects
35+
can be problematic, and needs to occur in multiple places (and possibly,
36+
multiple separate files).
37+
38+
Finally, neither CPS nor CSV solve the problem of expanding a list of talkgroups
39+
across a single repeater, and the existing tools only support Anytone CPS format.
40+
41+
_(Please email [email protected] with further criticism and I will respond publicly here)_
42+
43+
44+
## Feature Development
45+
46+
### Repeaterbook
47+
48+
Since [repeaterbook](http://repeaterbook.com) is the primary source of analog
49+
repeater information in the region, I added support for automatically
50+
downloading up-to-date repeater records and formatting those in the same K7ABD
51+
analog format.
52+
53+
Rather than download and assemble the zone/channel CSV by hand (copy/paste from
54+
RB), it made more sense to define a new CSV file with points of interest,
55+
distances, and desired bands to create the channels entries fresh whenever the
56+
codeplug is built.
57+
58+
When repeater information is incorrect in the codeplug, it can be updated on
59+
Repeaterbook to benefit everyone.
60+
61+
### More Output Formats
62+
63+
Along the way, additional output formats were added based on recommendation
64+
or needs.
65+
66+
#### GB3GF OpenGD77
67+
68+
This format is the only good way to represent an OpenGD77 codeplug in CSV format
69+
and is a defacto standard in the opengd77 world.
70+
71+
Because the opengd77 firmware handles static talkgroups much differently than
72+
other common radios, it required a significant restructuring of the internal
73+
representation of the codeplug. Ultimately this architectural change made it
74+
easier to represent a single channel with multiple talkgroups which could later
75+
be expanded into multiple channels.
76+
77+
#### Anytone CSV
78+
79+
Anytone radios are popular and many people prefer to use the official CPS despite
80+
the fact that it only runs on windows. Support for Anytone CPS import format was
81+
added to achieve parity with existing codeplug generators. The implementation is
82+
flexible such that future CPS format changes can be easily accomodated.
83+
84+
#### dmrconfig
85+
86+
On the advice of Dave W7NCX, support for the cross platform cli tool
87+
[`dmrconfig`](https://github.com/OpenRTX/dmrconfig) textual codeplug
88+
format was added.
89+
90+
### Advanced Filtering
91+
92+
In response to user feedback, a new CSV format was created to allow an end user
93+
to customize names, include/exclude objects, and reorder zones, contacts, and
94+
channels within a codeplug.
95+
96+
These modifications are performed against the original source files so there is
97+
no "manual" effort when the upstream data source updates the talkgroup deck,
98+
color code or frequency. The name and ordering will be applied to the updated
99+
channels as before.
100+
101+
### `example-codeplug`
102+
103+
An [example codeplug](https://github.com/mycodeplug/example-codeplug) and
104+
additional documentation was added to facilitate use by others in the
105+
community.

doc/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
11
# dzcb
22

33
Docs and supporting files
4+
5+
* [WALKTHROUGH](./WALKTHROUGH.md) - step-by-step guide for building codeplug
6+
* [BETA](./BETA.md) - beta testing guidelines
7+
with github actions
8+
* [HISTORY](./HISTORY.md) - motivation, criticism, and feature development history

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def read(*parts):
2020
long_description_content_type='text/markdown',
2121
author='Masen Furer',
2222
author_email='[email protected]',
23-
url='https://github.com/masenf/dzcb',
23+
url='https://github.com/mycodeplug/dzcb',
2424
package_dir={"": 'src'},
2525
package_data={'dzcb': ['data/*.json', 'data/*.csv', 'data/k7abd/*.csv', 'data/farnsworth/*.json', 'data/dmrconfig/*.conf']},
2626
packages=setuptools.find_packages('src'),

src/dzcb/k7abd.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -149,20 +149,20 @@ def Analog_from_csv(analog_repeaters_csv):
149149
zones = {}
150150
csvr = csv.DictReader(analog_repeaters_csv)
151151
for r in csvr:
152-
zname = r[ZONE]
153-
zname, found, code = zname.partition(";")
154-
name = r[CHANNEL_NAME]
155-
frequency = float(r[RX_FREQ])
156-
offset = round(float(r[TX_FREQ]) - frequency, 1)
157-
power = r[POWER]
158-
bandwidth = r[BANDWIDTH].rstrip("K")
159-
tone_encode = (
160-
r[CTCSS_ENCODE] if r[CTCSS_ENCODE].lower() not in ("off", "") else None
161-
)
162-
tone_decode = (
163-
r[CTCSS_DECODE] if r[CTCSS_DECODE].lower() not in ("off", "") else None
164-
)
165152
try:
153+
zname = r[ZONE]
154+
zname, found, code = zname.partition(";")
155+
name = r[CHANNEL_NAME]
156+
frequency = float(r[RX_FREQ])
157+
offset = round(float(r[TX_FREQ]) - frequency, 1)
158+
power = r[POWER]
159+
bandwidth = r[BANDWIDTH].rstrip("K")
160+
tone_encode = (
161+
r[CTCSS_ENCODE] if r[CTCSS_ENCODE].lower() not in ("off", "") else None
162+
)
163+
tone_decode = (
164+
r[CTCSS_DECODE] if r[CTCSS_DECODE].lower() not in ("off", "") else None
165+
)
166166
zones.setdefault(zname, []).append(
167167
AnalogChannel(
168168
name=name,

0 commit comments

Comments
 (0)