DWD Wetter, 727272 ulbrichf d
-
Topic author - Rank 8
- Beiträge: 712
- Registriert: Sa 4. Jun 2016, 20:54
- Wohnort: Grefrath, D
- Hauptanschluß: 992158 ulbrichf d
Re: DWD Wetter, 727272 ulbrichf d
Hallo iTELEX Freund,
nach einem netten Telefonat mit einem Mann vom DWD werden unsere Wetterwarnmeldungen für uns als FTP Download unter anderem Pfad zur Verfügung gestellt.
Ich werde auf der Nummer 737373 eine angepasste Version entwickeln, sonst ist im Januar nämlich Schluss in der jetzigen Form. Hoffentlich habe ich die Zeit .....
Gruß Frank
nach einem netten Telefonat mit einem Mann vom DWD werden unsere Wetterwarnmeldungen für uns als FTP Download unter anderem Pfad zur Verfügung gestellt.
Ich werde auf der Nummer 737373 eine angepasste Version entwickeln, sonst ist im Januar nämlich Schluss in der jetzigen Form. Hoffentlich habe ich die Zeit .....
Gruß Frank
NNNN
Gruß
Frank Ulbrich / DO2FU / 92158 ulbrichf d / TeKaDe FS220z / T68D (offline) / T1000S (defekt) / iTELEX Ethernet FW 897 / TW39PLUS FW 5xx / seriell speicher version FW 5xx / ED1000 FW 5xx
Gruß
Frank Ulbrich / DO2FU / 92158 ulbrichf d / TeKaDe FS220z / T68D (offline) / T1000S (defekt) / iTELEX Ethernet FW 897 / TW39PLUS FW 5xx / seriell speicher version FW 5xx / ED1000 FW 5xx
-
- Founder
- Beiträge: 3525
- Registriert: Di 7. Jun 2016, 09:45
- Wohnort: Edemissen - Blumenhagen
- Hauptanschluß: 925302 treu d
- Kontaktdaten:
Re: DWD Wetter, 727272 ulbrichf d
Hallo Frank,
vielleicht sollte man auch mal Kontakt zum Wettermuseum in Potsdam aufnehmen.
http://www.wettermuseum.de/
Dort ist u.A. auch ein T100 ausgestellt (hängt an der Wand...) und früher habe ich im Fernsehen dort mal einen RFT T51 gesehen.
Das wäre doch ne tolle Aktion, wenn die dort einen funktionierenden Wetterticker via i-Telex hätten...
Henning
vielleicht sollte man auch mal Kontakt zum Wettermuseum in Potsdam aufnehmen.
http://www.wettermuseum.de/
Dort ist u.A. auch ein T100 ausgestellt (hängt an der Wand...) und früher habe ich im Fernsehen dort mal einen RFT T51 gesehen.
Das wäre doch ne tolle Aktion, wenn die dort einen funktionierenden Wetterticker via i-Telex hätten...
Henning
mfg
henning +++
925302 treu d - T1000Z (Hauptanschluss)
55571 fvler a - T100S
210911za hmb d - T150 (Werkstatt)
218308 test d - T1000S/LS (Werkstatt)
925333 =treu d (Minitelex Sanyo SF100) defekt
Fax G2/G3: 05176-9754481 (Sanyo SF100 Thermofax) defekt
henning +++
925302 treu d - T1000Z (Hauptanschluss)
55571 fvler a - T100S
210911za hmb d - T150 (Werkstatt)
218308 test d - T1000S/LS (Werkstatt)
925333 =treu d (Minitelex Sanyo SF100) defekt
Fax G2/G3: 05176-9754481 (Sanyo SF100 Thermofax) defekt
-
Topic author - Rank 8
- Beiträge: 712
- Registriert: Sa 4. Jun 2016, 20:54
- Wohnort: Grefrath, D
- Hauptanschluß: 992158 ulbrichf d
Re: DWD Wetter, 727272 ulbrichf d
Moin
hier hat der DWD dann unseren zukünftigen Warnmeldungen : ftp://opendata.dwd.de/weather/alerts/txt/ erreichbar ohne
Logon, also anonymous, abgelegt.
Schön sind auch die kurzen Meldungen im Telefon SMS Format : ftp://opendata.dwd.de/weather/alerts/sms/HA/

hier hat der DWD dann unseren zukünftigen Warnmeldungen : ftp://opendata.dwd.de/weather/alerts/txt/ erreichbar ohne
Logon, also anonymous, abgelegt.
Schön sind auch die kurzen Meldungen im Telefon SMS Format : ftp://opendata.dwd.de/weather/alerts/sms/HA/

NNNN
Gruß
Frank Ulbrich / DO2FU / 92158 ulbrichf d / TeKaDe FS220z / T68D (offline) / T1000S (defekt) / iTELEX Ethernet FW 897 / TW39PLUS FW 5xx / seriell speicher version FW 5xx / ED1000 FW 5xx
Gruß
Frank Ulbrich / DO2FU / 92158 ulbrichf d / TeKaDe FS220z / T68D (offline) / T1000S (defekt) / iTELEX Ethernet FW 897 / TW39PLUS FW 5xx / seriell speicher version FW 5xx / ED1000 FW 5xx
-
Topic author - Rank 8
- Beiträge: 712
- Registriert: Sa 4. Jun 2016, 20:54
- Wohnort: Grefrath, D
- Hauptanschluß: 992158 ulbrichf d
Re: DWD Wetter, 727272 ulbrichf d
Ein Backup meines vorhandenen umgeprutschter codes , der mit dem neuen FTP Server redet.
Läuft bei mir auf meinem raspberry pi als python 2.7 code.
Password der ZIP Datei : berlin
Der Programmcode muß noch optimiert werden, besonder der Teil in welchem die Downloads gefahren werden.
Es müssen Proceduren/Funktionen eingeführt werden....um den Code zu verschlanken.
Der ABO Teil zum Versenden ist nicht enthalten.
Läuft bei mir auf meinem raspberry pi als python 2.7 code.
Password der ZIP Datei : berlin
Der Programmcode muß noch optimiert werden, besonder der Teil in welchem die Downloads gefahren werden.
Es müssen Proceduren/Funktionen eingeführt werden....um den Code zu verschlanken.
Der ABO Teil zum Versenden ist nicht enthalten.
Du hast keine ausreichende Berechtigung, um die Dateianhänge dieses Beitrags anzusehen.
NNNN
Gruß
Frank Ulbrich / DO2FU / 92158 ulbrichf d / TeKaDe FS220z / T68D (offline) / T1000S (defekt) / iTELEX Ethernet FW 897 / TW39PLUS FW 5xx / seriell speicher version FW 5xx / ED1000 FW 5xx
Gruß
Frank Ulbrich / DO2FU / 92158 ulbrichf d / TeKaDe FS220z / T68D (offline) / T1000S (defekt) / iTELEX Ethernet FW 897 / TW39PLUS FW 5xx / seriell speicher version FW 5xx / ED1000 FW 5xx
-
Topic author - Rank 8
- Beiträge: 712
- Registriert: Sa 4. Jun 2016, 20:54
- Wohnort: Grefrath, D
- Hauptanschluß: 992158 ulbrichf d
Re: DWD Wetter, 727272 ulbrichf d
Martin hat bemerkt, dass seine iTELEX-ASCII Anleitung auf dem Wetterserver abhandengekommen ist. Die Anleitung ist wieder vorhanden und kann mit der Menüauswahl A oder TA abgerufen werden.
Zum Jahreswechsel oder morgen werde ich wieder ein Backup vom Raspberry anlegen und die Software aktualisieren und ein restore testen. Dazu muss das Gerät abgeschaltet werden. Der Rechner ist dann zwischenzeitlich mal 4 Stunden nicht erreichbar.
Gruß
Frank
Zum Jahreswechsel oder morgen werde ich wieder ein Backup vom Raspberry anlegen und die Software aktualisieren und ein restore testen. Dazu muss das Gerät abgeschaltet werden. Der Rechner ist dann zwischenzeitlich mal 4 Stunden nicht erreichbar.
Gruß
Frank
NNNN
Gruß
Frank Ulbrich / DO2FU / 92158 ulbrichf d / TeKaDe FS220z / T68D (offline) / T1000S (defekt) / iTELEX Ethernet FW 897 / TW39PLUS FW 5xx / seriell speicher version FW 5xx / ED1000 FW 5xx
Gruß
Frank Ulbrich / DO2FU / 92158 ulbrichf d / TeKaDe FS220z / T68D (offline) / T1000S (defekt) / iTELEX Ethernet FW 897 / TW39PLUS FW 5xx / seriell speicher version FW 5xx / ED1000 FW 5xx
-
Topic author - Rank 8
- Beiträge: 712
- Registriert: Sa 4. Jun 2016, 20:54
- Wohnort: Grefrath, D
- Hauptanschluß: 992158 ulbrichf d
Re: DWD Wetter, 727272 ulbrichf d
Ich nehme mal Kontakt auf. Danke für den Hinweis.DF3OE hat geschrieben: ↑Mo 11. Dez 2017, 12:02 Hallo Frank,
vielleicht sollte man auch mal Kontakt zum Wettermuseum in Potsdam aufnehmen.
http://www.wettermuseum.de/
Dort ist u.A. auch ein T100 ausgestellt (hängt an der Wand...) und früher habe ich im Fernsehen dort mal einen RFT T51 gesehen.
Das wäre doch ne tolle Aktion, wenn die dort einen funktionierenden Wetterticker via i-Telex hätten...
Henning
NNNN
Gruß
Frank Ulbrich / DO2FU / 92158 ulbrichf d / TeKaDe FS220z / T68D (offline) / T1000S (defekt) / iTELEX Ethernet FW 897 / TW39PLUS FW 5xx / seriell speicher version FW 5xx / ED1000 FW 5xx
Gruß
Frank Ulbrich / DO2FU / 92158 ulbrichf d / TeKaDe FS220z / T68D (offline) / T1000S (defekt) / iTELEX Ethernet FW 897 / TW39PLUS FW 5xx / seriell speicher version FW 5xx / ED1000 FW 5xx
-
Topic author - Rank 8
- Beiträge: 712
- Registriert: Sa 4. Jun 2016, 20:54
- Wohnort: Grefrath, D
- Hauptanschluß: 992158 ulbrichf d
Re: DWD Wetter, 727272 ulbrichf d
Hallo Nick / Russ
I would like to expand the weather service to the area you are living in and add the data to the telex weather service.
Can you give me a hint which area code is usefull for you ?
ftp://tgftp.nws.noaa.gov/data/forecasts/zone/
Best regrads
Frank
I would like to expand the weather service to the area you are living in and add the data to the telex weather service.
Can you give me a hint which area code is usefull for you ?
ftp://tgftp.nws.noaa.gov/data/forecasts/zone/
Best regrads
Frank
NNNN
Gruß
Frank Ulbrich / DO2FU / 92158 ulbrichf d / TeKaDe FS220z / T68D (offline) / T1000S (defekt) / iTELEX Ethernet FW 897 / TW39PLUS FW 5xx / seriell speicher version FW 5xx / ED1000 FW 5xx
Gruß
Frank Ulbrich / DO2FU / 92158 ulbrichf d / TeKaDe FS220z / T68D (offline) / T1000S (defekt) / iTELEX Ethernet FW 897 / TW39PLUS FW 5xx / seriell speicher version FW 5xx / ED1000 FW 5xx
-
- Rank 1
- Beiträge: 30
- Registriert: Sa 27. Jan 2018, 16:40
- Wohnort: West Chester, PA, USA
- Hauptanschluß: 834328 WUTMPAM CHIL
- Kontaktdaten:
-
Topic author - Rank 8
- Beiträge: 712
- Registriert: Sa 4. Jun 2016, 20:54
- Wohnort: Grefrath, D
- Hauptanschluß: 992158 ulbrichf d
Re: DWD Wetter, 727272 ulbrichf d
My download routine for downloading weather forcasts for the states NY and PA.
It is quick and dirty. It need to be transformed to a more function/procedure like structure
to get rid of the duplicated code.
Russ how are the thwo letter codes (PA, NY) officially called ?
Is there a special name for that ?
In the moment the download routine is ready. The next step is the conversation to telex format,
which is not finished in the moment.
Frank
This is a result :
It is quick and dirty. It need to be transformed to a more function/procedure like structure
to get rid of the duplicated code.
Russ how are the thwo letter codes (PA, NY) officially called ?
Is there a special name for that ?
In the moment the download routine is ready. The next step is the conversation to telex format,
which is not finished in the moment.
#!/usr/bin/env python # -*- coding: utf-8 -*- #********************************************************************* # Connect USA FTP Server and download Forecast und Warnlagen # Autor : Frank Ulbrich # Date : 13.05.2018 #********************************************************************* # Links #======= # http://www.pythonforbeginners.com/code- ... in-python/ # # Server : ftp://tgftp.nws.noaa.gov/data/forecasts/zone/ # User : anonymous # PW: anonymus # Interpreter : python 2.7.13 # # Datumpruefung # Download auf RAM DISK /dev/shm #********************************************************************* # Versionsnummer ausgeben version = "0.00.2" print("****************************************") print("2tlx_ftp_down_noaa_forecast_v.py Version : " + version ) print("****************************************") #********************************************************************* # imported libraries import fnmatch # match names import ftplib # ftp connect import datetime #********************************************************************* # FTP Server Parameter #********************************************************************* #drive = "./" drive = "/dev/shm/" # RAMDISK filepath = drive + "filelist/" # Linux ftpserver = 'tgftp.nws.noaa.gov' # ftp server unites states weather 2018 ftpuser = 'anonymous' # Persoenlicher User ftppw = 'frank.ulbrich' # Persoenliches Password ftppath0 = '/data/forecasts/zone' ftppath1 = '/data/forecasts/zone/pa' # Warnmeldungen PA - paz***.txt FPUS51 ftppath2 = '/data/forecasts/zone/ny' # Warnmeldungen NY - nyz***.txt filelist1 = filepath + 'noaa_warnlagen_pa.txt' filelist2 = filepath + 'noaa_warnlagen_ny.txt' now = datetime.datetime.now() # Der heutige Tag tag = now.strftime("%d") print "Das heutige Datum (Tag) lautet : " + tag + "\n" print ("* FTP - Server Connect ") ftp = ftplib.FTP(ftpserver, ftpuser, ftppw) #ftp = ftplib.FTP('ftp.sunet.se', 'anonymous', 'anonymous@sunet.se') welcome = ftp.getwelcome() print (welcome) ftp.dir() ftp.cwd(ftppath0) # break for downloading only one filechanging to forecasts ftp.dir() print ("* FTP - Server nun connected ") #********************************************************************* # Read filelist Forecast pa paz***.txt #********************************************************************* print ("* Read forecast pa filelist from ftp - server ") filelist = [] # list for filenames ftp.cwd(ftppath1) # changing to directory line = ftp.retrlines("NLST",filelist.append) # read filenames and write into list of files filelist = sorted(filelist,reverse=True) # Absteigende Sortierung der Namen print (filelist) #********************************************************************* # Create textfile with filenames paz***.txt #********************************************************************* print ("* Create FORECAST paz textfile with filnames ") # https://docs.python.org/2.7/library/fnmatch.html myfile = open(filelist1,'w') for item in filelist: #if fnmatch.fnmatch(item, "paz" + tag + "*"): # filter for files with specific characters if fnmatch.fnmatch(item, "paz*"): # filter for files with specific characters print item myfile.write(item+"\n") #myfile.writelines("%s\n" % item) myfile.close() #********************************************************************* # Read filelist Forecast ny nyz***.txt #********************************************************************* print ("* Read forecast ny filelist from ftp - server ") filelist = [] # list for filenames ftp.cwd(ftppath2) # changing to directory line = ftp.retrlines("NLST",filelist.append) # read filenames and write into list of files filelist = sorted(filelist,reverse=True) # Absteigende Sortierung der Namen print (filelist) #********************************************************************* # Create textfile with filenames nyz***.txt #********************************************************************* print ("* Create FORECAST nyz textfile with filnames ") # https://docs.python.org/2.7/library/fnmatch.html myfile = open(filelist2,'w') for item in filelist: #if fnmatch.fnmatch(item, "*" + "VHDL17_DWOG_" + tag + "*"): # filter for files with specific characters if fnmatch.fnmatch(item, "nyz*"): print item myfile.write(item+"\n") #myfile.writelines("%s\n" % item) myfile.close() ###################################################################################### # DOWNLOADS ###################################################################################### #http://stackoverflow.com/questions/2362 ... nges-using #http://ftputil.sschwarzer.net/trac/wiki/Documentation #https://docs.python.org/3/library/fnmatch.html #********************************************************************* # Download textfile with filenames from saved filelist.file PA FPUS51 #********************************************************************* print ('* Oeffne Listen Datei PA : %s' %(filelist1)) myfile = open(filelist1,'r') inlist = myfile.readlines() # Using .readlines() filelistfile = [] for i in inlist: filelistfile.append(i.rstrip('\n')) # Das Zeichen \n entfernen myfile.close() print("* Inlist : ") print(inlist) print("* Filelistfile : ") print(filelistfile) print ('* Download FTP Dateien') ftp.cwd(ftppath1) for takefile in filelistfile: try: if fnmatch.fnmatch(takefile, '*'): print ('* Download : %s' %(takefile)) #****************************************************************************** # Speziell, da EOL geloest wird und ein CR fehlt #foofile = open( drive + 'filedownload/forecast/' + takefile, 'w') foofile = open( drive + 'filedownload/forecast/' + 'FPUS51PA.txt', 'w') def customWriter(line): foofile.write(line + '\r') # CR an das Zeilenden anhaengen. #ftp.retrlines('RETR '+takefile, open('.\\filedownload\\forecast\\' + takefile + ".txt", 'wb').write) #ftp.retrbinary('RETR '+takefile, open('filedownload/forecast/' + takefile + ".txt", 'wb').write) #ftp.retrlines('RETR '+takefile,customWriter) ftp.retrlines('RETR '+takefile,customWriter) # FPUS51PA foofile.close() break # break for downloading only one file except : print ('Failed to download FTP file: %s' %(takefile)) ftp.close() #********************************************************************* # Download textfile with filenames from saved filelist.file NY FPUS51 #********************************************************************* print ('* Oeffne Listen Datei NY : %s' %(filelist2)) myfile = open(filelist2,'r') inlist = myfile.readlines() # Using .readlines() filelistfile = [] for i in inlist: filelistfile.append(i.rstrip('\n')) # Das Zeichen \n entfernen myfile.close() print("* Inlist : ") print(inlist) print("* Filelistfile : ") print(filelistfile) print ('* Download FTP Dateien') ftp.cwd(ftppath2) for takefile in filelistfile: try: if fnmatch.fnmatch(takefile, '*'): print ('* Download : %s' %(takefile)) #****************************************************************************** # Speziell, da EOL geloest wird und ein CR fehlt #foofile = open( drive + 'filedownload/forecast/' + takefile, 'w') foofile = open( drive + 'filedownload/forecast/' + 'FPUS51NY.txt', 'w') def customWriter(line): foofile.write(line + '\r') # CR an das Zeilenden anhaengen. #ftp.retrlines('RETR '+takefile, open('.\\filedownload\\forecast\\' + takefile + ".txt", 'wb').write) #ftp.retrbinary('RETR '+takefile, open('filedownload/forecast/' + takefile + ".txt", 'wb').write) #ftp.retrlines('RETR '+takefile,customWriter) ftp.retrlines('RETR '+takefile,customWriter) # FPUS51PA foofile.close() break # break for downloading only one file except : print ('Failed to download FTP file: %s' %(takefile)) ftp.close() print ('* Closing FTP connection') ftp.quit() # implicits ftp.close(), schliessen, falls noch nicht geschlossen. quit() #Ende des ProgramMunter bleiben
Frank
This is a result :
Expires:201805132000;;887886 FPUS51 KCTP 131117 ZFPCTP Zone Forecast Product for Central Pennsylvania National Weather Service State College PA 715 AM EDT Sun May 13 2018 PAZ004-132000- Warren- Including the city of Warren 715 AM EDT Sun May 13 2018 .TODAY...Cloudy. Patchy fog this morning. Showers, mainly this morning. Highs in the lower 60s. South winds around 5 mph. Chance of rain 90 percent. .TONIGHT...Cloudy with a 20 percent chance of showers. Lows in the lower 50s. Southwest winds around 5 mph. .MONDAY...Mostly cloudy with a slight chance of showers. A chance of thunderstorms in the afternoon. Warmer with highs in the lower 70s. Southwest winds 5 to 10 mph. Chance of rain 30 percent. .MONDAY NIGHT...Mostly cloudy with a chance of showers and thunderstorms. Lows in the mid 50s. South winds around 5 mph. Chance of rain 50 percent. .TUESDAY...Showers likely. Thunderstorms in the afternoon. Highs in the mid 70s. Southwest winds around 5 mph, becoming west in the afternoon. Chance of rain 80 percent. .TUESDAY NIGHT...Mostly cloudy with a chance of showers and thunderstorms. Lows in the upper 50s. Chance of rain 40 percent. .WEDNESDAY...Mostly cloudy with a chance of showers and thunderstorms. Highs in the mid 70s. Chance of rain 50 percent. .WEDNESDAY NIGHT...Mostly cloudy. A chance of showers and thunderstorms in the evening. Lows in the upper 50s. Chance of rain 50 percent. .THURSDAY...Mostly cloudy in the morning, then becoming partly sunny. A 40 percent chance of showers. Highs in the lower 70s. .THURSDAY NIGHT...Mostly cloudy with a 50 percent chance of showers. Lows in the mid 50s. .FRIDAY...Showers likely. Highs in the upper 60s. Chance of rain 60 percent. .FRIDAY NIGHT...Showers likely. Lows in the mid 50s. Chance of rain 60 percent. .SATURDAY...Mostly cloudy with a chance of thunderstorms. Showers likely, mainly in the morning. Highs in the lower 70s. Chance of rain 60 percent. $$
NNNN
Gruß
Frank Ulbrich / DO2FU / 92158 ulbrichf d / TeKaDe FS220z / T68D (offline) / T1000S (defekt) / iTELEX Ethernet FW 897 / TW39PLUS FW 5xx / seriell speicher version FW 5xx / ED1000 FW 5xx
Gruß
Frank Ulbrich / DO2FU / 92158 ulbrichf d / TeKaDe FS220z / T68D (offline) / T1000S (defekt) / iTELEX Ethernet FW 897 / TW39PLUS FW 5xx / seriell speicher version FW 5xx / ED1000 FW 5xx
-
Topic author - Rank 8
- Beiträge: 712
- Registriert: Sa 4. Jun 2016, 20:54
- Wohnort: Grefrath, D
- Hauptanschluß: 992158 ulbrichf d
Re: DWD Wetter, 727272 ulbrichf d
Der Konverter ist fertig... muß noch prüfen, wie breit die Wettermeldung von Haus aus sind.
#!/usr/bin/env python # -*- coding: iso-8859-15 -*- #********************************************************************* # Connect Baudot Convertierung von Warnmeldungen # Entfernung Steuerzeichen und ersetzten von CR gegen CRLF # # Den ersten Dateiname aus der Textliste einlesen und die Datei mit dem gelesene # Namen oeffnen. # # Konvertierung der amerikanischen NOAA Wettermeldungen # Die NOAA Input Dateien (Wetterdaten) habe leider ein .txt am Dateieinde # das muss beim Abspeichern noch geaendert werden. # Autor : Frank Ulbrich # Date : 13.05.2018 #********************************************************************* # Links #======= # http://www.pythonforbeginners.com/code- ... in-python/ # Interpreter : python 2.7.13 #********************************************************************* version = "0.1" print("****************************************") print("3tlx_asc_conv-warn__noaa_v.py - Version : " + version ) print("****************************************") #********************************************************************* # imported libraries import textwrap import os import fnmatch # match names import ftplib # ftp connect #drive = "./" # unter de, Programm Rootverzeichnis drive = "/dev/shm/" # RAMDISK filepath = drive + "filelist/" # Linux filesourcepath1 = drive + 'filedownload/forecast/' # Linux targetpath = drive + 'converted/' # Linux filelist1 = ['noaa_warnlagen_pa.txt', 'noaa_warnlagen_ny.txt', 'noaa_warnlagen_ga.txt'] # Ausgabedateinamen outfilename1 = ["FPUS51_PA.txt", "FPUS51_NY.txt", "FPUS51_GA.txt"] def convertasc(sourcepath, filelistname, output): #********************************************************************* # convert textfile from saved filelist.file #********************************************************************* # Diese Routine Oeffnet eine Textdatei und liest die erste Zeile mit # einem Dateinamen ein # Eine Datei mit dem Dateinamen wird gelese und die Zeichen konvertiert. # Das Ergebnis wird als Datei mit dem output-Dateinamen abgespeichert. #********************************************************************* print ('* Oeffne Listen Datei : %s' %(filepath + filelistname)) myfile = open(filepath + filelistname,'r') infile = myfile.readline() # Using .readlines() infile = infile[:-1] print ('* Dateiname : %s' %(infile)) myfile.close() print ('* Oeffnen Warn Nachrichtendatei : %s' %(infile)) #myfile = open(sourcepath + infile+'.txt','r') myfile = open(sourcepath + infile,'r') for line in myfile : #line = line[:-13] # Ende abschneiden ->www.dwd.de #line = line[19:] # Anfang abschneiden WETTERWARNUNG line = line.replace('Ö', 'OE') line = line.replace('ö', 'OE') line = line.replace('Ü', 'UE') line = line.replace('ü', 'UE') line = line.replace('Ä', 'AE') line = line.replace('ä', 'AE') line = line.replace('ß', 'SZ') line = line.replace('$', 'USD') line = line.upper() # Konvertierung nach Groszbuchstaben line = line.replace(chr(1),'') # Steuerzeichen SOH aus Textanfang entfernen line = line.replace(chr(3),'') # Steuerzeichen ETX aus Textende entfernen line = line.replace('\r', '\n') myfile.close() #outfile = open(targetpath + infile, "w") outfile = open(targetpath + output, "w") outfile.write(line) outfile.write("\nNNNN\n") outfile.close() print("* Inlist : ") print(line) #*END def convertasc() def main(): print("*Konvertierung NOAA forecasts") for x in range(0,len(filelist1)): print(x) convertasc(filesourcepath1, filelist1[x],outfilename1[x]) print("*Konvertierung fertig") #END def main() #************************************************************************* # Aufruf des Hautprogramms #************************************************************************* if (__name__ == "__main__"): main()Das kommt raus :
* Oeffne Listen Datei : /dev/shm/filelist/noaa_warnlagen_ga.txt * Dateiname : gaz166.txt * Oeffnen Warn Nachrichtendatei : gaz166.txt * Inlist : EXPIRES:201805132015;;890036 FPUS52 KJAX 131218 ZFPJAX ZONE FORECAST PRODUCT FOR NORTHEAST FLORIDA AND SOUTHEAST GEORGIA NATIONAL WEATHER SERVICE JACKSONVILLE FL 818 AM EDT SUN MAY 13 2018 GAZ166-132015- COASTAL CAMDEN- INCLUDING THE CITIES OF DOVER BLUFF, KINGSLAND, AND DUNGENESS 818 AM EDT SUN MAY 13 2018 .REST OF TODAY...MOSTLY SUNNY IN THE MORNING THEN BECOMING PARTLY CLOUDY. HIGHS IN THE MID 80S. SOUTHEAST WINDS 5 TO 10 MPH. .TONIGHT...PARTLY CLOUDY. LOWS AROUND 70. SOUTHEAST WINDS 5 TO 10 MPH. .MONDAY...CLOUDY. CHANCE OF SHOWERS AND SLIGHT CHANCE OF THUNDERSTORMS IN THE MORNING, THEN SHOWERS LIKELY AND SLIGHT CHANCE OF THUNDERSTORMS IN THE AFTERNOON. HIGHS IN THE UPPER 70S. EAST WINDS 10 TO 15 MPH. CHANCE OF RAIN 70 PERCENT. .MONDAY NIGHT...SHOWERS LIKELY AND SLIGHT CHANCE OF THUNDERSTORMS. LOWS IN THE UPPER 60S. EAST WINDS 10 TO 15 MPH. CHANCE OF RAIN 70 PERCENT. .TUESDAY...SHOWERS LIKELY AND CHANCE OF THUNDERSTORMS. HIGHS IN THE LOWER 80S. SOUTHEAST WINDS 10 TO 15 MPH. CHANCE OF RAIN 70 PERCENT. .TUESDAY NIGHT...MOSTLY CLOUDY WITH CHANCE OF SHOWERS AND SLIGHT CHANCE OF THUNDERSTORMS. LOWS IN THE UPPER 60S. CHANCE OF RAIN 40 PERCENT. .WEDNESDAY...SHOWERS LIKELY AND CHANCE OF THUNDERSTORMS. HIGHS IN THE LOWER 80S. CHANCE OF RAIN 60 PERCENT. .WEDNESDAY NIGHT...MOSTLY CLOUDY WITH A 40 PERCENT CHANCE OF SHOWERS AND THUNDERSTORMS. LOWS IN THE UPPER 60S. .THURSDAY...SHOWERS LIKELY AND CHANCE OF THUNDERSTORMS. HIGHS IN THE LOWER 80S. CHANCE OF RAIN 70 PERCENT. .THURSDAY NIGHT...MOSTLY CLOUDY WITH CHANCE OF SHOWERS AND SLIGHT CHANCE OF THUNDERSTORMS. LOWS IN THE UPPER 60S. CHANCE OF RAIN 50 PERCENT. .FRIDAY...SHOWERS LIKELY AND CHANCE OF THUNDERSTORMS. HIGHS IN THE LOWER 80S. CHANCE OF RAIN 60 PERCENT. .FRIDAY NIGHT...MOSTLY CLOUDY WITH CHANCE OF SHOWERS AND SLIGHT CHANCE OF THUNDERSTORMS. LOWS IN THE UPPER 60S. CHANCE OF RAIN 40 PERCENT. .SATURDAY...CLOUDY WITH A 50 PERCENT CHANCE OF SHOWERS AND THUNDERSTORMS. HIGHS IN THE LOWER 80S. USDUSD *Konvertierung fertig root@raspsolar:/home/pi/tlx_ftp_down_v2#
NNNN
Gruß
Frank Ulbrich / DO2FU / 92158 ulbrichf d / TeKaDe FS220z / T68D (offline) / T1000S (defekt) / iTELEX Ethernet FW 897 / TW39PLUS FW 5xx / seriell speicher version FW 5xx / ED1000 FW 5xx
Gruß
Frank Ulbrich / DO2FU / 92158 ulbrichf d / TeKaDe FS220z / T68D (offline) / T1000S (defekt) / iTELEX Ethernet FW 897 / TW39PLUS FW 5xx / seriell speicher version FW 5xx / ED1000 FW 5xx