From 09661e72436c02ef13f4af6b304c7f893c40e7e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Na=C3=9F?= Date: Tue, 24 May 2016 12:05:02 +0200 Subject: [PATCH] Amiga-Demoseiten nach "demopages" verschoben, README angelegt, Kleinigkeiten --- README.md | 22 +++++++- cept.py | 24 ++++----- config.py | 1 + {pages => demopages}/105011522a | 0 {pages => demopages}/1050115a | 0 {pages => demopages}/10501a | 0 {pages => demopages}/1050a | 0 {pages => demopages}/1180040000004a | 0 {pages => demopages}/1188a | 0 {pages => demopages}/12001551g | 0 {pages => demopages}/12001551i | 0 {pages => demopages}/1200833401083a | 0 {pages => demopages}/15148830101a | 0 {pages => demopages}/1690a | 0 {pages => demopages}/1692a | 0 {pages => demopages}/2000010119a | 0 {pages => demopages}/2000014317a | 0 {pages => demopages}/20000143a | 0 {pages => demopages}/20000300a | 0 {pages => demopages}/20000320a | 0 {pages => demopages}/20000a | 0 {pages => demopages}/200959030a | 0 {pages => demopages}/200959031a | 0 {pages => demopages}/20095903a | 0 {pages => demopages}/2009590a | 0 {pages => demopages}/20095a | 0 {pages => demopages}/200960a | 0 {pages => demopages}/20096100a | 0 {pages => demopages}/2009610a | 0 {pages => demopages}/20096111a | 0 {pages => demopages}/2009611211a | 0 {pages => demopages}/2009611212a | 0 {pages => demopages}/2009611213a | 0 {pages => demopages}/2009611214a | 0 {pages => demopages}/2009611215a | 0 {pages => demopages}/2009611216a | 0 {pages => demopages}/2009611217a | 0 {pages => demopages}/2009611221a | 0 {pages => demopages}/2009611221b | 0 {pages => demopages}/20096112221a | 0 {pages => demopages}/20096112221b | 0 {pages => demopages}/20096112222a | 0 {pages => demopages}/20096112222b | 0 {pages => demopages}/20096112223a | 0 {pages => demopages}/20096112224a | 0 {pages => demopages}/2009611222a | 0 {pages => demopages}/2009611224a | 0 {pages => demopages}/20096112a | 0 {pages => demopages}/200961200961a | 0 {pages => demopages}/20096121a | 0 {pages => demopages}/2009612214a | 0 {pages => demopages}/200961221a | 0 {pages => demopages}/2009612220457a | 0 {pages => demopages}/200961222045a | 0 {pages => demopages}/20096122204a | 0 {pages => demopages}/2009612220a | 0 {pages => demopages}/2009612221827a | 0 {pages => demopages}/20096122218a | 0 {pages => demopages}/200961222a | 0 {pages => demopages}/20096122a | 0 {pages => demopages}/20096131a | 0 {pages => demopages}/20096132a | 0 {pages => demopages}/200961330a | 0 {pages => demopages}/20096133a | 0 {pages => demopages}/2009613525a | 0 {pages => demopages}/20096141a | 0 {pages => demopages}/20096142a | 0 {pages => demopages}/20096143a | 0 {pages => demopages}/20096144a | 0 {pages => demopages}/200961450a | 0 {pages => demopages}/2009614517a | 0 {pages => demopages}/20096145a | 0 {pages => demopages}/20096151a | 0 {pages => demopages}/20096151b | 0 {pages => demopages}/200961522a | 0 {pages => demopages}/200961522b | 0 {pages => demopages}/20096152a | 0 {pages => demopages}/20096153a | 0 {pages => demopages}/20096155a | 0 {pages => demopages}/20096162a | 0 {pages => demopages}/20096164a | 0 {pages => demopages}/200961a | 0 {pages => demopages}/201474751a | 0 {pages => demopages}/20147475a | 0 {pages => demopages}/20511223319a | 0 {pages => demopages}/2051122331a | 0 {pages => demopages}/20511223a | 0 {pages => demopages}/2085851a | 0 {pages => demopages}/208585a | 0 {pages => demopages}/208888821314a | 0 {pages => demopages}/2088888213a | 0 {pages => demopages}/208888a | 0 {pages => demopages}/212121012a | 0 {pages => demopages}/212121012b | 0 {pages => demopages}/212125a | 0 {pages => demopages}/21212a | 0 {pages => demopages}/25800000000a | 0 {pages => demopages}/300031111a | 0 {pages => demopages}/300031214a | 0 {pages => demopages}/3000312a | 0 {pages => demopages}/300031313a | 0 {pages => demopages}/300032121a | 0 {pages => demopages}/3000321a | 0 {pages => demopages}/30003a | 0 {pages => demopages}/30711a | 0 {pages => demopages}/3303310a | 0 {pages => demopages}/33033116a | 0 {pages => demopages}/330331a | 0 {pages => demopages}/33033a | 0 {pages => demopages}/34034100a | 0 {pages => demopages}/340341027a | 0 {pages => demopages}/34034102a | 0 {pages => demopages}/3403411a | 0 {pages => demopages}/340341a | 0 {pages => demopages}/34034a | 0 {pages => demopages}/34344000001a | 0 {pages => demopages}/3434421a | 0 {pages => demopages}/34344a | 0 {pages => demopages}/358535285a | 0 {pages => demopages}/35853a | 0 {pages => demopages}/40040200a | 0 {pages => demopages}/40040272a | 0 {pages => demopages}/40206014211a | 0 {pages => demopages}/40206014a | 0 {pages => demopages}/4020601a | 0 {pages => demopages}/402060a | 0 {pages => demopages}/444791a | 0 {pages => demopages}/444793a | 0 {pages => demopages}/44479a | 0 {pages => demopages}/502570a | 0 {pages => demopages}/502576a | 0 {pages => demopages}/502576b | 0 {pages => demopages}/5050500353a | 0 {pages => demopages}/5050500359999999a | 0 {pages => demopages}/505050035999999a | 0 {pages => demopages}/5070754525a | 0 {pages => demopages}/507075452a | 0 {pages => demopages}/50707545a | 0 {pages => demopages}/540040010002a | 0 {pages => demopages}/540040010003a | 0 {pages => demopages}/540040010005a | 0 {pages => demopages}/540040010006a | 0 {pages => demopages}/54004042a | 0 {pages => demopages}/54004042b | 0 {pages => demopages}/54004042c | 0 {pages => demopages}/5400404a | 0 {pages => demopages}/5400415a | 0 {pages => demopages}/57575075a | 0 {pages => demopages}/5757507a | 0 {pages => demopages}/5757509a | 0 {pages => demopages}/5757509b | 0 {pages => demopages}/5757514a | 0 {pages => demopages}/57575a | 0 {pages => demopages}/6406400a | 0 {pages => demopages}/6406412121a | 0 {pages => demopages}/64064121a | 0 {pages => demopages}/6406412a | 0 {pages => demopages}/640642311a | 0 {pages => demopages}/6406423a | 0 {pages => demopages}/64064241a | 0 {pages => demopages}/6406451a | 0 {pages => demopages}/64064a | 0 {pages => demopages}/65432011841a | 0 {pages => demopages}/6543201184a | 0 {pages => demopages}/654320118a | 0 {pages => demopages}/654320a | 0 {pages => demopages}/6700710a | 0 {pages => demopages}/67007a | 0 {pages => demopages}/8211882a | 0 {pages => demopages}/86553222a | 0 {pages => demopages}/9204920400920a | 0 {pages => demopages}/92049204009213a | 0 rtx.sublime-workspace | 70 ++++++++++++++++++++------ rtxHelpers.py | 42 ++++++++-------- rtxPage.py | 25 +++++---- 175 files changed, 124 insertions(+), 60 deletions(-) rename {pages => demopages}/105011522a (100%) rename {pages => demopages}/1050115a (100%) rename {pages => demopages}/10501a (100%) rename {pages => demopages}/1050a (100%) rename {pages => demopages}/1180040000004a (100%) rename {pages => demopages}/1188a (100%) rename {pages => demopages}/12001551g (100%) rename {pages => demopages}/12001551i (100%) rename {pages => demopages}/1200833401083a (100%) rename {pages => demopages}/15148830101a (100%) rename {pages => demopages}/1690a (100%) rename {pages => demopages}/1692a (100%) rename {pages => demopages}/2000010119a (100%) rename {pages => demopages}/2000014317a (100%) rename {pages => demopages}/20000143a (100%) rename {pages => demopages}/20000300a (100%) rename {pages => demopages}/20000320a (100%) rename {pages => demopages}/20000a (100%) rename {pages => demopages}/200959030a (100%) rename {pages => demopages}/200959031a (100%) rename {pages => demopages}/20095903a (100%) rename {pages => demopages}/2009590a (100%) rename {pages => demopages}/20095a (100%) rename {pages => demopages}/200960a (100%) rename {pages => demopages}/20096100a (100%) rename {pages => demopages}/2009610a (100%) rename {pages => demopages}/20096111a (100%) rename {pages => demopages}/2009611211a (100%) rename {pages => demopages}/2009611212a (100%) rename {pages => demopages}/2009611213a (100%) rename {pages => demopages}/2009611214a (100%) rename {pages => demopages}/2009611215a (100%) rename {pages => demopages}/2009611216a (100%) rename {pages => demopages}/2009611217a (100%) rename {pages => demopages}/2009611221a (100%) rename {pages => demopages}/2009611221b (100%) rename {pages => demopages}/20096112221a (100%) rename {pages => demopages}/20096112221b (100%) rename {pages => demopages}/20096112222a (100%) rename {pages => demopages}/20096112222b (100%) rename {pages => demopages}/20096112223a (100%) rename {pages => demopages}/20096112224a (100%) rename {pages => demopages}/2009611222a (100%) rename {pages => demopages}/2009611224a (100%) rename {pages => demopages}/20096112a (100%) rename {pages => demopages}/200961200961a (100%) rename {pages => demopages}/20096121a (100%) rename {pages => demopages}/2009612214a (100%) rename {pages => demopages}/200961221a (100%) rename {pages => demopages}/2009612220457a (100%) rename {pages => demopages}/200961222045a (100%) rename {pages => demopages}/20096122204a (100%) rename {pages => demopages}/2009612220a (100%) rename {pages => demopages}/2009612221827a (100%) rename {pages => demopages}/20096122218a (100%) rename {pages => demopages}/200961222a (100%) rename {pages => demopages}/20096122a (100%) rename {pages => demopages}/20096131a (100%) rename {pages => demopages}/20096132a (100%) rename {pages => demopages}/200961330a (100%) rename {pages => demopages}/20096133a (100%) rename {pages => demopages}/2009613525a (100%) rename {pages => demopages}/20096141a (100%) rename {pages => demopages}/20096142a (100%) rename {pages => demopages}/20096143a (100%) rename {pages => demopages}/20096144a (100%) rename {pages => demopages}/200961450a (100%) rename {pages => demopages}/2009614517a (100%) rename {pages => demopages}/20096145a (100%) rename {pages => demopages}/20096151a (100%) rename {pages => demopages}/20096151b (100%) rename {pages => demopages}/200961522a (100%) rename {pages => demopages}/200961522b (100%) rename {pages => demopages}/20096152a (100%) rename {pages => demopages}/20096153a (100%) rename {pages => demopages}/20096155a (100%) rename {pages => demopages}/20096162a (100%) rename {pages => demopages}/20096164a (100%) rename {pages => demopages}/200961a (100%) rename {pages => demopages}/201474751a (100%) rename {pages => demopages}/20147475a (100%) rename {pages => demopages}/20511223319a (100%) rename {pages => demopages}/2051122331a (100%) rename {pages => demopages}/20511223a (100%) rename {pages => demopages}/2085851a (100%) rename {pages => demopages}/208585a (100%) rename {pages => demopages}/208888821314a (100%) rename {pages => demopages}/2088888213a (100%) rename {pages => demopages}/208888a (100%) rename {pages => demopages}/212121012a (100%) rename {pages => demopages}/212121012b (100%) rename {pages => demopages}/212125a (100%) rename {pages => demopages}/21212a (100%) rename {pages => demopages}/25800000000a (100%) rename {pages => demopages}/300031111a (100%) rename {pages => demopages}/300031214a (100%) rename {pages => demopages}/3000312a (100%) rename {pages => demopages}/300031313a (100%) rename {pages => demopages}/300032121a (100%) rename {pages => demopages}/3000321a (100%) rename {pages => demopages}/30003a (100%) rename {pages => demopages}/30711a (100%) rename {pages => demopages}/3303310a (100%) rename {pages => demopages}/33033116a (100%) rename {pages => demopages}/330331a (100%) rename {pages => demopages}/33033a (100%) rename {pages => demopages}/34034100a (100%) rename {pages => demopages}/340341027a (100%) rename {pages => demopages}/34034102a (100%) rename {pages => demopages}/3403411a (100%) rename {pages => demopages}/340341a (100%) rename {pages => demopages}/34034a (100%) rename {pages => demopages}/34344000001a (100%) rename {pages => demopages}/3434421a (100%) rename {pages => demopages}/34344a (100%) rename {pages => demopages}/358535285a (100%) rename {pages => demopages}/35853a (100%) rename {pages => demopages}/40040200a (100%) rename {pages => demopages}/40040272a (100%) rename {pages => demopages}/40206014211a (100%) rename {pages => demopages}/40206014a (100%) rename {pages => demopages}/4020601a (100%) rename {pages => demopages}/402060a (100%) rename {pages => demopages}/444791a (100%) rename {pages => demopages}/444793a (100%) rename {pages => demopages}/44479a (100%) rename {pages => demopages}/502570a (100%) rename {pages => demopages}/502576a (100%) rename {pages => demopages}/502576b (100%) rename {pages => demopages}/5050500353a (100%) rename {pages => demopages}/5050500359999999a (100%) rename {pages => demopages}/505050035999999a (100%) rename {pages => demopages}/5070754525a (100%) rename {pages => demopages}/507075452a (100%) rename {pages => demopages}/50707545a (100%) rename {pages => demopages}/540040010002a (100%) rename {pages => demopages}/540040010003a (100%) rename {pages => demopages}/540040010005a (100%) rename {pages => demopages}/540040010006a (100%) rename {pages => demopages}/54004042a (100%) rename {pages => demopages}/54004042b (100%) rename {pages => demopages}/54004042c (100%) rename {pages => demopages}/5400404a (100%) rename {pages => demopages}/5400415a (100%) rename {pages => demopages}/57575075a (100%) rename {pages => demopages}/5757507a (100%) rename {pages => demopages}/5757509a (100%) rename {pages => demopages}/5757509b (100%) rename {pages => demopages}/5757514a (100%) rename {pages => demopages}/57575a (100%) rename {pages => demopages}/6406400a (100%) rename {pages => demopages}/6406412121a (100%) rename {pages => demopages}/64064121a (100%) rename {pages => demopages}/6406412a (100%) rename {pages => demopages}/640642311a (100%) rename {pages => demopages}/6406423a (100%) rename {pages => demopages}/64064241a (100%) rename {pages => demopages}/6406451a (100%) rename {pages => demopages}/64064a (100%) rename {pages => demopages}/65432011841a (100%) rename {pages => demopages}/6543201184a (100%) rename {pages => demopages}/654320118a (100%) rename {pages => demopages}/654320a (100%) rename {pages => demopages}/6700710a (100%) rename {pages => demopages}/67007a (100%) rename {pages => demopages}/8211882a (100%) rename {pages => demopages}/86553222a (100%) rename {pages => demopages}/9204920400920a (100%) rename {pages => demopages}/92049204009213a (100%) diff --git a/README.md b/README.md index 576c717..ec6f541 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,22 @@ -# test +# retroText +retroText ist ein Server-Dienst, um "Bildschirmtext" (Btx) zu emulieren. + +Hiermit sollen Btx-Endgeräte (z.B. MultiKom- oder MultiTel-Geräte) wieder etwas anzeigen können, um +zu sehen, wie Btx damals ausgesehen hat und benutzt werden konnte. +Auch Software-Decoder ("Software-Btx-Clients") sind nutzbar, da Btx gerade in den 90ern häufig auf PCs +oder Heimcomputern genutzt wurde. + +Derzeit ist retroText (rtx) noch in einem sehr frühen Stadium der Entwicklung und dient hauptsächlich dazu, +meine eigenen Geräte anzubinden. + +# Inhalte + +Wichtig bei solchen Systemen ist immer, was man damit tatsächlich anstellen kann. + +Daher werden bei retroText standardmäßig einige Demo-Seiten mitgeliefert, welche von der originalen +Commodore Amiga Btx-Decoder-Diskette entnommen sind. + +Diese Seiten sind im Verzeichnis "demopages" enthalten. + +Weitere Seiten, welche nicht von der Amiga-Diskette stammen, sind im Verzeichnis "pages" enthalten. diff --git a/cept.py b/cept.py index e8ab7a5..f7c028d 100644 --- a/cept.py +++ b/cept.py @@ -1,21 +1,19 @@ ''' rtx - RetroText -cept: Enthaelt eine Datenstruktur mit CEPT-Steuerzeichen -by Anna Christina Nass +cept: Enthält CEPT-Steuerzeichen +by Anna Christina Naß released under GPL ''' -cept = { - 'CR': "\x0d", - 'LF': "\x0a", - 'UMLAUT': "\xc9", - 'INI': "\x13", - 'TER': "\x1c", - 'SEND': "\x1a", - 'CURSOR_ON': "\x11", - 'BSP': "\x08", # backspace - 'CLEARLINE': "\x18" -} +CR = "\x0d", +LF = "\x0a", +UMLAUT = "\xc9", +INI = "\x13", +TER = "\x1c", +SEND = "\x1a", +CURSOR_ON = "\x11", +BSP = "\x08", # backspace +CLEARLINE = "\x18" clear_line24 = ( "\x1f\x58\x41" # Cursor Zeile 24, Spalte 0 diff --git a/config.py b/config.py index 5ec0474..cf3e218 100644 --- a/config.py +++ b/config.py @@ -8,6 +8,7 @@ import logging ## general settings: PAGES="pages/" +DEMOPAGES="demopages/" ## logging settings: # loglevel values: DEBUG (all messages) > INFO > WARNING > ERROR > CRITICAL (only cricital messages) diff --git a/pages/105011522a b/demopages/105011522a similarity index 100% rename from pages/105011522a rename to demopages/105011522a diff --git a/pages/1050115a b/demopages/1050115a similarity index 100% rename from pages/1050115a rename to demopages/1050115a diff --git a/pages/10501a b/demopages/10501a similarity index 100% rename from pages/10501a rename to demopages/10501a diff --git a/pages/1050a b/demopages/1050a similarity index 100% rename from pages/1050a rename to demopages/1050a diff --git a/pages/1180040000004a b/demopages/1180040000004a similarity index 100% rename from pages/1180040000004a rename to demopages/1180040000004a diff --git a/pages/1188a b/demopages/1188a similarity index 100% rename from pages/1188a rename to demopages/1188a diff --git a/pages/12001551g b/demopages/12001551g similarity index 100% rename from pages/12001551g rename to demopages/12001551g diff --git a/pages/12001551i b/demopages/12001551i similarity index 100% rename from pages/12001551i rename to demopages/12001551i diff --git a/pages/1200833401083a b/demopages/1200833401083a similarity index 100% rename from pages/1200833401083a rename to demopages/1200833401083a diff --git a/pages/15148830101a b/demopages/15148830101a similarity index 100% rename from pages/15148830101a rename to demopages/15148830101a diff --git a/pages/1690a b/demopages/1690a similarity index 100% rename from pages/1690a rename to demopages/1690a diff --git a/pages/1692a b/demopages/1692a similarity index 100% rename from pages/1692a rename to demopages/1692a diff --git a/pages/2000010119a b/demopages/2000010119a similarity index 100% rename from pages/2000010119a rename to demopages/2000010119a diff --git a/pages/2000014317a b/demopages/2000014317a similarity index 100% rename from pages/2000014317a rename to demopages/2000014317a diff --git a/pages/20000143a b/demopages/20000143a similarity index 100% rename from pages/20000143a rename to demopages/20000143a diff --git a/pages/20000300a b/demopages/20000300a similarity index 100% rename from pages/20000300a rename to demopages/20000300a diff --git a/pages/20000320a b/demopages/20000320a similarity index 100% rename from pages/20000320a rename to demopages/20000320a diff --git a/pages/20000a b/demopages/20000a similarity index 100% rename from pages/20000a rename to demopages/20000a diff --git a/pages/200959030a b/demopages/200959030a similarity index 100% rename from pages/200959030a rename to demopages/200959030a diff --git a/pages/200959031a b/demopages/200959031a similarity index 100% rename from pages/200959031a rename to demopages/200959031a diff --git a/pages/20095903a b/demopages/20095903a similarity index 100% rename from pages/20095903a rename to demopages/20095903a diff --git a/pages/2009590a b/demopages/2009590a similarity index 100% rename from pages/2009590a rename to demopages/2009590a diff --git a/pages/20095a b/demopages/20095a similarity index 100% rename from pages/20095a rename to demopages/20095a diff --git a/pages/200960a b/demopages/200960a similarity index 100% rename from pages/200960a rename to demopages/200960a diff --git a/pages/20096100a b/demopages/20096100a similarity index 100% rename from pages/20096100a rename to demopages/20096100a diff --git a/pages/2009610a b/demopages/2009610a similarity index 100% rename from pages/2009610a rename to demopages/2009610a diff --git a/pages/20096111a b/demopages/20096111a similarity index 100% rename from pages/20096111a rename to demopages/20096111a diff --git a/pages/2009611211a b/demopages/2009611211a similarity index 100% rename from pages/2009611211a rename to demopages/2009611211a diff --git a/pages/2009611212a b/demopages/2009611212a similarity index 100% rename from pages/2009611212a rename to demopages/2009611212a diff --git a/pages/2009611213a b/demopages/2009611213a similarity index 100% rename from pages/2009611213a rename to demopages/2009611213a diff --git a/pages/2009611214a b/demopages/2009611214a similarity index 100% rename from pages/2009611214a rename to demopages/2009611214a diff --git a/pages/2009611215a b/demopages/2009611215a similarity index 100% rename from pages/2009611215a rename to demopages/2009611215a diff --git a/pages/2009611216a b/demopages/2009611216a similarity index 100% rename from pages/2009611216a rename to demopages/2009611216a diff --git a/pages/2009611217a b/demopages/2009611217a similarity index 100% rename from pages/2009611217a rename to demopages/2009611217a diff --git a/pages/2009611221a b/demopages/2009611221a similarity index 100% rename from pages/2009611221a rename to demopages/2009611221a diff --git a/pages/2009611221b b/demopages/2009611221b similarity index 100% rename from pages/2009611221b rename to demopages/2009611221b diff --git a/pages/20096112221a b/demopages/20096112221a similarity index 100% rename from pages/20096112221a rename to demopages/20096112221a diff --git a/pages/20096112221b b/demopages/20096112221b similarity index 100% rename from pages/20096112221b rename to demopages/20096112221b diff --git a/pages/20096112222a b/demopages/20096112222a similarity index 100% rename from pages/20096112222a rename to demopages/20096112222a diff --git a/pages/20096112222b b/demopages/20096112222b similarity index 100% rename from pages/20096112222b rename to demopages/20096112222b diff --git a/pages/20096112223a b/demopages/20096112223a similarity index 100% rename from pages/20096112223a rename to demopages/20096112223a diff --git a/pages/20096112224a b/demopages/20096112224a similarity index 100% rename from pages/20096112224a rename to demopages/20096112224a diff --git a/pages/2009611222a b/demopages/2009611222a similarity index 100% rename from pages/2009611222a rename to demopages/2009611222a diff --git a/pages/2009611224a b/demopages/2009611224a similarity index 100% rename from pages/2009611224a rename to demopages/2009611224a diff --git a/pages/20096112a b/demopages/20096112a similarity index 100% rename from pages/20096112a rename to demopages/20096112a diff --git a/pages/200961200961a b/demopages/200961200961a similarity index 100% rename from pages/200961200961a rename to demopages/200961200961a diff --git a/pages/20096121a b/demopages/20096121a similarity index 100% rename from pages/20096121a rename to demopages/20096121a diff --git a/pages/2009612214a b/demopages/2009612214a similarity index 100% rename from pages/2009612214a rename to demopages/2009612214a diff --git a/pages/200961221a b/demopages/200961221a similarity index 100% rename from pages/200961221a rename to demopages/200961221a diff --git a/pages/2009612220457a b/demopages/2009612220457a similarity index 100% rename from pages/2009612220457a rename to demopages/2009612220457a diff --git a/pages/200961222045a b/demopages/200961222045a similarity index 100% rename from pages/200961222045a rename to demopages/200961222045a diff --git a/pages/20096122204a b/demopages/20096122204a similarity index 100% rename from pages/20096122204a rename to demopages/20096122204a diff --git a/pages/2009612220a b/demopages/2009612220a similarity index 100% rename from pages/2009612220a rename to demopages/2009612220a diff --git a/pages/2009612221827a b/demopages/2009612221827a similarity index 100% rename from pages/2009612221827a rename to demopages/2009612221827a diff --git a/pages/20096122218a b/demopages/20096122218a similarity index 100% rename from pages/20096122218a rename to demopages/20096122218a diff --git a/pages/200961222a b/demopages/200961222a similarity index 100% rename from pages/200961222a rename to demopages/200961222a diff --git a/pages/20096122a b/demopages/20096122a similarity index 100% rename from pages/20096122a rename to demopages/20096122a diff --git a/pages/20096131a b/demopages/20096131a similarity index 100% rename from pages/20096131a rename to demopages/20096131a diff --git a/pages/20096132a b/demopages/20096132a similarity index 100% rename from pages/20096132a rename to demopages/20096132a diff --git a/pages/200961330a b/demopages/200961330a similarity index 100% rename from pages/200961330a rename to demopages/200961330a diff --git a/pages/20096133a b/demopages/20096133a similarity index 100% rename from pages/20096133a rename to demopages/20096133a diff --git a/pages/2009613525a b/demopages/2009613525a similarity index 100% rename from pages/2009613525a rename to demopages/2009613525a diff --git a/pages/20096141a b/demopages/20096141a similarity index 100% rename from pages/20096141a rename to demopages/20096141a diff --git a/pages/20096142a b/demopages/20096142a similarity index 100% rename from pages/20096142a rename to demopages/20096142a diff --git a/pages/20096143a b/demopages/20096143a similarity index 100% rename from pages/20096143a rename to demopages/20096143a diff --git a/pages/20096144a b/demopages/20096144a similarity index 100% rename from pages/20096144a rename to demopages/20096144a diff --git a/pages/200961450a b/demopages/200961450a similarity index 100% rename from pages/200961450a rename to demopages/200961450a diff --git a/pages/2009614517a b/demopages/2009614517a similarity index 100% rename from pages/2009614517a rename to demopages/2009614517a diff --git a/pages/20096145a b/demopages/20096145a similarity index 100% rename from pages/20096145a rename to demopages/20096145a diff --git a/pages/20096151a b/demopages/20096151a similarity index 100% rename from pages/20096151a rename to demopages/20096151a diff --git a/pages/20096151b b/demopages/20096151b similarity index 100% rename from pages/20096151b rename to demopages/20096151b diff --git a/pages/200961522a b/demopages/200961522a similarity index 100% rename from pages/200961522a rename to demopages/200961522a diff --git a/pages/200961522b b/demopages/200961522b similarity index 100% rename from pages/200961522b rename to demopages/200961522b diff --git a/pages/20096152a b/demopages/20096152a similarity index 100% rename from pages/20096152a rename to demopages/20096152a diff --git a/pages/20096153a b/demopages/20096153a similarity index 100% rename from pages/20096153a rename to demopages/20096153a diff --git a/pages/20096155a b/demopages/20096155a similarity index 100% rename from pages/20096155a rename to demopages/20096155a diff --git a/pages/20096162a b/demopages/20096162a similarity index 100% rename from pages/20096162a rename to demopages/20096162a diff --git a/pages/20096164a b/demopages/20096164a similarity index 100% rename from pages/20096164a rename to demopages/20096164a diff --git a/pages/200961a b/demopages/200961a similarity index 100% rename from pages/200961a rename to demopages/200961a diff --git a/pages/201474751a b/demopages/201474751a similarity index 100% rename from pages/201474751a rename to demopages/201474751a diff --git a/pages/20147475a b/demopages/20147475a similarity index 100% rename from pages/20147475a rename to demopages/20147475a diff --git a/pages/20511223319a b/demopages/20511223319a similarity index 100% rename from pages/20511223319a rename to demopages/20511223319a diff --git a/pages/2051122331a b/demopages/2051122331a similarity index 100% rename from pages/2051122331a rename to demopages/2051122331a diff --git a/pages/20511223a b/demopages/20511223a similarity index 100% rename from pages/20511223a rename to demopages/20511223a diff --git a/pages/2085851a b/demopages/2085851a similarity index 100% rename from pages/2085851a rename to demopages/2085851a diff --git a/pages/208585a b/demopages/208585a similarity index 100% rename from pages/208585a rename to demopages/208585a diff --git a/pages/208888821314a b/demopages/208888821314a similarity index 100% rename from pages/208888821314a rename to demopages/208888821314a diff --git a/pages/2088888213a b/demopages/2088888213a similarity index 100% rename from pages/2088888213a rename to demopages/2088888213a diff --git a/pages/208888a b/demopages/208888a similarity index 100% rename from pages/208888a rename to demopages/208888a diff --git a/pages/212121012a b/demopages/212121012a similarity index 100% rename from pages/212121012a rename to demopages/212121012a diff --git a/pages/212121012b b/demopages/212121012b similarity index 100% rename from pages/212121012b rename to demopages/212121012b diff --git a/pages/212125a b/demopages/212125a similarity index 100% rename from pages/212125a rename to demopages/212125a diff --git a/pages/21212a b/demopages/21212a similarity index 100% rename from pages/21212a rename to demopages/21212a diff --git a/pages/25800000000a b/demopages/25800000000a similarity index 100% rename from pages/25800000000a rename to demopages/25800000000a diff --git a/pages/300031111a b/demopages/300031111a similarity index 100% rename from pages/300031111a rename to demopages/300031111a diff --git a/pages/300031214a b/demopages/300031214a similarity index 100% rename from pages/300031214a rename to demopages/300031214a diff --git a/pages/3000312a b/demopages/3000312a similarity index 100% rename from pages/3000312a rename to demopages/3000312a diff --git a/pages/300031313a b/demopages/300031313a similarity index 100% rename from pages/300031313a rename to demopages/300031313a diff --git a/pages/300032121a b/demopages/300032121a similarity index 100% rename from pages/300032121a rename to demopages/300032121a diff --git a/pages/3000321a b/demopages/3000321a similarity index 100% rename from pages/3000321a rename to demopages/3000321a diff --git a/pages/30003a b/demopages/30003a similarity index 100% rename from pages/30003a rename to demopages/30003a diff --git a/pages/30711a b/demopages/30711a similarity index 100% rename from pages/30711a rename to demopages/30711a diff --git a/pages/3303310a b/demopages/3303310a similarity index 100% rename from pages/3303310a rename to demopages/3303310a diff --git a/pages/33033116a b/demopages/33033116a similarity index 100% rename from pages/33033116a rename to demopages/33033116a diff --git a/pages/330331a b/demopages/330331a similarity index 100% rename from pages/330331a rename to demopages/330331a diff --git a/pages/33033a b/demopages/33033a similarity index 100% rename from pages/33033a rename to demopages/33033a diff --git a/pages/34034100a b/demopages/34034100a similarity index 100% rename from pages/34034100a rename to demopages/34034100a diff --git a/pages/340341027a b/demopages/340341027a similarity index 100% rename from pages/340341027a rename to demopages/340341027a diff --git a/pages/34034102a b/demopages/34034102a similarity index 100% rename from pages/34034102a rename to demopages/34034102a diff --git a/pages/3403411a b/demopages/3403411a similarity index 100% rename from pages/3403411a rename to demopages/3403411a diff --git a/pages/340341a b/demopages/340341a similarity index 100% rename from pages/340341a rename to demopages/340341a diff --git a/pages/34034a b/demopages/34034a similarity index 100% rename from pages/34034a rename to demopages/34034a diff --git a/pages/34344000001a b/demopages/34344000001a similarity index 100% rename from pages/34344000001a rename to demopages/34344000001a diff --git a/pages/3434421a b/demopages/3434421a similarity index 100% rename from pages/3434421a rename to demopages/3434421a diff --git a/pages/34344a b/demopages/34344a similarity index 100% rename from pages/34344a rename to demopages/34344a diff --git a/pages/358535285a b/demopages/358535285a similarity index 100% rename from pages/358535285a rename to demopages/358535285a diff --git a/pages/35853a b/demopages/35853a similarity index 100% rename from pages/35853a rename to demopages/35853a diff --git a/pages/40040200a b/demopages/40040200a similarity index 100% rename from pages/40040200a rename to demopages/40040200a diff --git a/pages/40040272a b/demopages/40040272a similarity index 100% rename from pages/40040272a rename to demopages/40040272a diff --git a/pages/40206014211a b/demopages/40206014211a similarity index 100% rename from pages/40206014211a rename to demopages/40206014211a diff --git a/pages/40206014a b/demopages/40206014a similarity index 100% rename from pages/40206014a rename to demopages/40206014a diff --git a/pages/4020601a b/demopages/4020601a similarity index 100% rename from pages/4020601a rename to demopages/4020601a diff --git a/pages/402060a b/demopages/402060a similarity index 100% rename from pages/402060a rename to demopages/402060a diff --git a/pages/444791a b/demopages/444791a similarity index 100% rename from pages/444791a rename to demopages/444791a diff --git a/pages/444793a b/demopages/444793a similarity index 100% rename from pages/444793a rename to demopages/444793a diff --git a/pages/44479a b/demopages/44479a similarity index 100% rename from pages/44479a rename to demopages/44479a diff --git a/pages/502570a b/demopages/502570a similarity index 100% rename from pages/502570a rename to demopages/502570a diff --git a/pages/502576a b/demopages/502576a similarity index 100% rename from pages/502576a rename to demopages/502576a diff --git a/pages/502576b b/demopages/502576b similarity index 100% rename from pages/502576b rename to demopages/502576b diff --git a/pages/5050500353a b/demopages/5050500353a similarity index 100% rename from pages/5050500353a rename to demopages/5050500353a diff --git a/pages/5050500359999999a b/demopages/5050500359999999a similarity index 100% rename from pages/5050500359999999a rename to demopages/5050500359999999a diff --git a/pages/505050035999999a b/demopages/505050035999999a similarity index 100% rename from pages/505050035999999a rename to demopages/505050035999999a diff --git a/pages/5070754525a b/demopages/5070754525a similarity index 100% rename from pages/5070754525a rename to demopages/5070754525a diff --git a/pages/507075452a b/demopages/507075452a similarity index 100% rename from pages/507075452a rename to demopages/507075452a diff --git a/pages/50707545a b/demopages/50707545a similarity index 100% rename from pages/50707545a rename to demopages/50707545a diff --git a/pages/540040010002a b/demopages/540040010002a similarity index 100% rename from pages/540040010002a rename to demopages/540040010002a diff --git a/pages/540040010003a b/demopages/540040010003a similarity index 100% rename from pages/540040010003a rename to demopages/540040010003a diff --git a/pages/540040010005a b/demopages/540040010005a similarity index 100% rename from pages/540040010005a rename to demopages/540040010005a diff --git a/pages/540040010006a b/demopages/540040010006a similarity index 100% rename from pages/540040010006a rename to demopages/540040010006a diff --git a/pages/54004042a b/demopages/54004042a similarity index 100% rename from pages/54004042a rename to demopages/54004042a diff --git a/pages/54004042b b/demopages/54004042b similarity index 100% rename from pages/54004042b rename to demopages/54004042b diff --git a/pages/54004042c b/demopages/54004042c similarity index 100% rename from pages/54004042c rename to demopages/54004042c diff --git a/pages/5400404a b/demopages/5400404a similarity index 100% rename from pages/5400404a rename to demopages/5400404a diff --git a/pages/5400415a b/demopages/5400415a similarity index 100% rename from pages/5400415a rename to demopages/5400415a diff --git a/pages/57575075a b/demopages/57575075a similarity index 100% rename from pages/57575075a rename to demopages/57575075a diff --git a/pages/5757507a b/demopages/5757507a similarity index 100% rename from pages/5757507a rename to demopages/5757507a diff --git a/pages/5757509a b/demopages/5757509a similarity index 100% rename from pages/5757509a rename to demopages/5757509a diff --git a/pages/5757509b b/demopages/5757509b similarity index 100% rename from pages/5757509b rename to demopages/5757509b diff --git a/pages/5757514a b/demopages/5757514a similarity index 100% rename from pages/5757514a rename to demopages/5757514a diff --git a/pages/57575a b/demopages/57575a similarity index 100% rename from pages/57575a rename to demopages/57575a diff --git a/pages/6406400a b/demopages/6406400a similarity index 100% rename from pages/6406400a rename to demopages/6406400a diff --git a/pages/6406412121a b/demopages/6406412121a similarity index 100% rename from pages/6406412121a rename to demopages/6406412121a diff --git a/pages/64064121a b/demopages/64064121a similarity index 100% rename from pages/64064121a rename to demopages/64064121a diff --git a/pages/6406412a b/demopages/6406412a similarity index 100% rename from pages/6406412a rename to demopages/6406412a diff --git a/pages/640642311a b/demopages/640642311a similarity index 100% rename from pages/640642311a rename to demopages/640642311a diff --git a/pages/6406423a b/demopages/6406423a similarity index 100% rename from pages/6406423a rename to demopages/6406423a diff --git a/pages/64064241a b/demopages/64064241a similarity index 100% rename from pages/64064241a rename to demopages/64064241a diff --git a/pages/6406451a b/demopages/6406451a similarity index 100% rename from pages/6406451a rename to demopages/6406451a diff --git a/pages/64064a b/demopages/64064a similarity index 100% rename from pages/64064a rename to demopages/64064a diff --git a/pages/65432011841a b/demopages/65432011841a similarity index 100% rename from pages/65432011841a rename to demopages/65432011841a diff --git a/pages/6543201184a b/demopages/6543201184a similarity index 100% rename from pages/6543201184a rename to demopages/6543201184a diff --git a/pages/654320118a b/demopages/654320118a similarity index 100% rename from pages/654320118a rename to demopages/654320118a diff --git a/pages/654320a b/demopages/654320a similarity index 100% rename from pages/654320a rename to demopages/654320a diff --git a/pages/6700710a b/demopages/6700710a similarity index 100% rename from pages/6700710a rename to demopages/6700710a diff --git a/pages/67007a b/demopages/67007a similarity index 100% rename from pages/67007a rename to demopages/67007a diff --git a/pages/8211882a b/demopages/8211882a similarity index 100% rename from pages/8211882a rename to demopages/8211882a diff --git a/pages/86553222a b/demopages/86553222a similarity index 100% rename from pages/86553222a rename to demopages/86553222a diff --git a/pages/9204920400920a b/demopages/9204920400920a similarity index 100% rename from pages/9204920400920a rename to demopages/9204920400920a diff --git a/pages/92049204009213a b/demopages/92049204009213a similarity index 100% rename from pages/92049204009213a rename to demopages/92049204009213a diff --git a/rtx.sublime-workspace b/rtx.sublime-workspace index daca43a..4ace8b0 100644 --- a/rtx.sublime-workspace +++ b/rtx.sublime-workspace @@ -59,6 +59,14 @@ "line_ending": "Unix" } }, + { + "file": "README.md", + "settings": + { + "buffer_size": 8, + "line_ending": "Unix" + } + }, { "file": "rtxMask.py", "settings": @@ -68,7 +76,10 @@ } }, { + "contents": "Präsentation retroText\n----------------------\n\nBildschirmtext (Btx) war ein inter-\naktiver Onlinedienst.\n\nVorstellung auf der IFA '77 in Berlin \nvon Postminister Kurt Gscheidle\nEntwickelt unter der Leitung von Eric \nDanke, inspiriert 1975 durch Veröffent-\nlichung über das britische\nPRESTEL-System.\n\n----\n\n1980 Feldversuch mit 2000 Teilnehmern.\n18. März 1983 Unterzeichnung des \n Btx-Staatsvertrags\n1. Sept. 1983 Start zur IFA\n\nNutzer: 1986 ca. 60.000 (gepl.: 1 Mio.) \nerst 1996 1 Mio., aber da war es schon\n T-Online mit Internet+E-Mail\n\n31.12.2001: Abschaltung des \n klassischen Btx\nOnline-Banking noch bis 10. Mai 2007\n\n----\n\nBtx-Leitzentrale in Ulm\nZu Beginn Vermittlungsstellen in \n Düsseldorf, Hamburg, Frankfurt/M, \n München, Stuttgart\nGeplant waren 150 VSt...\n\n----\n\nÖsterreich: \nStart Juni 1982,\nMUPID als eigenes Terminal \n (vgl. RetroPulsiv 7.0)\nEnde: November 2001\n\n----\n\nÄhnliche Systeme in Europa:\n\nSchweiz: Videotex\nUK: Prestel\nSchweden: Prestel plus\nFrankreich: Minitel\nDänemark: Teledata\nItalien: Videotel\nNiederlande: Viditel\nSpanien: Ibertex\n\nDeutschland\n-----------\n\nBtx-Endgerät:\n- Fernseher mit Btx-Decoder oder \n Set-Top-Box (z.B. btxTv)\n- Btx-Terminal (z.B. MultiTel, MultiKom)\n- Computer mit Btx-Karten/-Modulen \n oder Software\n\nPostmodem:\n- D-BT 03 war lange der Standard\n- 1200 Bit/s empfangen, \n 75 Bit/s senden (V.23)\n- feste Anschlußkennung (EPROM)\n- fest programmierte Telefonnummer\n- eigenes Anschlußinterface\n\n- später auch alternative Modems, \n Akustikkoppler erlaubt\n- hierfür war \"Software-Kennung\" nötig\n- Zugänge mit höherer Datenrate kamen \n erst über die Jahre\n\nZugangsdaten:\n- Anschlußkennung (12 Stellen) identi-\n fiziert den Telefonanschluß\n- aufgrunnd fehlender \"CallerID\", da ja\n noch viele VSt Analogtechnik hatten\n\n- Benutzerkennung identifiziert den \n Teilnehmer\n- Mitbenutzerkennung z.B. andere \n Familienmitglieder\n- Persönliches Kennwort als Sicherheit\n\n- Für nomadische Benutzer:\n - Anschlußfreizügigkeit\n - Teilnehmerfreizügigkeit\n\nBtx-Server:\n- Hierarchisch organisiert\n- Leitzentrale in Ulm mit IBM-Technik\n- weitere VSt waren \"Caches\"\n- \"externe Rechner\" wurden direkt \n angesprochen, waren per Datex-P \n (X.25) angebunden\n - Beispiele: Quelle, Fluglinien, Bahn,\n Banken ...\n\nKosten für Inhalte:\n- \"seitenabhängige Vergütung\":\n 0,01 DM bis 9,99 DM möglich\n- \"zeitabhängige Vergütung\": \n 0,01 DM bis 1,30 DM pro Min. möglich\n- Abrechnung über Telefonrechnung\n\n1993: Trennung von Netz (Datex-J) \n und Inhalt (Btx)\nBtx blieb aber der einzige Dienst \n im Datex-J\n1995: Umbenennung in T-Online\n\nÖsterreich: \"PAN\" (Public Access \n Network), 1993-1995\n\nDer CEPT-Standard\n-----------------\n\n\nhttps://de.wikipedia.org/wiki/Minitel\n", "file": "Vorbereitung Praesentation.txt", + "file_size": 2729, + "file_write_time": 131082227097403787, "settings": { "buffer_size": 2695, @@ -208,6 +219,7 @@ ], "file_history": [ + "/C/Temp/2_git.imzadi.de.crt", "/C/Users/nass/AppData/Roaming/Sublime Text 3/Packages/User/Git.sublime-settings", "/C/Users/nass/AppData/Roaming/Sublime Text 3/Packages/Git/Git.sublime-settings", "/C/Users/nass/AppData/Roaming/Sublime Text 3/Packages/User/Preferences.sublime-settings", @@ -275,7 +287,7 @@ "groups": [ { - "selected": 0, + "selected": 1, "sheets": [ { @@ -304,11 +316,39 @@ "translation.y": 0.0, "zoom_level": 1.0 }, - "stack_index": 0, + "stack_index": 1, "type": "text" }, { "buffer": 1, + "file": "README.md", + "semi_transient": true, + "settings": + { + "buffer_size": 8, + "regions": + { + }, + "selection": + [ + [ + 0, + 0 + ] + ], + "settings": + { + "syntax": "Packages/Markdown/Markdown.sublime-syntax" + }, + "translation.x": 0.0, + "translation.y": 0.0, + "zoom_level": 1.0 + }, + "stack_index": 0, + "type": "text" + }, + { + "buffer": 2, "file": "rtxMask.py", "semi_transient": false, "settings": @@ -333,11 +373,11 @@ "translation.y": 450.0, "zoom_level": 1.0 }, - "stack_index": 1, + "stack_index": 2, "type": "text" }, { - "buffer": 2, + "buffer": 3, "file": "Vorbereitung Praesentation.txt", "semi_transient": false, "settings": @@ -365,11 +405,11 @@ "translation.y": 1260.0, "zoom_level": 1.0 }, - "stack_index": 2, + "stack_index": 3, "type": "text" }, { - "buffer": 3, + "buffer": 4, "file": "rtxPage.py", "semi_transient": false, "settings": @@ -395,11 +435,11 @@ "translation.y": 972.0, "zoom_level": 1.0 }, - "stack_index": 3, + "stack_index": 4, "type": "text" }, { - "buffer": 4, + "buffer": 5, "file": "rtxHelpers.py", "semi_transient": false, "settings": @@ -425,11 +465,11 @@ "translation.y": 0.0, "zoom_level": 1.0 }, - "stack_index": 4, + "stack_index": 5, "type": "text" }, { - "buffer": 5, + "buffer": 6, "file": "rtxModem.py", "semi_transient": false, "settings": @@ -454,11 +494,11 @@ "translation.y": 0.0, "zoom_level": 1.0 }, - "stack_index": 7, + "stack_index": 8, "type": "text" }, { - "buffer": 6, + "buffer": 7, "file": "config.py", "semi_transient": false, "settings": @@ -483,11 +523,11 @@ "translation.y": 0.0, "zoom_level": 1.0 }, - "stack_index": 6, + "stack_index": 7, "type": "text" }, { - "buffer": 7, + "buffer": 8, "file": "cept.py", "semi_transient": false, "settings": @@ -513,7 +553,7 @@ "translation.y": 702.0, "zoom_level": 1.0 }, - "stack_index": 5, + "stack_index": 6, "type": "text" } ] diff --git a/rtxHelpers.py b/rtxHelpers.py index bfca6ec..312d53e 100644 --- a/rtxHelpers.py +++ b/rtxHelpers.py @@ -6,8 +6,8 @@ by Anna Christina Naß released under GPL ''' -from cept import * from rtxPage import rtxPage +import cept import glob import logging @@ -22,10 +22,10 @@ def process_byte(in_byte): logging.debug("> %s < CD: %s", instr, glob.ser.getCD()) # what to send back to the client - if instr == cept['INI']: + if instr == cept.INI: logging.debug("INI") echo_char = "*" - elif instr == cept['TER']: + elif instr == cept.TER: logging.debug("TER") echo_char = "#" else: @@ -33,7 +33,7 @@ def process_byte(in_byte): # start of line: clear rest of cmdline if len(glob.cmdline) == 0: - glob.ser.write(bytes(cept['CLEARLINE'], "latin-1")) + glob.ser.write(bytes(cept.CLEARLINE, "latin-1")) # echo the character to the client glob.ser.write(bytes(echo_char, "latin-1")) @@ -41,7 +41,7 @@ def process_byte(in_byte): glob.cmdline += instr # Backspace: - if instr == cept['BSP']: + if instr == cept.BSP: glob.cmdline = glob.cmdline[:-1] return @@ -49,19 +49,19 @@ def process_byte(in_byte): # process links inside the page: if ( len(glob.cmdline) == 1 or len(glob.cmdline) == 2 ) and glob.curpage.get_link(glob.cmdline): - glob.cmdline = cept['INI'] + glob.curpage.get_link(glob.cmdline) + cept['TER'] + glob.cmdline = cept.INI + glob.curpage.get_link(glob.cmdline) + cept.TER process_command(glob.cmdline) return # reset cmdline: - if instr == cept['INI'] and glob.cmdline[-2:] == cept['INI']+cept['INI']: + if instr == cept.INI and glob.cmdline[-2:] == cept.INI+cept.INI: logging.debug("reset cmdline") glob.cmdline = "" glob.ser.write(bytes(clear_line24, "latin-1")) return # goto last page: - if instr == cept['TER'] and glob.cmdline == cept['INI']+cept['TER']: + if instr == cept.TER and glob.cmdline == cept.INI+cept.TER: if glob.prevpage.get_page_id() == -1: glob.cmdline = "" send_error("Keine vorige Seite vorhanden.") @@ -71,8 +71,8 @@ def process_byte(in_byte): return # "Make it so": - if instr == cept['TER']: - # or instr == cept['SEND'] or instr == cept['CR']: + if instr == cept.TER: + # or instr == cept.SEND or instr == cept.CR: logging.info("Kommando: >%s<", glob.cmdline) process_command(glob.cmdline) return @@ -85,13 +85,13 @@ def process_command(cmd): glob.cmdline = "" # process *cmdline#, normally a page-loading command: - if cmd[0] == cept['INI'] and cmd[-1:] == cept['TER']: + if cmd[0] == cept.INI and cmd[-1:] == cept.TER: pgnr = cmd[1:-1] check_and_send_page(pgnr, "Die Seite kann nicht gefunden werden.") # if only # is entered, either go to the link behind '#' # or to the next sub-page (2000a => 2000b) if it exists - if cmd == cept['TER']: + if cmd == cept.TER: if glob.curpage.get_link("#"): pgnr = glob.curpage.get_link("#") check_and_send_page(pgnr, "Die Seite kann nicht gefunden werden.") @@ -104,12 +104,12 @@ def process_command(cmd): check_and_send_page(nextid, "Keine n"+str(cept['UMLAUT'])+"achste Seite gefunden.") # special commands: - if cmd == "!1" + cept['TER']: - glob.ser.write(bytes(btxlogo, "latin-1")) - return - if cmd == "!2" + cept['TER']: - glob.ser.write(bytes(init_screen, "latin-1")) - return +# if cmd == "!1" + cept.TER +# glob.ser.write(bytes(c#ept.btxlogo, "latin-1")) +# return +# if cmd == "!2" + cept.TER: +# glob.ser.write(bytes(cept.init_screen, "latin-1")) +# return def goto_last_page(): """ go back to the previous page and make the current page the previous page @@ -127,7 +127,7 @@ def goto_last_page(): def send_welcome_page(): """ get the btxlogo, make a rtxPage of it and send it to the client """ wpage = rtxPage() - wpage.set_page(bytes(btxlogo, "latin-1")) + wpage.set_page(bytes(cept.btxlogo, "latin-1")) send_page(wpage) def check_and_send_page(pgnr, errormsg): @@ -153,9 +153,7 @@ def check_and_send_page(pgnr, errormsg): def send_error(msg): """ send an error message to the client """ - ## TODO: make it appear in the status line in the correct colors etc - ## and jump back to the current cursor position - glob.ser.write(bytes(error_prefix + msg + error_suffix, "latin-1")) + glob.ser.write(bytes(cept.error_prefix + msg + cept.error_suffix, "latin-1")) def send_page(page): """ sends a page to the client """ diff --git a/rtxPage.py b/rtxPage.py index 037294e..078f76e 100644 --- a/rtxPage.py +++ b/rtxPage.py @@ -35,7 +35,12 @@ class rtxPage: @staticmethod def exists(page): """ checks if the page (i.e. the file) exists """ - return os.path.isfile(config.PAGES + page) + if os.path.isfile(config.PAGES + page): + return True + elif os.path.isfile(config.DEMOPAGES + page): + return True + else: + return False def get_page(self): """ returns the page if loaded @@ -73,16 +78,18 @@ class rtxPage: returns False if the page cannot be found returns True if the page has been loaded """ - filename = config.PAGES + page - - if os.path.isfile(filename): - with open(filename, "rb") as f: - self.die_seite = f.read() - self.seiten_nummer = page - link_liste = self._get_link_list() - return True + if os.path.isfile(config.PAGES + page): + filename = config.PAGES + page + elif os.path.isfile(config.DEMOPAGES + page): + filename = config.DEMOPAGES + page else: return False + + with open(filename, "rb") as f: + self.die_seite = f.read() + self.seiten_nummer = page + link_liste = self._get_link_list() + return True def _get_link_list(self): """ private function which parses the CEPT page and extracts the link list