Review Request 128606: [kapidox] Read library fancyname from metainfo.yaml before parsing it from CMakeLists.txt

Daniel Vrátil dvratil at kde.org
Thu Aug 4 23:34:25 UTC 2016


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/128606/
-----------------------------------------------------------

Review request for KDE Frameworks and Olivier Churlaud.


Repository: kapidox


Description
-------

We have some a few repositories called "akonadi-something" (for instance "akonadi-calendar"). The current code in kapidox will only parse "fancyname" of the library from `project()` macro in CMakeLists.txt. We'd like to be able to customize the name though, because in our CMakeLists.txt we have `project(Akonadi-Calendar)` (because CMake does not allow spaces in project names), which would make the library to be listed as "Akonadi-Calendar" in the generated docs, but we'd like it to be listed as "Akonadi Calendar". This patch makes kapidox to first look for `fancyname` entry in metainfo.yaml and fall back to parsing CMakeLists.txt otherwise.

This also fixes the regex for parsing CMakeLists.txt to support project names with dashes and underscores. The current version of the regex returns only "Akonadi" for `project(Akonadi-Calendar)`.


Diffs
-----

  src/kapidox/preprocessing.py 606d7db 
  src/kapidox/utils.py 5551bf4 

Diff: https://git.reviewboard.kde.org/r/128606/diff/


Testing
-------

1) Added `fancyname: Akonadi Calendar` to akonadi-calendar.git/metainfo.yaml and ran kapidox_generate - the library is listed as "Akonadi Calendar" in the Library list table
2) Ran kapidox_generate on akonadi-contacts.git without adding `fancyname` to metainfo.yaml, the library was correctly listed as "Akonadi-Contacts".


Thanks,

Daniel Vrátil

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20160804/e78f96f7/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list