Tag : documentation

KDE Wikis: where should I write?

Hi there,

TL;DR

If you don’t know, go there first: https://community.kde.org/Guidelines_and_HOWTOs/Documentation_in_wikis

Some documentation issues

I’ve been asked a lot lately about some directions to document new projects in KDE.
I’ve seen as well an awesome tutorial being published on Planet KDE, with a very wrong address.

To counter that I wrote a page [1] that explains everything in details. If it’s not enough, just ping me and let me know.

A recap of previous episodes

During the sprint at CERN, we worked at a logical organization of our wikis [2].

On the Community wiki (https://community.kde.org), you’ll find a Guides and HOWTOs page, in which we try to centralize all the generic tutorials for KDE newcomers (and old ones as well :D). Go there whenever you have questions, take the time to read the pages, correct them if needed, add new ones if you think something is missing.

Even Specially if you’re new to KDE, write tutorial about what you find unclear, and ask us for review. You are the ones who know what information is missing!!

Cheers and have fun !
Olivier

Links

[1] https://community.kde.org/Guidelines_and_HOWTOs/Documentation_in_wikis
[2] https://blogs.churlaud.com/somefoobar/2016/03/17/we-reorganized-most-of-the-wikis-we-need-you/

Akademy: Let’s talk about music player and documentation

Hey,

I’ll be at QtCon and Akademy in Berlin, mostly as observer, I guess 🙂

I’ll have also two workshops/discussions on Tuesday 6th (see [1]).

Music player

For some time now, there were threads [2] about designing a new music player. The VDG people came up with a vision and some first design ideas [3] and I built a first specification page on the community wiki [4].

I’ll do a workshop which will deal about:

  • what will make this player not just another player
  • feature discussion
  • architecture design
  • use of the public libraries of plasma-mediacenter
  • …what you want to add…

The first 3 points will be mostly a presentation of what I want to do, with discussions about how it can be done better.

I already wrote some code, but it was mostly to make some experimentation, the project was put on hold until this Akademy session, in order to start on the right basis.

Documentation and KApiDox

I also reserved a slot for KApiDox, the program that generates the api.kde.org website. The codebase changed a lot lately, and more and more projects are being generated. However, it’s still not very robust to errors (the whole process would break instead of just ditching the error source) and it appeared not to respond to every usercases.

If you think our API documentation is important and can/should be enhanced, please join the discussion so that I can know your needs (as API user or API writer) and enhance the whole thing in the future.

Links

[1] https://community.kde.org/Akademy/2016/Tuesday
[2] https://forum.kde.org/viewtopic.php?f=285&t=122273
[3] https://community.kde.org/KDE_Visual_Design_Group/Music_Player
[4] https://community.kde.org/Playground/MediaPlayer



post image

The KApiDox poll results (at last!)

Hey!

I add to put on the side most of my contributions for some times, as I’m finishing my master thesis in end August, and that I still have some exams in parallel. However it’s important that I give you a feedback about what you expect KApiDox to be. I already apologies, this post is long, but hopefully worth it.

As some of you might remember, there was a survey about the future of KApiDox and more generally of api.kde.org. First: thank you for answering, it was very helpful. In this post I’ll review your answers and discuss some of them. Feel free to comment if you do not agree with my understanding or to share your point of view. This is important for the promotion of KDE products.

Who are you

I’m quite happy because I got quite a lot of answers, mostly by KDE developers. Most people seem to be using api.kde.org for the KDE Frameworks documentation. An interesting contribution was from a developer that uses only the Qt Frameworks because he founds the KF5 online documentation difficult to use. Well, let’s try to change that!

Current status

I worked at modernizing the old api.kde.org website. It’s unfortunately not finished. Most of you find the new design nicer, which really pleases me, but still a lot of you think it’s not good enough to attract new people. As next questions show, there is a usability problem to solve: too many clicks to access to one info, more crosslinks are needed… (@VDG: Help!)

People expect the design to be more responsible for mobile browsing. I must say that I have no knowledge about this. As usual, contribution welcomed: just contact me!

Some people refered as well to the search box which

  1. Redirect to a page with the old design
  2. Shows results for all libraries, with not very transparent names (Frameworks in module Frameworks5)

This will change. See next section.

The future

Searching

I’d like to let KApiDox generating the search box. This would have the benefit to isolate the results. If you search within the KF5 module, you don’t want to get all the KDELibs, Krita, KDevelop results. Only KF5. And that makes sense.

Versioning

About the API versions to show, most of you proposed generating only the major versions plus master (For example when Okular 5 will be released: okular4, okular5, master). This makes sense to me and so I’ll see how to do this.

Man/Qch files

Some people asked me about this. It still exists but hidden: https://api.kde.org/qch. Currently one script generates them and put them where to be found by links statically written on a hand-written page. I want KApiDox to handle this. It will first generate the full qch/man file by product (one for all KF5). I’ll think later how to make it smooth library by library if really needed.

Products organization

Some of you think only the Frameworks should appear here. Here is why I disagree: we don’t have the man power to maintain scripts generating the [Plasma applets, Okular, Marble, Amarok, KIPI, Krita,…] API documentation. Having a centralized place allow people using more easily what we propose. It only needs to be correctly done (and I hope it will).

Now come the question about how to organize things. There is no clear cut whether Plasma and Frameworks API must be on top, or considered only as one other KDE products. It is not my choice to promote one or another library: for now it will stay alphabetical. A problem with the idea of organizing in categories, is that it is difficult to understand this organization. Is Okular in Office or Graphic? I use it only to read PDF and epub, but you can also read pictures… Hum…

The inside

It might be less important for you, but I redesigned most of the code (written in Python). Currently everything is done through dictionaries, without too much exception handling. This makes KApiDox not robust at all. I really want to change that, and to ease in the same time the feature extension. Moreover it is part of the Frameworks, but cannot be used in the current state by people out of KDE. I really want to make that nicer, more robust, and more Pythonic. We’ll see 😛

About the expected documentation

This poll raised some comments about the documentation in itself (content) and what could be improved. It doesn’t concern KApiDox but all of us, to provide more useful documentation.

  • The class-by-class documentation is mostly fine (Hurray!)
  • Information about how classes and libraries fit and work together is missing. A more high-level documentation (less technical but more about the concepts) would be really appreciated.
  • The introduction pages should link and name the main classes so that one doesn’t have to browse through all of them (through the awful class picker).
  • More tutorial and examples would be really appreciated, directly in the class documentation or in the introduction pages. Remember my last post about this.
  • Some API need reviews from people who are new to KDE: too much assumptions are made on the reader knowledge. This example was given:
    NormalizedRect TextEntity::transformedArea ( const QTransform &  matrix) const
    Returns the transformed area of the text entity. 

    Question: Why should one ever use such a method?

SOooooo

As you can see there is a lot to do. If you are interested in Python, Javascript, HTML, CSS or even Doxygen, please contact me. I’m sure there is work for more than me and it will allow the features to appear faster, and by that help the whole community!

I guess that’s all…. Oh and by the way: KDevelop, Krita and libgames, it would be great if you would join our front page…..

Writing up-to-date tutorials with Doxygen

The other day we were discussing on #plasma about KApiDox and what the Plasma team needed to write awesome documentation. Sebas and Martin were specially complaining about the fact that keeping a tutorial up-to-date was difficult because it is only text which will never be compiled for real by the writer, or not as presented.

The solution

I’d like to share the solution that Doxygen propose (adapted from the Doxygen documentation [1]):

The command is

\snippet <file-name> ( block_id )

Contrary to \include that includes a complete file as source code, this only quotes a fragment of a file. To refer to the same file you are documenting, use this as the <file-name>

For example, the putting the following command in the documentation, references a snippet in file example.cpp residing in a subdirectory which should be pointed to by EXAMPLE_PATH.

 /**
  * ....
  * A resource can easily be added with:
  * \snippet snippets/example.cpp Adding a resource
  * ...

A unique identifier refers to the snippet defined as followed

    QImage image(64, 64, QImage::Format_RGB32);
    image.fill(qRgb(255, 160, 128));
//! [Adding a resource]
    document->addResource(QTextDocument::ImageResource,
        QUrl("mydata://image.png"), QVariant(image));
//! [Adding a resource]
    ...

The output of the snippet command is:

document->addResource(QTextDocument::ImageResource,
    QUrl("mydata://image.png"), QVariant(image));

What follows

I updated the wiki [2], and now you can continue writing awesome documentation about how to use your libraries.

You know what? The more it goes, the more I think that Techbase is slowly becoming useless… But Schhhhtttttt… this is a secret. 😀

Cheers and have fun !

Sources

[1] http://www.stack.nl/~dimitri/doxygen/manual/commands.html#cmdsnippet
[2] https://community.kde.org/Guidelines_and_HOWTOs/API_Documentation#Code_Examples_in_APIDOX

post image

KApiDox (or api.kde.org): I need your input !

Hi there!

As you might know, I’m the new maintainer of KApiDox, and by that I’m more or less responisble of the api.kde.org website.

KApiDox used to be a script for generating the KDE Frameworks (KF5) API. This is however changing: I would like to generate all KDE APIs with this tool.

It is on its way, but before going further I need your input.

We worked with Thomas (@Colomar) on a little survey about the api. This will take less than 5 minutes of your time but help a lot. To be helpful, you don’t need to actually use the KApiDox scripts, but only the api.kde.org website.

Please answer the questions here: http://survey.kde.org/index.php/612593/lang-en

It will help me a lot to make things better!

Cheers and have fun!

post image

The future of KApiDox

Hello there,

I’ve been working hard to enhance KApiDox. I’d like to come back on what it is for, what I did and what I see for its future.

Tl;dr

I created a new branch in the KApiDox repository [1] and it’s currently in review on ReviewBoard [2].

Please review it, and if you have the corresponding rights, give me the green lights do put what I did in production. I think it will help KDE products to be more visible on the web. To know more, do read what follows. 🙂

What is KApiDox

KApiDox is part of the KDE Frameworks. As Aurélien Gateau wrote [3]:

KApiDox is a set of tools used to generate KDE Frameworks documentation. These command-line tools use Doxygen to do most of the work.

Currently you can use two tools: kgenapidox, to generate the documentation of a single framework and kgenframeworksapidox, to generate the documentations of all frameworks as well as the landing page which lets you list and filter frameworks by supported platforms.

You can see it working on [4].

Oh, and by the way, it’s written in Python.

What do I propose instead

The Frameworks are the only set of libraries that have a sort of visibility on the web. If other products, like say KDevelop or libkdegames, have public libraries, there is no easy way to generate the documentation and put it on the website.

Global idea

You already got it: the idea is to improve and correct what I pointed above. The new KApiDox would be one tool, that would be run over a set of repositories. It would read recursively all folders and look for CMakeLists.txt and metainfo.yml files. I’ll speak about the latter below.

The libraries are then organized in:

  • products: it can be a group like KDE Frameworks, Calligra, KDevelop… or a single library like KIPI,…
  • subgroups: Tier 1, Tier 2, …, Krita, …
  • libraries: KApiDox, KArchive, ….

A nice landing page is automatically created, then subpages and the documentation. You can see an example in the tar.gz file attached to my review [2].

How can it be used by your projects?

The documentation of your projects can be generated if they provide a metainfo.yml file.

The minimal syntax, for an independent library is:

# metainfo.yml

description: Library doing X
maintainer: ochurlaud
public_lib: true  # This is the only mandatory key, don't forget it!
logo: path/to/logo.png

This would be understood as a product consisting in one library, which name is read from the CMakeLists.txt.

It’s a little more complex if you want to have groups and subgroups, you can add a lot of other keys (to define the group description, where the sources are, where is the internal documentation…) that are presented in the metainfo_syntax.md file [5] at the root of the repository (in the branch olivier/generate_all_repos).

The future

Since I don’t have the green light to actually use the KApiDox scripts, I don’t want to spend too much time on it, in case my proposition is refused. But I have ideas to go further.

  • The tool can easily figure out if it is run over only one product or several or one library.. So the landing page could be different for each scenario.
  • People told me that having different version available (like Qt does for the versions 4.8 and 5.x) would be a great plus. It’s quite easy if I teach KApiDox some git commands….
  • KApiDox is designed to run only over public libraries (if the key public_lib is not true or not set the library is ignored). An argument could be used to generate as well the private libraries so that developers can use it for themselves.
  • KApiDox can currently only work in our infrastructure. If it is supposed to be part of the KDE Framework, it should be usable by other people, out of the community. This means refactoring the code a little and putting what is only part of KDE in another place.
  • Please review!

    Now that you have a rough idea of what I propose, if you find it useful, please tell it, and review my works so that it can be used as soon as possible! The link is there: [2].

    Links

    [1] KApiDox on Quickgit (think to select the correct branch: olivier/generate_all_repos)
    [2] Review on ReviewBoard
    [3] Aurélien’s post
    [4] API documentation generated by KApiDox
    [5] metainfo_syntax.md

post image

Sprint at CERN, hey you wanna help?

This is rather a short post…

The sprint at CERN for WikiToLearn, the VDG and Plasma team and to reorganize Techbase is beginning on Monday. As I already said in previous posts about reorganizing Techbase: having clean and organized wiki is really beneficial for the community. It will be easier to find the information, and thus the community will be more efficient.

People asked on the mailing list if they could remotely help… I just want to say: Of course! To work on the Techbase, you can join us on #kde-www and #kde-devel (on freenode) and see what’s still to do, and what the plan is.

I cannot already say how we are going to be organized but anyway, just ask on the channels (you can ping me @ochurlaud as well).

As I said, a short post: I’m already done.

Next week, ping us on #kde-www, and hack with us!

Cheers, and have fun!!
Olivier

post image

Sprint at CERN: it’s coming….

The sprint at CERN is already almost there.

I was quite afraid that our part (reorganizing the Techbase wiki) would not be doable because of the problem KDE had on all the wikis. Because of a severe spam attack [1], all edition rights were suspended until a better authentication was implemented.

It is now done! (kudos @neverendingo, @bcooksley, @Nikerabbit and all people who contributed to that)

What are we going to do there?

As already written in my previous post, this sprint is a WikiToLearn [2] sprint. Other projects, such as Plasma and the VDG Team were kindly invited to join. I’ll be part of the team working on tidying up the Techbase wiki [3].

This includes moving the KDE4-related documentation to an archive namespace, (re?)moving old drafts and duplicate documentation, checking that everything we leave in the main namespace is up-to-date. And certainly more.

What already began… What can you already do?

I’ve seen that @jucato already began to port some tutorials from KDE to KF5. He added some tasks that I regrouped here [4]. It’s not comprehensive but still a good start.

Begin to have ideas, create tasks in the project techbase on our Phabricator, and do whatever usefull I haven’t thought of!

Keep in mind…

KDE ev. is supporting this sprint: I know it is worth it and that this money is well spent… Let’s rock this!

Cheers and have fun!

Links

[1] http://marc.info/?l=kde-devel&m=137466627807667&w=2
[2] http://wikitolearn.org/
[3] https://techbase.kde.org
[4] https://phabricator.kde.org/T1399

post image

KDE: Sprint to reorganize the wikis (at CERN)

Hey there!

You might have heard of my proposition to reorganize the wikis. I posted it on kde-devel, kde-www and kde-community.

What’s the point?

You might have seen that Techbase [1] is a mess[citation needed]. It’s quite hard to know if an article deals with KDE4 or KF5 as plenty of the pages are drafts for another draft that is almost done… but almost.

What’s the plan?

So basically, our part in the sprint would be to take Techbase, read most of the documentation, and order/tidy up. This would entail putting all the KDE4-related pages in a new namespace, the drafts and unneeded pages in an other (to review before being removed),…

It’s also about planning for the future: do we accept to do a sprint for this every N years? Or do we introduce a sort of validating process for what is going to be in the wiki? And all the ideas that can come to you as well.

And that’s not all! We are kindly invited for this sprint by the teams of WikiToLearn, Plasma and KDEEdu, so we’ll meet all these humans who were hidden under names and pseudos. And that’s nice! (Yes, it will be my first Sprint, and also the first time I meet KDE developers for real…).

Where and when?

Here comes the best part: the Sprint will take place at CERN. I don’t know if we’ll get to visit (but I hope so), but already having been there, I can say being in the place is already quite exciting!
So let’s meet on March 7th in Geneva!

How do I join?

Here is the link where you need to register if you want to join physically: [2]. Please choose Wiki/Documentation as the team you are joining.

Here are the directions to get to CERN: [3].

Is it possible to give a hand remotely?

Of course it’s possible. I don’t know how it is going to be organized to deal with the different timezone but any kind of help is welcomed, always!

And now?

I’ll drop a link on the mailing-lists so that we prepare the Sprint some time ahead… But I think that there is no hurry 🙂

See you there and in the mean time:
Cheers and have fun!

Links

[1] Techbase: https://techbase.kde.org/
[2] Register here: https://sprints.kde.org/sprint/291
[3] Get to CERN: http://home.cern/directions