{2}
{3}
This is the documentation for PC-BASIC {0}, last updated {1}.
It consists of the following documents:
Offline versions of this documentation are available in the following formats:
Documentation for other versions of PC-BASIC:
%s
\n' % DESC_STRS['description'] desc_html = '%s
\n' % DESC_STRS['long_description'] options_html = open(OPTIONS_HTML).read() examples_html = open(EXAMPLE_HTML).read() more_html = open(MORE_HTML).read() man_html = ''.join((title_html, desc_html, options_html, examples_html, more_html)) # output manfile man_file = os.path.join(man_path, man_name) with gzip.open(man_file, 'w') as man: man.write(_html_to_man(man_html).encode('utf-8')) def _text_to_man(text): """Convert plain text to troff.""" # escape special characters troff_escapes = [ (u'\\', u'\\[rs]'), (u'-', u'\\-'), (u'|', u'\\||'), (u'.', u'\\|.'), (u'"', u'\\[dq]'), (u"'", u"\\|'"), ] for key, value in troff_escapes: text = text.replace(key, value) # replace line feeds with spaces text = text.replace(u'\n', u' ') # replace repeated spaces with a single space text = re.sub(u' +', u' ', text) return text def _convert_element(element, indent=0, inside=False): """Recursively convert HTML element to troff.""" inner = _text_to_man(element.text) if element.text else '' tail = _text_to_man(element.tail) if element.tail else '' tag = element.tag.upper() children = ''.join( _convert_element(child, 1+indent, inside or tag == 'DD') for child in element.iterchildren(tag=etree.Element) ) if tag == 'H1': return '\n.SH NAME\n' + inner.lower().replace('\\-', '') + ' \\- ' if tag in ('H2', 'H3'): return '\n.SH ' + inner.upper() + children.upper() + '\n' + tail if tag in ('VAR', 'I'): return '\\fI' + inner + children + '\\fR' + tail if tag == 'B': return '\\fB' + inner + children + '\\fR' + tail if tag == 'DT': if inside: return '\n\n'+ inner + children + '\t' + tail return '\n.IP "' + inner + children + '"\n' + tail if tag == 'P': return '\n'+ inner + children + '\n' +tail if tag in ('DD', 'DL'): return inner + children + '\n' +tail return inner + children + tail def _html_to_man(html): """Convert HTML to troff.""" doc = etree.parse(StringIO(html), etree.HTMLParser(encoding='utf-8')) docroot = doc.getroot() manpage = '\'\\" t\n.pc\n.TH PCBASIC 1\n' + _convert_element(docroot) # replace two starting spaces (not sure where from) return re.sub('\t +', '\t', re.sub('\n +', '\n', manpage)) pcbasic-2.0.7/docs/source/ 0000775 0000000 0000000 00000000000 14412351740 0015355 5 ustar 00root root 0000000 0000000 pcbasic-2.0.7/docs/source/LICENSE.md 0000664 0000000 0000000 00000000350 14412351740 0016757 0 ustar 00root root 0000000 0000000 ### PC-BASIC documentation ### **Copyright © 2014—2022 Rob Hagemans.** This work is licensed under a [Creative Commons Attribution-ShareAlike 4.0 International License](http://creativecommons.org/licenses/by-sa/4.0/legalcode). pcbasic-2.0.7/docs/source/aspell.dict 0000664 0000000 0000000 00000001723 14412351740 0017505 0 ustar 00root root 0000000 0000000 personal_ws-1.1 en 143 runtime INP endian TROFF KYBD substring scancodes adapter Adapter whitespace VirtualBox SEG arg BASICA startup LSET encodings ERDEV stderr CPIDOS univga CHR Hong subdirectory fullscreen config BASIC's UniFont TCP CDBL len dev MBF FN mda CLS CHDIR QuickBASIC IEEE EGA LPRINT GW internet DOSBox SPC LF SCREENs AltGr one's DEFDBL DEFINT Bochs UniFont's colorburst INKEY LOC ArmSCII LOF CSNG CVD MKD codepage CVI Ok RENUM GBK MKI filename attr MYPROG Indic stdout CVS EOF scancode LPT CSRLIN Booleans FreeDOS th MKDIR Mazovia STRIG Esc DEFSNG bytecode indices DBCS EQV localhost ROMs blocky pcbasic PSET GOTO username VARPTR keystring XP FRE PROGRAMP codepages filesystem PCjr qbe RANDOMIZE BLOAD EXTERR PCOPY USR Iransystem LCOPY versa DEFSTR filenames PCJRGAME adapters variable's SCRN NUL num Num Hagemans LLIST ShareAlike GWBASIC's GOSUB PowerShell display's other's LPOS pseudocolours CAS COLOR RSET OS's tokenised QBASIC OSX BSAVE AppData wildcards CGA pcbasic-2.0.7/docs/source/cover.png 0000664 0000000 0000000 00000572441 14412351740 0017216 0 ustar 00root root 0000000 0000000 PNG IHDR \ F o gAMA a cHRM z&