vmagnin/gtk-fortran

The HL API documentation needs updating to GTK 4

vmagnin opened this issue · 0 comments

The problem

In the early days of gtk-fortran, the HL API documentation was automatically generated from source code comments, but the memory of which tool was exactly used is uncertain… This is the syntax that was used in the comments:

  • A block delimited by !* and !/ provides a section header.
  • A block delimited by !+ and !- describes an individual routine. The arguments are described in a colon-separated list with name: type : status : description.

The commit 004f80e by jtappin on the 2011-04-10 (gtk2 branch) says:

"modified: src/gtk-hl.f90: Documentation comments organized/corrected."
! To facilitate the automatic extraction of API information, there are
! 2 types of comment block that are extracted:
!
! Blocks delimited by !* and !/ which provide a section header and
! an optional description for a group of widgets.
!
! Block delimited by !+ and !- describe an individual routine.
! !+ should immediately precede the function or subroutine statement.
! The descriptive comments should come between that and the start of
! the declarations. The arguments are described in a colon-separated list
! with name: type : status : description.
! If there is any description following the table, then a line with just
! a ! character must terminate the table.

See for example that file: https://github.com/vmagnin/gtk-fortran/blob/gtk4/src/gtk-hl-container.f90 1
And an example of a generated documentation: https://github.com/vmagnin/gtk-fortran/wiki/Highlevel-api 2

A solution

A python script could be written to extract those sections and create a markdown file.