-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinstall.txt
More file actions
187 lines (127 loc) · 4.46 KB
/
install.txt
File metadata and controls
187 lines (127 loc) · 4.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
#########################################################
## FCC AMATEUR RADIO CALLSIGN DATABASE LOOKUP
## a.k.a. "HAMSEARCH"
## v.3.0 ALPHA
## Copyright (c) 2022-2026, Richard L. Gattie II, KB2MOB
## Distributed under the BSD License
#########################################################
You can try HamSearch on the Radio Freqs & Geeks BBS.
SSH : radiofreqsandgeeksbbs.amigaz.org:2222
Telnet : radiofreqsandgeeksbbs.amigaz.org:2323
------------------------------------------------------------
OVERVIEW
------------------------------------------------------------
HamSearch is a Mystic BBS Python 3 script that looks up amateur
radio callsigns using FCC ULS data.
The package includes:
- hamserach.mpy = Mystic search script
- getdb.py = FCC download / extract / SQLite build script
- hshdr.ans = ANSI header file
The recommended setup uses SQLite for lookups.
------------------------------------------------------------
INSTALLATION
------------------------------------------------------------
1. CREATE A HAMSEARCH DIRECTORY
Create a directory for HamSearch inside your Mystic scripts area.
Example:
/mystic/themes/default/scripts/hamsearch/
2. COPY THE FILES
Place these files in that directory:
- hamserach.mpy
- getdb.py
- hshdr.ans
3. RUN getdb.py
Run getdb.py from the HamSearch directory on your host system.
Example:
python3 getdb.py
This should:
- download the FCC amateur ZIP file
- create a data directory if needed
- extract the FCC data files
- build data/hamsearch.db
After it finishes, you should have a structure similar to this:
hamsearch/
hamserach.mpy
getdb.py
hshdr.ans
hamsearch.log
data/
AM.dat
EN.dat
HD.dat
HS.dat
hamsearch.db
4. EDIT THE DATABASE PATH IN hamserach.mpy
Open hamserach.mpy and edit the DB_FOLDER setting so it points to
your HamSearch data directory.
Example:
DB_FOLDER = "/home/youruser/mystic/themes/default/scripts/hamsearch/data/"
Make sure the path points to the folder that contains:
- hamsearch.db
- EN.dat
- AM.dat
- HD.dat
- HS.dat
5. SET FILE PERMISSIONS
Make sure the Mystic process/user can read:
- hamserach.mpy
- hshdr.ans
- the data directory
- hamsearch.db
- the extracted FCC .dat files
6. ADD A MENU COMMAND IN MYSTIC
In Mystic, add a menu item that runs the HamSearch script using the
Python 3 MPY menu command.
Use command:
GZ
For the script data/path, point it at hamserach.mpy according to your
Mystic setup.
Example concept:
Command : GZ
Data : /full/path/to/hamserach.mpy
7. TEST THE SCRIPT
Log into your BBS and run HamSearch.
Test these cases:
- a valid callsign
- an invalid callsign
- pressing ENTER on a blank input
- a callsign with a previous callsign, if available
------------------------------------------------------------
NOTES
------------------------------------------------------------
- The script is intended to use SQLite first for faster lookups.
- If SQLite is missing, the script can fall back to flat FCC files.
- Running getdb.py again later should refresh the FCC data and rebuild
the SQLite database.
- hamsearch.log can be used to review update/build activity.
------------------------------------------------------------
TROUBLESHOOTING
------------------------------------------------------------
If HamSearch says it cannot find the database:
- verify DB_FOLDER in hamserach.mpy
- verify data/hamsearch.db exists
- verify Mystic can read the files
- verify getdb.py completed successfully
If the menu item does not work:
- confirm you used GZ, not GX or GY
- confirm Mystic is configured for Python 3 MPY scripts
- confirm the script path is correct
If searches fail:
- re-run getdb.py
- inspect hamsearch.log
- verify the FCC files were extracted into the data directory
------------------------------------------------------------
FUTURE CLEANUP
------------------------------------------------------------
The script filename in the repo is currently:
hamserach.mpy
That spelling is preserved here for compatibility with the current
repository layout. If the repo is later cleaned up and renamed to:
hamsearch.mpy
then be sure to update:
- the Mystic menu entry
- this install file
- any documentation that references the script name
------------------------------------------------------------
73!
------------------------------------------------------------