New doxygen script

Aurélien Gâteau agateau at kde.org
Fri Jan 10 15:42:59 UTC 2014


Le vendredi 10 janvier 2014 03:30:03 Alex Merry a écrit :
> Hey Aurélien,
> 
> I wrote a new script to generate apidocs.  It's in Python rather than
> shell script (because (a) yay for proper programming languages and (b)
> cross-platformness).
> 
> If you run it on a framework like KCoreAddons, you'll get actual bona
> fide apidocs (unlike if you try to run doxygen.sh on it).  It even pulls
> in README.md as the main page text.
> 
> It can be found in kde:clones/kapidox/alexmerry/kapidox on the
> frameworks branch.

Nice! I was thinking about porting the doxygen.sh script to Python as well, to 
help with maintainability and so that we can later use string.Template or even 
Jinja to handle HTML generation, but you beat me to it :)

I never got the classpicker to show up, that's already a nice addition. As I 
understand it, it still lacks the ability to bundle documentations for 
multiple frameworks together right? Do you think it is missing anything else?

One thing: you want to apply this patch:

diff --git a/src/kgenapidox.py b/src/kgenapidox.py
index 45e9cab..220cae1 100755
--- a/src/kgenapidox.py
+++ b/src/kgenapidox.py
@@ -239,7 +239,7 @@ def main():
     srcdir = os.path.abspath(os.path.realpath(args.moduledir))
 
     # Basic project info
-    modulename = os.path.basename(args.moduledir)
+    modulename = os.path.basename(srcdir)
     outputdir = modulename + '-apidocs'
     readme_file = os.path.join(srcdir, 'README.md')
     if os.path.isfile(readme_file):

First time I tried the script with "kgenapidox.py ." and was surprised not to 
find any new doc dir: doc had been generated in ".-apidocs" :)

One thing to take into account is KDE4 documentation. This is a question for 
Allen, I guess: is it possible to have api.kde.org uses the different apidox 
scripts for different sets of documentations so that we can use kde:kdelibs 
for KDE4 documentation and kde:kapidox for KF5 documentation?

Aurélien



More information about the Kde-frameworks-devel mailing list