SM-land codeplug (Sweden)

Post your OpenGD77 codeplugs here
SA0ASM
Posts: 23
Joined: Thu Dec 21, 2023 5:00 pm
Location: JO89xi, Bromma, Sweden

SM-land codeplug (Sweden)

Post by SA0ASM » Tue Dec 26, 2023 8:03 pm

Hi!

I'm working on my codeplug for Sweden, hopefully to be shared in this thread soon, and whipped up a quick python script to import the repeater database from www.ssa.se. The program, along with example output is available on Github here: https://github.com/SA0ASM/rptconvert

If there is interest from neighbours in LA/OZ/OH-lands then I may support them in the future as well. Feedback is welcome in this thread or by email!

73 de SA0ASM

LB8VK
Posts: 2
Joined: Mon Dec 11, 2023 9:46 pm

Re: SM-land codeplug (Sweden)

Post by LB8VK » Thu Jan 25, 2024 10:16 pm

Hello, very good news! Can you also prepare a DMR and FM codeplug for LA? :D

SA0ASM
Posts: 23
Joined: Thu Dec 21, 2023 5:00 pm
Location: JO89xi, Bromma, Sweden

Re: SM-land codeplug (Sweden)

Post by SA0ASM » Fri Jan 26, 2024 8:50 pm

Sure, try importing these CSV files which include all the LA repeaters in the SK6BA database.

73 de SA0ASM
Attachments
LA-repeaters.zip
(3.47 KiB) Downloaded 51 times

LB8VK
Posts: 2
Joined: Mon Dec 11, 2023 9:46 pm

Re: SM-land codeplug (Sweden)

Post by LB8VK » Wed Jan 31, 2024 10:47 pm

Thank you, I have downloaded, I will test.

SM0IKR
Posts: 3
Joined: Wed Jul 29, 2020 11:52 am

Re: SM-land codeplug (Sweden)

Post by SM0IKR » Sat Feb 24, 2024 10:40 am

Hi Olle,
Sorry to say the script do not work for me.
See attached errors:
PS C:\Users\Göran\Downloads\rptconvert-main\rptconvert-main> python .\rpt2ogd77.py
C:\Users\Göran\Downloads\rptconvert-main\rptconvert-main\rpt2ogd77.py:134: SyntaxWarning: invalid escape sequence '\.'
tone_pattern = re.compile('([0-9]+\.[0-9])')
Traceback (most recent call last):
File "C:\Users\Göran\Downloads\rptconvert-main\rptconvert-main\rpt2ogd77.py", line 3, in <module>
from curses.ascii import isalnum
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.752.0_x64__qbz5n2kfra8p0\Lib\curses\__init__.py", line 13, in <module>
from _curses import *
ModuleNotFoundError: No module named '_curses'
PS C:\Users\Göran\Downloads\rptconvert-main\rptconvert-main>

Is it win10 or wrong Python version.
73 Göran SM0IKR

SA0BUX
Posts: 582
Joined: Tue Jul 05, 2022 8:50 am
Location: JO99ah, Stockholm, Sweden
Contact:

Re: SM-land codeplug (Sweden)

Post by SA0BUX » Sat Feb 24, 2024 11:24 am

SM0IKR wrote:
Sat Feb 24, 2024 10:40 am
Hi Olle,
Sorry to say the script do not work for me.
See attached errors:
PS C:\Users\Göran\Downloads\rptconvert-main\rptconvert-main> python .\rpt2ogd77.py
C:\Users\Göran\Downloads\rptconvert-main\rptconvert-main\rpt2ogd77.py:134: SyntaxWarning: invalid escape sequence '\.'
tone_pattern = re.compile('([0-9]+\.[0-9])')
Traceback (most recent call last):
File "C:\Users\Göran\Downloads\rptconvert-main\rptconvert-main\rpt2ogd77.py", line 3, in <module>
from curses.ascii import isalnum
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.752.0_x64__qbz5n2kfra8p0\Lib\curses\__init__.py", line 13, in <module>
from _curses import *
ModuleNotFoundError: No module named '_curses'
PS C:\Users\Göran\Downloads\rptconvert-main\rptconvert-main>

Is it win10 or wrong Python version.
73 Göran SM0IKR
It works better on Linux, but I tested on Windows and you need to install windows-curses as it complains about missing module '_curses'

Code: Select all

C:\Users\lan\Downloads>..\AppData\Local\Programs\Python\Python312\Scripts\pip.exe install windows-curses
Collecting windows-curses
  Downloading windows_curses-2.3.2-cp312-cp312-win_amd64.whl.metadata (2.7 kB)
Downloading windows_curses-2.3.2-cp312-cp312-win_amd64.whl (80 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 80.5/80.5 kB 901.3 kB/s eta 0:00:00
Installing collected packages: windows-curses
Successfully installed windows-curses-2.3.2

Getting many warnings that seems related to characters coding but it makes the CSV files

Code: Select all

C:\Users\lan\Downloads>..\AppData\Local\Programs\Python\Python312\python rpt2ogd77.py "repeaters (1).csv"
C:\Users\lan\Downloads\rpt2ogd77.py:134: SyntaxWarning: invalid escape sequence '\.'
  tone_pattern = re.compile('([0-9]+\.[0-9])')
Warning: district number à in "SKØNN Haninge 7" is not valid!
Warning: district number à in "SLØZS Västberg" is not valid!
Warning: district number à in "SLØZS Västberg" is not valid!
Warning: district number à in "SKØPQ Kista 2m" is not valid!
Warning: district number à in "SMØOFV Solna 2m" is not valid!
Warning: district number à in "SKØZA Solna 70c" is not valid!
Warning: district number à in "SKØRDZ Brottby" is not valid!
Warning: district number à in "SAØAZT Brottby" is not valid!

SA0ASM
Posts: 23
Joined: Thu Dec 21, 2023 5:00 pm
Location: JO89xi, Bromma, Sweden

Re: SM-land codeplug (Sweden)

Post by SA0ASM » Thu Mar 21, 2024 6:22 pm

Hej!

The curses module is actually not needed and you can remove the import statement.
Your other issue seem to be related to the file not being correctly detected as UTF-8 encoded, I'll see if that can be hinted to allow it to work on Windows.

73 de SA0ASM

SA0BUX
Posts: 582
Joined: Tue Jul 05, 2022 8:50 am
Location: JO99ah, Stockholm, Sweden
Contact:

Re: SM-land codeplug (Sweden)

Post by SA0BUX » Sat Mar 30, 2024 8:53 am

SA0ASM wrote:
Thu Mar 21, 2024 6:22 pm
Hej!

The curses module is actually not needed and you can remove the import statement.
Your other issue seem to be related to the file not being correctly detected as UTF-8 encoded, I'll see if that can be hinted to allow it to work on Windows.

73 de SA0ASM
What character coding should the output be ?

Looks like it's in UTF-8 , to my knowledge the CPS and Radio only support plain ASCII ?

I can probably convert the files with "iconv -t ASCII//TRANSLIT" before they are imported into the CPS.

SA0BUX
Posts: 582
Joined: Tue Jul 05, 2022 8:50 am
Location: JO99ah, Stockholm, Sweden
Contact:

Re: SM-land codeplug (Sweden)

Post by SA0BUX » Sat Mar 30, 2024 12:51 pm

SA0BUX wrote:
Sat Mar 30, 2024 8:53 am
SA0ASM wrote:
Thu Mar 21, 2024 6:22 pm
Hej!

The curses module is actually not needed and you can remove the import statement.
Your other issue seem to be related to the file not being correctly detected as UTF-8 encoded, I'll see if that can be hinted to allow it to work on Windows.

73 de SA0ASM
What character coding should the output be ?

Looks like it's in UTF-8 , to my knowledge the CPS and Radio only support plain ASCII ?

I can probably convert the files with "iconv -t ASCII//TRANSLIT" before they are imported into the CPS.
An update.

I tried importing the CSV files as is ( with UTF-8 chars ) and it looks like gibberish in the CPS with Chinese characters but "åäö ÅÄÖ" is displayed correctly in the radio.
But as we can see that frequency and location data is corrupt even if they are correct in the Channnels.csv so the coding confuse the CPS import.
Screenshot 2024-03-30 134111.jpg
Screenshot 2024-03-30 134111.jpg (242.03 KiB) Viewed 278 times
Screen1.png
Screen1.png (3.18 KiB) Viewed 278 times

SA0ASM
Posts: 23
Joined: Thu Dec 21, 2023 5:00 pm
Location: JO89xi, Bromma, Sweden

Re: SM-land codeplug (Sweden)

Post by SA0ASM » Wed Apr 03, 2024 4:08 pm

Yes, this is a known issue in the OpenGD77 CPS. The label texts are converted to a chinese character set in the GUI, however importing UTF-8 from CSV works fine as you have witnessed. I have reported this bug here: viewtopic.php?f=11&t=3625&p=28295 Please feel free to chime in to that thread!

73 de SA0ASM

Post Reply