msxbasicdoc

Documentatie voor MSX-BASIC-programma's · Documentation for MSX-BASIC programs

Nederlands | English | Downloaden | Download | Demo | basicdoc

Wat is het?

Een kleine commandline-tool die documentatie maakt uit MSX-BASIC-programma's (als ASCII opgeslagen). msxbasicdoc draait op Windows en Linux, is geschreven in FreeBASIC en heeft geen extra bibliotheken nodig.

Uitvoer: één HTML-pagina per programma, optioneel ook een Graphviz-bestand.

Nieuw in versie 0.4.0

msxbasicdoc is nu standaard Engelstalig en kan worden vertaald. Een Nederlandse vertaling wordt meegeleverd; gebruik -l nl voor de Nederlandse uitvoer. Zie Vertalingen.

Wat het doet

Brengt de structuur van een MSX-BASIC-programma in kaart door GOTO, GOSUB en RETURN te volgen. Het resultaat is één HTML-pagina met de routines, een aanroepgraaf, de gebruikte variabelen en waarschuwingen.

Sla het programma op de MSX op als ASCII: SAVE "SPEL.BAS",A

1000 '## TekenRand - tekent een rand om het scherm
1010 '@in  K = kleur
1020 ' Wist eerst het scherm.

Een HTML-documentatiepagina genereren (in het Nederlands):

./msxbasicdoc -l nl SPEL.BAS

Ook een dot-bestand voor Graphviz genereren:

./msxbasicdoc -l nl -dot SPEL.BAS

Vertalingen

msxbasicdoc is standaard Engelstalig. Een vertaling is een .po-bestand in de map lang naast het programma. Met -l kies je de taal:

ZoBetekenis
-l nllaadt lang/nl.po naast het programma (of in de huidige map)
-l pad/naar/es.polaadt een .po-bestand op een andere plek
MSXBASICDOC_LANGomgevingsvariabele voor de standaardtaal

Ontbreekt een tekst in de vertaling, dan blijft die Engels.

Een taal toevoegen

  1. Kopieer lang/msxbasicdoc.pot naar lang/<code>.po, bijvoorbeeld lang/es.po of lang/ja.po.
  2. Vul de msgstr-regels in en zet de taalcode bij Language:.
  3. Sla het bestand op als UTF-8.

Nieuwe vertalingen, bijvoorbeeld Spaans of Japans voor de MSX-gemeenschap, zijn welkom via SourceForge.

Compileren

Installeer de FreeBASIC-compiler en voer uit:

fbc -lang fblite -s console msxbasicdoc.bas

Zet de map lang naast het programma als je een vertaling wilt gebruiken.

De broncode, de volledige handleiding (README) en de wijzigingen (CHANGELOG) staan op SourceForge.

Downloaden

msxbasicdoc 0.4.0
Windowsmsxbasicdoc_win64_0.4.0.zip192 KB
Linuxmsxbasicdoc_linux64_0.4.0.zip104 KB

What is it?

A small command-line tool that generates documentation from MSX-BASIC programs (saved as ASCII). msxbasicdoc runs on Windows and Linux, is written in FreeBASIC and needs no extra libraries.

Output: a single HTML page per program, optionally also a Graphviz file.

New in version 0.4.0

msxbasicdoc is now in English by default and can be translated. A Dutch translation is included; use -l nl for Dutch output. See Translations.

What it does

Maps the structure of an MSX-BASIC program by following GOTO, GOSUB and RETURN. The result is a single HTML page with the routines, a call graph, the variables used and warnings.

Save the program on the MSX as ASCII: SAVE "GAME.BAS",A

1000 '## DrawBorder - draws a border around the screen
1010 '@in  K = colour
1020 ' Clears the screen first.

Generate an HTML documentation page (in English):

./msxbasicdoc GAME.BAS

Also generate a dot file for Graphviz:

./msxbasicdoc -dot GAME.BAS

Translations

msxbasicdoc is in English by default. A translation is a .po file in the lang folder next to the program. Choose the language with -l:

HowMeaning
-l nlloads lang/nl.po next to the program (or in the current folder)
-l path/to/es.poloads a .po file from another location
MSXBASICDOC_LANGenvironment variable for the default language

Texts missing from a translation stay in English.

Adding a language

  1. Copy lang/msxbasicdoc.pot to lang/<code>.po, for example lang/es.po or lang/ja.po.
  2. Fill in the msgstr lines and set the language code at Language:.
  3. Save the file as UTF-8.

New translations, for example Spanish or Japanese for the MSX community, are welcome on SourceForge.

Building

Install the FreeBASIC compiler and run:

fbc -lang fblite -s console msxbasicdoc.bas

Put the lang folder next to the program if you want to use a translation.

Source code, the full manual (README) and the changelog are on SourceForge.

Download

msxbasicdoc 0.4.0
Windowsmsxbasicdoc_win64_0.4.0.zip192 KB
Linuxmsxbasicdoc_linux64_0.4.0.zip104 KB