1
0
rtx/rtx.sublime-workspace

609 lines
19 KiB
Plaintext
Raw Normal View History

{
"auto_complete":
{
"selected_items":
[
[
"_",
"_pos_cur_to_line"
],
[
"by",
"bytesclass"
],
[
"b",
"btxlogo"
],
[
"rtx",
"rtxHelpers"
],
[
"next",
"nextid"
],
[
"check",
"check_and_send_page"
],
[
"che",
"check_and_send_page"
],
[
"get",
"get_link"
],
[
"cmdline",
"cmdline"
],
[
"in",
"in_byte"
],
[
"link",
"link_liste"
]
]
},
"buffers":
[
{
"file": "rtx.py",
"settings":
{
"buffer_size": 918,
"line_ending": "Unix"
}
},
{
"file": "rtxMask.py",
"settings":
{
"buffer_size": 2011,
"line_ending": "Unix"
}
},
{
"file": "Vorbereitung Praesentation.txt",
"settings":
{
"buffer_size": 2695,
"line_ending": "Unix"
}
},
{
"file": "rtxPage.py",
"settings":
{
"buffer_size": 2466,
"line_ending": "Unix"
}
},
{
"contents": "# -*- coding: UTF-8 -*-\n'''\nrtx - RetroText\nrtxHelpers: verschiedene Hilfsfunktionen\nby Anna Christina Naß <acn@acn.wtf>\nreleased under GPL\n'''\n\nfrom rtxPage import rtxPage\nimport cept\nimport glob\nimport logging\n\ndef process_byte(in_byte):\n \"\"\" takes the received byte and processes the command line\n if a new command has been entered, it will call process_command()\n if a short link has been entered, the link_list of the current page will be searched\n and the found target will be sent to process_command()\n \"\"\"\n instr=str(in_byte, encoding=\"latin-1\")\n \n logging.debug(\"> %s < CD: %s\", instr, glob.ser.getCD())\n\n # what to send back to the client\n if instr == cept.INI:\n logging.debug(\"INI\")\n echo_char = \"*\"\n elif instr == cept.TER:\n logging.debug(\"TER\")\n echo_char = \"#\"\n else:\n echo_char=instr\n\n # start of line: clear rest of cmdline\n if len(glob.cmdline) == 0:\n glob.ser.write(bytes(cept.CLEARLINE, \"latin-1\"))\n\n # echo the character to the client\n glob.ser.write(bytes(echo_char, \"latin-1\"))\n\n glob.cmdline += instr\n\n # Backspace:\n if instr == cept.BSP:\n glob.cmdline = glob.cmdline[:-1]\n return\n\n logging.debug(\"Cmdline: >%s<\", glob.cmdline)\n\n # process links inside the page:\n if ( len(glob.cmdline) == 1 or len(glob.cmdline) == 2 ) and glob.curpage.get_link(glob.cmdline):\n glob.cmdline = cept.INI + glob.curpage.get_link(glob.cmdline) + cept.TER\n process_command(glob.cmdline)\n return\n\n # reset cmdline:\n if instr == cept.INI and glob.cmdline[-2:] == cept.INI+cept.INI:\n logging.debug(\"reset cmdline\")\n glob.cmdline = \"\"\n glob.ser.write(bytes(clear_line24, \"latin-1\"))\n return\n\n # goto last page:\n if instr == cept.TER and glob.cmdline == cept.INI+cept.TER:\n if glob.prevpage.get_page_id() == -1:\n glob.cmdline = \"\"\n send_error(\"Keine vorige Seite vorhanden.\")\n return\n glob.cmdline = \"\" # reset cmdline\n goto_last_page()\n return\n\n # \"Make it so\":\n if instr == cept.TER:\n # or instr == cept.SEND or instr == cept.CR:\n logging.info(\"Kommando: >%s<\", glob.cmdline)\n process_command(glob.cmdline)\n return\n\ndef process_command(cmd):\n \"\"\" processes the given command line\n \"\"\"\n\n # reset cmdline\n glob.cmdline = \"\"\n\n # process *cmdline#, normally a page-loading command:\n if cmd[0] == cept.INI and cmd[-1:] == cept.TER:\n pgnr = cmd[1:-1]\n check_and_send_page(pgnr, \"Die Seite kann nicht gefunden werden.\")\n\n # if only # is entered, either go to the link behind '#'\n # or to the next sub-page (2000a => 2000b) if it exists\n if cmd == cept.TER:\n if glob.curpage.get_link(\"#\"):\n pgnr = glob.curpage.get_link(\"#\")\n check_and_send_page(pgnr, \"Die Seite kann nicht gefunden werden.\")\n else:\n # check if the next page exists, e.g. 2000a => 2000b\n curid = glob.curpage.get_page_id()\n if curid[-1:].isalpha():\n # aus 2000a 2000b machen:\n nextid = curid[:-1] + chr(ord(curid[-1:])+1)\n check_and_send_page(nextid, \"Keine n\"+str(cept['UMLAUT'])+\"achste Seite gefunden.\")\n\n # special commands:\n# if cmd == \"!1\" + cept.TER\n# glob.ser.write(bytes(c#ept.btxlogo, \"latin-1\"))\n# return\n# if cmd == \"!2\" + cept.TER:\n# glob.ser.write(bytes(cept.init_screen, \"latin-1\"))\n# return\n\ndef goto_last_page():\n \"\"\" go back to the previous page and make the current page the previous page\n \"\"\"\n logging.info(\"Letzte Seite: %s\", str(glob.prevpage.get_page_id()))\n\n # swap prevpage and curpage\n temp = glob.curpage\n glob.curpage = glob.prevpage\n glob.prevpage = temp\n\n # send the previous page (now curpage) to the client\n send_page(glob.curpage)\n\ndef send_welcome_page():\n \"\"\" get the btxlogo, make a rtxPage of it and send it to the client \"\"\"\n wpage = rtxPage()\n wpage.set_page(bytes(cept.btxlogo, \"latin-1\"))\n send_page(wpage)\n\ndef check_and_send_page(pgnr, errormsg):\n \"\"\" checks if the page \"pgnr\" exists\n if yes, it loads it into curpage and sends it to the client\n if not, it sends the error message \"errormsg\" to
"file": "rtxHelpers.py",
"file_size": 4698,
"file_write_time": 131080701920000000,
"settings":
{
"buffer_size": 4542,
"line_ending": "Unix"
}
},
{
"file": "rtxModem.py",
"settings":
{
"buffer_size": 1504,
"line_ending": "Unix"
}
},
{
"file": "config.py",
"settings":
{
"buffer_size": 738,
"line_ending": "Unix"
}
},
{
"contents": "'''\nrtx - RetroText\ncept: Enthält CEPT-Steuerzeichen\nby Anna Christina Naß <acn@acn.wtf>\nreleased under GPL\n'''\n\nCR = \"\\x0d\",\nLF = \"\\x0a\",\nUMLAUT = \"\\xc9\",\nINI = \"\\x13\",\nTER = \"\\x1c\",\nSEND = \"\\x1a\",\nCURSOR_ON = \"\\x11\",\nBSP = \"\\x08\", # backspace\nCLEARLINE = \"\\x18\"\n\nclear_line24 = (\n \"\\x1f\\x58\\x41\" # Cursor Zeile 24, Spalte 0\n \"\\x18\" # Zeile löschen\n )\n\nerror_prefix = (\n \"\\x1f\\x2f\\x40\\x58\" # Servicesprung Zeile 24\n )\nerror_suffix = (\n \"\\x1f\\x2f\\x4f\" # Ende Servicesprung\n \"\\x1f\\x58\\x41\" # Cursor Zeile 24, Spalte 0\n )\n\neingabezeile = ( \n \"\\x1b\" # Hintergrund blau ganze Reihe\n \"\\x23\" \n \"\\x21\" \n \"\\x54\"\n \"\\x44\" # Hintergrund blau, Vordergrund gelb\n \"\\x83\" )\n\ninit_screen = ( \n \"\\x1f\" \"\\x2f\" \"\\x42\" # Grundzustand parallel\n \"\\x9b\"\n \"\\x30\" \"\\x32\" \"\\x3b\" \"\\x32\" \"\\x33\" \"\\x55\" # Scrollbereich ist Zeile 2 - 23\n \"\\x9b\"\n \"\\x32\" \"\\x60\" # Implizites Scrollen an\n \"\\x1b\" \"\\x23\" \"\\x21\" \"\\x54\" # Hintergrund blau ganze Reihe\n \"\\x94\" \"\\x83\" # Hintergrund blau, Vordergrund gelb\n \"\\x42\" \"\\x74\" \"\\x78\" \"\\x20\" \"\\x53\" \"\\x65\" \"\\x72\" \"\\x76\" \"\\x65\" \"\\x72\" # Btx Server\n \"\\x20\" \"\\x2d\" \"\\x20\" \"\\x4E\" \"\\x6F\" \"\\x72\" \"\\x62\" \"\\x65\" \"\\x72\" \"\\x74\" # - Norbert\n \"\\x20\" \"\\x4B\" \"\\x65\" \"\\x68\" \"\\x72\" \"\\x65\" \"\\x72\" \"\\x2c\" \"\\x20\" # Kehrer, \n \"\\x41\" \"\\x70\" \"\\x72\" \"\\x69\" \"\\x6C\" \"\\x20\" \"\\x32\" \"\\x30\" \"\\x31\" \"\\x36\" # April 2016 \n \"\\x90\" \"\\x87\" # Hintergrund schwarz, Vordergrund weisz\n \"\\x0d\" \"\\x0a\" # CR/LF\n \"\\x11\" # Cursor on\n )\n\nbtxlogo = (\n \"\\x1f\\x2f\\x42\" # Grundzustand parallel\n \"\\x1b\\x7e\" # Zeichensatz G1 rechts\n \"\\x9b\\x31\\x40\" # Farbtafel 1 (Halbtöne)\n \"\\x1b\\x23\\x20\\x54\" # ganzer Schirm blau\n \"\\x1f\\x3d1# 200961a\\x1f\" # Link zur Demo-Startseite 200961a\n \"\\x1f\\x43\\x48\\xb8\\xa3\\x12\\x57\\xe4\"\n \"\\x1f\\x44\\x47\\xea\\xa0\\x12\\x59\\xb5\"\n \"\\x1f\\x45\\x47\\xea \\xe8\\xfc\\xdf\\x12\\x49\\xfc\\xb4 \\xb5\"\n \"\\x1f\\x46\\x47\\xea \\xe8\\xdf\\x12\\x44\\xa3\\x12\\x45\\xdf\\x12\\x44\\xb4 \\xb5\"\n \"\\x1f\\x47\\x47\\xea \\xaa\\xdf\\xdf\\xdf\\xaf\\xa1 \\xfc\\xdf\\xdf\\xfc \\xa2\\xaf\\xdf\\xdf\\xdf\\xa5 \\xb5\"\n \"\\x1f\\x48\\x47\\xea \\xa2\\xe3\\xf8\\xfe\\xdf\\xea\\xdf\\x12\\x43\\xb5\\xdf\\xfd\\xf4\\xb3\\xa1 \\xb5\"\n \"\\x1f\\x49\\x47\\xea \\xdf\\x12\\x43\\xea\\xdf\\x12\\x43\\xb5\\xdf\\x12\\x43 \\xb5\"\n \"\\x1f\\x4a\\x47\\xea \\xdf\\x12\\x43\\xfd\\xf3\\xaf\\xaf\\xf3\\xfe\\xdf\\x12\\x43 \\xb5\"\n \"\\x1f\\x4b\\x47\\xea \\xdf\\x12\\x4d \\xb5\" # Ende Telefon-Logo\n \"\\x1f\\x4c\\x47\\xea \\x12\\x59\\xb5\"\n \"\\x1f\\x4d\\x47\\xea \\x12\\x44\\xbc\\xb4\\xf0\\xb0\\xf4\\xe0\\xb0\\xf0\\xb0\\xec\\xa4\\xf0\\xb0\\xb0\\xb0\\xf4 \\x12\\x44\\xb5\" # Logo-Text 1\n \"\\x1f\\x4e\\x47\\xea \\x12\\x44\\xbf\\xb1\\xbd\\xa5\\xb5\\xea \\xb5\\xb5\\xea \\xbd\\xa5\\xb9\\xb1\\xb5 \\x12\\x44\\xb5\" # Logo-Text 2\n \"\\x1f\\x4f\\x47\\xea \\x12\\x44\\xa1\\xa1\\xa3\\xa1\\xa3\\xa2 \\xa3\\xa1\\xa2 \\xa3\\xa1\\xa1\\xa1\\xa3 \\x12\\x44\\xb5\" # Logo-Text 3\n \"\\x1f\\x50\\x47\\xa2\\xe4\\xa0\\x12\\x57\\xb8\\xa1\"\n \"\\x1f\\x51\\x49\\xa3\\x12\\x57\\r\\n\"\n \"\\x9b\\x31\\x40\" # Farbtafel 1\n \"\\x87\\x19\\x50\\x12\\x67\" # Strich\n \"\\x9b\\x30\\x40\" # Farbtafel 0\n \"\\x87 Herzlich Willkommen in\\r\\n\"\n \"\\x87 retroText!\\r\\n\"\n \"\\x9b\\x31\\x40\" # Farbtafel 1\n \"\\x87\\x19\\x50\\x12\\x67\"\n \"\\x9b\\x30\\x40\" # Farbtafel 0\n \"\\x83Mit # fortfahren\\r\\n\"\n )",
"file": "cept.py",
"file_size": 3169,
"file_write_time": 131080704460000000,
"settings":
{
"buffer_size": 3113,
"line_ending": "Unix"
}
}
],
"build_system": "",
"build_system_choices":
[
],
"build_varint": "",
"command_palette":
{
"height": 392.0,
"last_filter": "git st",
"selected_items":
[
[
"git st",
"Git: Status"
],
[
"git comm",
"Git: Commit"
],
[
"git",
"Git: Commit"
],
[
"git ad",
"Git: Add..."
],
[
"inst",
"Package Control: Install Package"
],
[
"Package Control: ",
"Package Control: Remove Package"
],
[
"pack",
"Package Control: List Packages"
],
[
"install",
"Package Control: Install Package"
],
[
"ruler",
"QuickRulers: Open Panel"
],
[
"line",
"Line Ending: Unix"
],
[
"",
"Hex Viewer: Toggle Hex View"
],
[
"hex",
"Hex Viewer: Toggle Hex View"
]
],
"width": 528.0
},
"console":
{
"height": 584.0,
"history":
[
"import urllib.request,os,hashlib; h = '2915d1851351e5ee549c20394736b442' + '8bc59f460fa1548d1514676163dafc88'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); by = urllib.request.urlopen( 'http://packagecontrol.io/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); print('Error validating download (got %s instead of %s), please try manual install' % (dh, h)) if dh != h else open(os.path.join( ipp, pf), 'wb' ).write(by)"
]
},
"distraction_free":
{
"menu_visible": true,
"show_minimap": false,
"show_open_files": false,
"show_tabs": false,
"side_bar_visible": false,
"status_bar_visible": false
},
"expanded_folders":
[
"/C/Daten/ownCloud/btx/rtx",
"/C/Daten/ownCloud/btx/norbert"
],
"file_history":
[
"/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",
"/C/Users/nass/AppData/Roaming/Sublime Text 3/Packages/Default/Preferences.sublime-settings",
"/C/Daten/ownCloud/btx/rtx/Vorbereitung Praesentation.txt",
"/S/ZDV-IVS/Abteilung/AG-Infrastruktur/KVM over IP mit neuem Java.txt",
"/C/Temp/java.security",
"/C/Temp/kvm.cgi.jnlp",
"/C/Program Files (x86)/Java/jre1.8.0_92/lib/security/java.security",
"/C/Daten/ownCloud/btx/rtx/rtx.sublime-project",
"/X/Projekte/rtx/config.py",
"/X/Projekte/rtx/norbert/btx_server.js",
"/X/Projekte/rtx/cept.py",
"/X/Projekte/rtx/rtx.py",
"/X/Projekte/rtx/rtxPage.py",
"/X/Projekte/rtx/rtxHelpers.py",
"/X/Projekte/rtx/pages/200961a",
"/X/Projekte/rtx/rtxSerial.py",
"/C/Users/nass/AppData/Roaming/Sublime Text 3/Packages/User/hex_viewer.sublime-settings",
"/X/Projekte/rtx/norbert/pages/amiga/20000a",
"/C/Users/nass/AppData/Roaming/Sublime Text 3/Packages/HexViewer/hex_viewer.sublime-settings",
"/X/Projekte/rtx/rtx-page.py",
"/X/Projekte/rtx/rtx-cept.py"
],
"find":
{
"height": 26.0
},
"find_in_files":
{
"height": 0.0,
"where_history":
[
]
},
"find_state":
{
"case_sensitive": true,
"find_history":
[
"cept",
"cept['TER']",
"cept['INI']",
"0x(..),",
"BTX_UML"
],
"highlight": true,
"in_selection": false,
"preserve_case": false,
"regex": false,
"replace_history":
[
"cept.TER",
"cept.INI",
"\"\\\\x\\1\"",
"\"\\\\x\\1",
"\"\\\\x\\1\""
],
"reverse": false,
"show_context": true,
"use_buffer2": true,
"whole_word": false,
"wrap": true
},
"groups":
[
{
"selected": 0,
"sheets":
[
{
"buffer": 0,
"file": "rtx.py",
"semi_transient": false,
"settings":
{
"buffer_size": 918,
"regions":
{
},
"selection":
[
[
254,
254
]
],
"settings":
{
"auto_complete": false,
"syntax": "Packages/Python/Python.sublime-syntax"
},
"translation.x": 0.0,
"translation.y": 0.0,
"zoom_level": 1.0
},
"stack_index": 0,
"type": "text"
},
{
"buffer": 1,
"file": "rtxMask.py",
"semi_transient": false,
"settings":
{
"buffer_size": 2011,
"regions":
{
},
"selection":
[
[
1961,
1961
]
],
"settings":
{
"auto_complete": false,
"syntax": "Packages/Python/Python.sublime-syntax"
},
"translation.x": 0.0,
"translation.y": 450.0,
"zoom_level": 1.0
},
"stack_index": 1,
"type": "text"
},
{
"buffer": 2,
"file": "Vorbereitung Praesentation.txt",
"semi_transient": false,
"settings":
{
"buffer_size": 2695,
"regions":
{
},
"selection":
[
[
2656,
2656
]
],
"settings":
{
"rulers":
[
40
],
"syntax": "Packages/Text/Plain text.tmLanguage"
},
"translation.x": 0.0,
"translation.y": 1260.0,
"zoom_level": 1.0
},
"stack_index": 2,
"type": "text"
},
{
"buffer": 3,
"file": "rtxPage.py",
"semi_transient": false,
"settings":
{
"buffer_size": 2466,
"regions":
{
},
"selection":
[
[
2466,
2466
]
],
"settings":
{
"auto_complete": false,
"syntax": "Packages/Python/Python.sublime-syntax",
"translate_tabs_to_spaces": false
},
"translation.x": 0.0,
"translation.y": 972.0,
"zoom_level": 1.0
},
"stack_index": 3,
"type": "text"
},
{
"buffer": 4,
"file": "rtxHelpers.py",
"semi_transient": false,
"settings":
{
"buffer_size": 4542,
"regions":
{
},
"selection":
[
[
962,
1005
]
],
"settings":
{
"auto_complete": false,
"syntax": "Packages/Python/Python.sublime-syntax",
"translate_tabs_to_spaces": false
},
"translation.x": 0.0,
"translation.y": 0.0,
"zoom_level": 1.0
},
"stack_index": 4,
"type": "text"
},
{
"buffer": 5,
"file": "rtxModem.py",
"semi_transient": false,
"settings":
{
"buffer_size": 1504,
"regions":
{
},
"selection":
[
[
0,
0
]
],
"settings":
{
"auto_complete": false,
"syntax": "Packages/Python/Python.sublime-syntax"
},
"translation.x": 0.0,
"translation.y": 0.0,
"zoom_level": 1.0
},
"stack_index": 7,
"type": "text"
},
{
"buffer": 6,
"file": "config.py",
"semi_transient": false,
"settings":
{
"buffer_size": 738,
"regions":
{
},
"selection":
[
[
0,
0
]
],
"settings":
{
"auto_complete": false,
"syntax": "Packages/Python/Python.sublime-syntax"
},
"translation.x": 0.0,
"translation.y": 0.0,
"zoom_level": 1.0
},
"stack_index": 6,
"type": "text"
},
{
"buffer": 7,
"file": "cept.py",
"semi_transient": false,
"settings":
{
"buffer_size": 3113,
"regions":
{
},
"selection":
[
[
1782,
1794
]
],
"settings":
{
"auto_complete": false,
"syntax": "Packages/Python/Python.sublime-syntax",
"translate_tabs_to_spaces": false
},
"translation.x": 0.0,
"translation.y": 702.0,
"zoom_level": 1.0
},
"stack_index": 5,
"type": "text"
}
]
}
],
"incremental_find":
{
"height": 26.0
},
"input":
{
"height": 34.0
},
"layout":
{
"cells":
[
[
0,
0,
1,
1
]
],
"cols":
[
0.0,
1.0
],
"rows":
[
0.0,
1.0
]
},
"menu_visible": true,
"output.find_results":
{
"height": 0.0
},
"output.hex_viewer_inspector":
{
"height": 142.0
},
"pinned_build_system": "",
"project": "rtx.sublime-project",
"replace":
{
"height": 48.0
},
"save_all_on_build": true,
"select_file":
{
"height": 0.0,
"last_filter": "",
"selected_items":
[
],
"width": 0.0
},
"select_project":
{
"height": 0.0,
"last_filter": "",
"selected_items":
[
],
"width": 0.0
},
"select_symbol":
{
"height": 0.0,
"last_filter": "",
"selected_items":
[
],
"width": 0.0
},
"selected_group": 0,
"settings":
{
},
"show_minimap": true,
"show_open_files": true,
"show_tabs": true,
"side_bar_visible": true,
"side_bar_width": 150.0,
"status_bar_visible": true,
"template_settings":
{
}
}