File tree Expand file tree Collapse file tree 3 files changed +65
-5
lines changed
Expand file tree Collapse file tree 3 files changed +65
-5
lines changed Original file line number Diff line number Diff line change 1+ #
2+ # mycodeplug/example-codeplug generated $ISODATE
3+ # by dzcb (https://github.com/mycodeplug/dzcb)
4+ #
5+ # !dzcb.ranges: 136-174,400-480
6+ Radio: Anytone AT-D878UV
7+
8+ # Table of text messages.
9+ # 1) Message number: 1-100
10+ # 2) Text: up to 200 characters
11+ #
12+ Message Text
13+ 1 Hello
14+ 2 Thank you
15+ 3 73
16+ 4 QTH?
17+ 5 Test message
18+
19+ # Unique DMR ID and name of this radio.
20+ ID: 12345678
21+ Name: AA1AA
22+
23+ # Text displayed when the radio powers up.
24+ Intro Line 1: $DATE
25+ Intro Line 2: PNWDigital
Original file line number Diff line number Diff line change 1+ #!/usr/bin/env python3
2+
3+ # This generates the same codeplug as generate.sh
4+ # using python code.
5+
6+ from pathlib import Path
7+ import os
8+
9+ from dzcb .recipe import CodeplugRecipe
10+
11+ cp_dir = Path (__file__ ).parent
12+ output = Path (os .environ .get ("OUTPUT" ) or (cp_dir / ".." / ".." / "OUTPUT" ))
13+
14+ CodeplugRecipe (
15+ source_pnwdigital = True ,
16+ source_seattledmr = True ,
17+ source_default_k7abd = True ,
18+ source_k7abd = [(cp_dir / "k7abd" )],
19+ source_repeaterbook_proximity = cp_dir / "prox.csv" ,
20+ repeaterbook_states = ["washington" , "oregon" ],
21+ scanlists_json = cp_dir / "scanlists.json" ,
22+ exclude = cp_dir / "exclude.csv" ,
23+ order = cp_dir / "order.csv" ,
24+ replacements = cp_dir / "replacements.csv" ,
25+ output_anytone = True ,
26+ output_dmrconfig = [(cp_dir / "example-d878uv.conf" )],
27+ output_farnsworth = [(cp_dir / "example-md-uv380.json" )],
28+ output_gb3gf = True
29+ ).generate (output / cp_dir .name )
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22
3+ # This generates the same codeplug as generate.py
4+ # using bash scripting. Linux or macOS only.
5+
36DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " > /dev/null 2>&1 && pwd ) "
47OUTPUT=${OUTPUT:- $DIR / ../ ../ OUTPUT}
58python -m dzcb \
69 --pnwdigital \
710 --seattledmr \
811 --default-k7abd \
9- --repeaterbook-state washington oregon \
10- --repeaterbook-proximity-csv " $DIR /prox.csv" \
1112 --k7abd $DIR /k7abd \
12- --farnsworth-template-json " $DIR /example-md-uv380.json" \
13- --order " $DIR /order.csv" \
13+ --repeaterbook-proximity-csv " $DIR /prox.csv" \
14+ --repeaterbook-state washington oregon \
15+ --scanlists-json " $DIR /scanlists.json" \
1416 --exclude " $DIR /exclude.csv" \
17+ --order " $DIR /order.csv" \
1518 --replacements " $DIR /replacements.csv" \
16- --scanlists-json " $DIR /scanlists.json" \
19+ --anytone \
20+ --dmrconfig " $DIR /example-d878uv.conf" \
21+ --farnsworth-template-json " $DIR /example-md-uv380.json" \
22+ --gb3gf \
1723-- " $OUTPUT /$( basename " $DIR " ) "
You can’t perform that action at this time.
0 commit comments