fbdoc

Documentatie voor FreeBASIC-programma's · Documentation for FreeBASIC programs

Nederlands | English | Downloaden | Download | Demo | basicdoc

Wat is het?

Een kleine commandline-tool die documentatie maakt uit FreeBASIC-broncode (.bas en .bi). fbdoc is zelf in FreeBASIC geschreven en heeft geen extra bibliotheken nodig.

Uitvoer: text, Markdown, HTML, JSON, Graphviz, Mermaid en een aanroepboom.

Nieuw in versie 1.1.0

fbdoc 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

Een soort javadoc voor FreeBASIC. fbdoc leest het commentaar boven elke declaratie, herkent tags als @param, @return en @see, en maakt er nette documentatie van. Ontbreekt het commentaar, dan bedenkt fbdoc een beschrijving op basis van de naam en de parameters.

'' Telt twee getallen op.
'' @param a  eerste getal
'' @param b  tweede getal
'' @return de som
Function Som(ByVal a As Integer, ByVal b As Integer) As Integer

Documentatie in het Nederlands genereren:

./fbdoc -l nl -f html -o api.html -n "Mijn project" api.bas

Vertalingen

fbdoc 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/de.polaadt een .po-bestand op een andere plek
FBDOC_LANGomgevingsvariabele voor de standaardtaal

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

Een taal toevoegen

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

Nieuwe vertalingen zijn welkom via SourceForge.

Compileren

Installeer de FreeBASIC-compiler en voer uit:

fbc -lang fblite -s console fbdoc.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

fbdoc 1.1.0
Windowsfbdoc_win64_1.1.0.zip251 KB
Linuxfbdoc_linux64_1.1.0.zip159 KB

What is it?

A small command-line tool that generates documentation from FreeBASIC source code (.bas and .bi). fbdoc is itself written in FreeBASIC and needs no extra libraries.

Output: text, Markdown, HTML, JSON, Graphviz, Mermaid and a call tree.

New in version 1.1.0

fbdoc 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

A javadoc-style generator for FreeBASIC. fbdoc reads the comment above each declaration, understands tags such as @param, @return and @see, and turns it into clean documentation. Where comments are missing, it derives a description from the name and parameters.

'' Adds two numbers.
'' @param a  first number
'' @param b  second number
'' @return the sum
Function Sum(ByVal a As Integer, ByVal b As Integer) As Integer

Generate documentation (in English):

./fbdoc -f html -o api.html -n "My project" api.bas

Translations

fbdoc 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/de.poloads a .po file from another location
FBDOC_LANGenvironment variable for the default language

Texts missing from a translation stay in English.

Adding a language

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

New translations are welcome on SourceForge.

Building

Install the FreeBASIC compiler and run:

fbc -lang fblite -s console fbdoc.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

fbdoc 1.1.0
Windowsfbdoc_win64_1.1.0.zip251 KB
Linuxfbdoc_linux64_1.1.0.zip159 KB