From ba737cbf7ba0e35cbce48e6d26227c34d40db22b Mon Sep 17 00:00:00 2001 From: Masen Furer Date: Mon, 25 Jan 2021 09:08:26 -0800 Subject: [PATCH 1/9] rename `kf7hvm` to `default` make it easier for users to fork and customize --- .../kf7hvm-md-uv380.json => default/example-md-uv380.json} | 0 input/{kf7hvm => default}/generate.sh | 0 input/{kf7hvm => default}/k7abd/Analog__ULTone.csv | 0 input/{kf7hvm => default}/k7abd/Digital-Repeaters__Hotspot.csv | 0 input/{kf7hvm => default}/k7abd/Talkgroups__Hotspot.csv | 0 input/{kf7hvm => default}/order.json | 0 input/{kf7hvm => default}/prox.csv | 0 input/{kf7hvm => default}/scanlists.json | 0 8 files changed, 0 insertions(+), 0 deletions(-) rename input/{kf7hvm/kf7hvm-md-uv380.json => default/example-md-uv380.json} (100%) rename input/{kf7hvm => default}/generate.sh (100%) rename input/{kf7hvm => default}/k7abd/Analog__ULTone.csv (100%) rename input/{kf7hvm => default}/k7abd/Digital-Repeaters__Hotspot.csv (100%) rename input/{kf7hvm => default}/k7abd/Talkgroups__Hotspot.csv (100%) rename input/{kf7hvm => default}/order.json (100%) rename input/{kf7hvm => default}/prox.csv (100%) rename input/{kf7hvm => default}/scanlists.json (100%) diff --git a/input/kf7hvm/kf7hvm-md-uv380.json b/input/default/example-md-uv380.json similarity index 100% rename from input/kf7hvm/kf7hvm-md-uv380.json rename to input/default/example-md-uv380.json diff --git a/input/kf7hvm/generate.sh b/input/default/generate.sh similarity index 100% rename from input/kf7hvm/generate.sh rename to input/default/generate.sh diff --git a/input/kf7hvm/k7abd/Analog__ULTone.csv b/input/default/k7abd/Analog__ULTone.csv similarity index 100% rename from input/kf7hvm/k7abd/Analog__ULTone.csv rename to input/default/k7abd/Analog__ULTone.csv diff --git a/input/kf7hvm/k7abd/Digital-Repeaters__Hotspot.csv b/input/default/k7abd/Digital-Repeaters__Hotspot.csv similarity index 100% rename from input/kf7hvm/k7abd/Digital-Repeaters__Hotspot.csv rename to input/default/k7abd/Digital-Repeaters__Hotspot.csv diff --git a/input/kf7hvm/k7abd/Talkgroups__Hotspot.csv b/input/default/k7abd/Talkgroups__Hotspot.csv similarity index 100% rename from input/kf7hvm/k7abd/Talkgroups__Hotspot.csv rename to input/default/k7abd/Talkgroups__Hotspot.csv diff --git a/input/kf7hvm/order.json b/input/default/order.json similarity index 100% rename from input/kf7hvm/order.json rename to input/default/order.json diff --git a/input/kf7hvm/prox.csv b/input/default/prox.csv similarity index 100% rename from input/kf7hvm/prox.csv rename to input/default/prox.csv diff --git a/input/kf7hvm/scanlists.json b/input/default/scanlists.json similarity index 100% rename from input/kf7hvm/scanlists.json rename to input/default/scanlists.json From 24cd2efc0c4c5578ab9e28ebd34d978d70205e8a Mon Sep 17 00:00:00 2001 From: Masen Furer Date: Mon, 25 Jan 2021 09:08:52 -0800 Subject: [PATCH 2/9] example-md-uv380.json: remove my DMR ID and call avoid simple mistakes (and other people transmitting as me) --- input/default/example-md-uv380.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/input/default/example-md-uv380.json b/input/default/example-md-uv380.json index ba44466..7170ce3 100644 --- a/input/default/example-md-uv380.json +++ b/input/default/example-md-uv380.json @@ -186,11 +186,11 @@ "PrivateCallMatch": "On", "PublicZone": "On", "PwAndLockEnable": "Off", - "RadioID": "3171501", + "RadioID": "1234567", "RadioID1": "1", "RadioID2": "2", "RadioID3": "3", - "RadioName": "KF7HVM", + "RadioName": "AA1AA", "RadioProgPassword": "", "RxLowBatteryInterval": "120", "SaveModeReceive": "On", From 9abd74546103beabce117b28a37e36caa9ea6d41 Mon Sep 17 00:00:00 2001 From: Masen Furer Date: Mon, 25 Jan 2021 10:17:54 -0800 Subject: [PATCH 3/9] default/generate.sh: remove hardcoded output dir Quote all paths, because they may contain spaces. --- input/default/generate.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/input/default/generate.sh b/input/default/generate.sh index 40ecb3a..a0494f1 100755 --- a/input/default/generate.sh +++ b/input/default/generate.sh @@ -6,9 +6,9 @@ python -m dzcb \ --pnwdigital \ --seattledmr \ --default-k7abd \ - --repeaterbook-proximity-csv $DIR/prox.csv \ + --repeaterbook-proximity-csv "$DIR/prox.csv" \ --k7abd $DIR/k7abd \ - --farnsworth-template-json $DIR/kf7hvm-md-uv380.json \ - --scanlists-json $DIR/scanlists.json \ - --order-json $DIR/order.json \ -$OUTPUT/kf7hvm + --farnsworth-template-json "$DIR/example-md-uv380.json" \ + --scanlists-json "$DIR/scanlists.json" \ + --order-json "$DIR/order.json" \ +$OUTPUT/$(basename "$DIR") From 4f87649f1a390152e1897f0c8c6da163bca4051e Mon Sep 17 00:00:00 2001 From: Masen Furer Date: Mon, 25 Jan 2021 10:18:31 -0800 Subject: [PATCH 4/9] tox.ini: support macos style `find` macos doesn't ship GNU find, and doesn't have the `-executable` filter, so fall back to `-perm +111` on mac plaforms. --- tox.ini | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tox.ini b/tox.ini index aa0e3a6..967a67a 100644 --- a/tox.ini +++ b/tox.ini @@ -2,13 +2,19 @@ minversion = 3.7.0 skipsdist = true allowlist_external = /usr/bin/env -envlist = py3 +envlist = py3-{linux,mac} [testenv] +platform = + linux: linux + mac: darwin passenv = OUTPUT REPEATERBOOK_USER REPEATERBOOK_PASSWD +setenv = + !mac: FIND_OPTS = -executable + mac: FIND_OPTS = -perm '+111' deps = dzcb~=0.1 commands = /usr/bin/env find {toxinidir}/input \ -name "generate.sh" \ - -executable -exec \{\} ; + {env:FIND_OPTS} -exec \{\} ; From 085a401eb7ed394d7f34c40933219519e10f8621 Mon Sep 17 00:00:00 2001 From: Masen Furer Date: Mon, 25 Jan 2021 10:19:35 -0800 Subject: [PATCH 5/9] README.md: update fork/customize instructions remove references to kf7hvm and link directly to files --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index ddc4e73..cbad1d9 100644 --- a/README.md +++ b/README.md @@ -44,9 +44,9 @@ codeplugs will be generated. * Fork this repo * In the newly forked repo, click the "Actions" tab and enable Github Actions for your fork. -* Rename `input/kf7hvm` to `input/your-call` -* customize generate.sh and other files - * `kf7hvm-md-uv380.json`: set your Radio ID and Radio Name +* customize [`generate.sh`](./input/default/generate.sh) and other + files in [`/input/default`](./input/default) + * `example-md-uv380.json`: set your Radio ID and Radio Name * Copy templates from [default-tyt-md380](https://github.com/mycodeplug/dzcb/blob/main/codeplug/default-tyt-md380) for monoband variants. * `order.json`: preferred zone order, zone exclusion, preferred talkgroup order From fd45dcd5ee1d02eb6dbeaeda0ff1ca8a900a6c8a Mon Sep 17 00:00:00 2001 From: Masen Furer Date: Mon, 25 Jan 2021 10:22:11 -0800 Subject: [PATCH 6/9] README.md: more links into example input files --- README.md | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index cbad1d9..bb0e2f8 100644 --- a/README.md +++ b/README.md @@ -46,16 +46,20 @@ codeplugs will be generated. enable Github Actions for your fork. * customize [`generate.sh`](./input/default/generate.sh) and other files in [`/input/default`](./input/default) - * `example-md-uv380.json`: set your Radio ID and Radio Name - * Copy templates from [default-tyt-md380](https://github.com/mycodeplug/dzcb/blob/main/codeplug/default-tyt-md380) for - monoband variants. - * `order.json`: preferred zone order, zone exclusion, preferred talkgroup order - * `scanlists.json`: additional scanlists + * [`example-md-uv380.json`](./input/default/example-md-uv380.json): + set your Radio ID and Radio Name + * Copy templates from + [default-tyt-md380](https://github.com/mycodeplug/dzcb/blob/main/codeplug/default-tyt-md380) + for monoband variants. + * [`order.json`](./input/default/order.json): preferred zone order, + zone exclusion, preferred talkgroup order + * [`scanlists.json`](./input/default/scanlists.json): additional scanlists * To use Repeaterbook, go to [Settings > Secrets](../../settings/secrets/actions) and set the following variables: * REPEATERBOOK_USER * REPEATERBOOK_PASSWD - * `prox.csv`: customize zones + * [`prox.csv`](./input/default/prox.csv): customize points of + interest, distances, and desired bands * Github [`codeplugs`](.github/workflows/codeplugs.yml) workflow will automatically build all codeplugs in the [`input`](./input) directory. * When a [Release](../../releases) is published, the generated From 13015c151429e0ad273ab52ef7cca22e512b527f Mon Sep 17 00:00:00 2001 From: Masen Furer Date: Mon, 25 Jan 2021 10:28:26 -0800 Subject: [PATCH 7/9] README.md: mention k7abd input directory link to N7EKB's great collection of K7ABD zones --- README.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index bb0e2f8..2874d23 100644 --- a/README.md +++ b/README.md @@ -44,16 +44,21 @@ codeplugs will be generated. * Fork this repo * In the newly forked repo, click the "Actions" tab and enable Github Actions for your fork. -* customize [`generate.sh`](./input/default/generate.sh) and other - files in [`/input/default`](./input/default) +* customize codeplug input files in [`/input/default`](./input/default) * [`example-md-uv380.json`](./input/default/example-md-uv380.json): set your Radio ID and Radio Name * Copy templates from [default-tyt-md380](https://github.com/mycodeplug/dzcb/blob/main/codeplug/default-tyt-md380) for monoband variants. + * [`k7abd`](./input/default/k7abd): manually defined zones in + K7ABD anytone-config-builder format. See N7EKB's + [`cps-import-builder` reference data files](https://github.com/n7ekb/cps-import-builder/tree/main/reference_data_files/N7EKB_shared_files) + for more examples. * [`order.json`](./input/default/order.json): preferred zone order, zone exclusion, preferred talkgroup order * [`scanlists.json`](./input/default/scanlists.json): additional scanlists + * [`generate.sh`](./input/default/generate.sh): options passed to `dzcb` (whether + to include PNWDigital, SeattleDMR, default files, etc) * To use Repeaterbook, go to [Settings > Secrets](../../settings/secrets/actions) and set the following variables: * REPEATERBOOK_USER From 046ceef57af38682ea99bde6cc478cca19110aaa Mon Sep 17 00:00:00 2001 From: Masen Furer Date: Mon, 25 Jan 2021 10:36:16 -0800 Subject: [PATCH 8/9] README.md: link to Fork and Actions tab reduce friction for those following the steps --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2874d23..ebcf137 100644 --- a/README.md +++ b/README.md @@ -41,8 +41,8 @@ codeplugs will be generated. ### Github Actions -* Fork this repo - * In the newly forked repo, click the "Actions" tab and +* [Fork this repo](../../fork) + * In the newly forked repo, click the ["Actions" tab](../../actions) and enable Github Actions for your fork. * customize codeplug input files in [`/input/default`](./input/default) * [`example-md-uv380.json`](./input/default/example-md-uv380.json): From de8295ddf293664831856cb08e96bbe024311bda Mon Sep 17 00:00:00 2001 From: Masen Furer Date: Mon, 25 Jan 2021 10:37:50 -0800 Subject: [PATCH 9/9] README.md: link directly to Radio ID and Name --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ebcf137..ca76ec8 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ codeplugs will be generated. * In the newly forked repo, click the ["Actions" tab](../../actions) and enable Github Actions for your fork. * customize codeplug input files in [`/input/default`](./input/default) - * [`example-md-uv380.json`](./input/default/example-md-uv380.json): + * [`example-md-uv380.json`](./input/default/example-md-uv380.json#L189-L193): set your Radio ID and Radio Name * Copy templates from [default-tyt-md380](https://github.com/mycodeplug/dzcb/blob/main/codeplug/default-tyt-md380)