New paper “Authoritative linked data descriptions of debian source packages using ADMS.SW” accepted at OSS 2013

I’ll be presenting “Authoritative linked data descriptions of debian source packages using ADMS.SW” at OSS 2013.

Here’s the abstract :

The Debian Package Tracking System is a Web dashboard for Debian contributors and advanced users. This central tool publishes the status of subsequent releases of source packages in the Debian distribution.

It has been improved to generate RDF meta-data documenting the source packages, their releases and links to other packaging artifacts, using the ADMS.SW 1.0 model. This constitutes an authoritative source of machine-readable Debian “facts” and proposes a reference URI naming scheme for Linked Data resources about Debian packages.

This should enable the interlinking of these Debian package descriptions with other ADMS.SW or DOAP descriptions of FLOSS projects available on the Semantic Web also using Linked Data principles. This will be particularly interesting for traceability with upstream projects whose releases are packaged in Debian, derivative distributions reusing Debian source packages, or with other FLOSS distributions.

If you are interested, a previous paper which describes the same experiment is available online. See also previous installments on ADMS.SW in this blog.

Posted in Publications, Uncategorized | Tagged , , , , , , , , , , , , , | 1 Comment

Slides + Manual + programs generated from single org-mode source

I’ve been working on maintaining lecture slides and a manual, by writing a single source org-mode file.

From a single source I want to be able to generate different output PDFs, only changing a few switches :

  • slides deck
  • a manual document
  • source files for examples

The slides may contain notes.

Here’s an archive that contains an example document and complementary files. See this documentation document for more details (itself maintained with such an .org source).

Posted in Uncategorized | Tagged , , , , , | 1 Comment

Managing Python code with UTF-8 (french chars) in org-mode + babel + minted for LaTeX export

The goal of this article is to illustrate how to manage Python code which includes comments in UTF-8 characters inside a latin-1 source org-mode for LaTeX export.

Note that I’ve pasted in wordpress the HTML generated by org-mode, so I hope it isn’t broken too much.

My typical use case is a french lecture on Python where the text is written in french, as well as some of the code comments and examples

We’ll use org-mode’s babel module to include and manage the Python
examples. The goal is to write the source of the Python programs
directly in the same org source as the class book’s text, and to extract them into a subdir (with the “tangle” feature), so that they can be shipped to the students to experiment with.

The minted LaTeX environment is used, for babel, to make the Python syntax highlighting.

Continue reading

Posted in Uncategorized | Tagged , , , , , , , , , | Leave a comment

Conférence “L’économie du logiciel libre et la percée d’OpenStack dans le cloud” le 27/03 à Évry

L’association Minet organise une conférence le 27/03 dans les locaux de Télécom SudParis et Télécom École de Management à Évry, qui promet d’être intéressante.

Elle portera à la fois sur l’économie du logiciel libre et sur l’essort d’OpenStack dans le cloud.

N’hésitez pas à venir nombreux sur le campus pour écouter les interventions de Jonathan Le Lous, Julien Brichard et Raphaël Ferreira, et rencontrer votre serviteur ;-)

Plus de détails sur le site de Minet.

Posted in Uncategorized | Tagged , , , , | Leave a comment

Python RDF example of a MySQL triple store thanks to redland/librdf

In a way similar to my previous post about persisting graphs in PostGreSQL in PHP, here’s similar examples for Python and MySQL.

Note that you may need to adjust the MySQL table creation templates if you’re running librdf version 1.0.16 (see this bug for details).

The first example will load data from a file, and store the parsed model to the RDBMS, while the second example, will reload the model and issue queries on it.

These examples don’t do much, but hopefully, they’ll help you get started if you’re interested in using redland/librdf.

One potential benefit can be interoperability with other languages like PHP, for instance if you’re running harvesters in Python that will save facts in a triple store, which is then accessed by a PHP application that will publish a Web interface.

Posted in Uncategorized | Tagged , , , , , , | Leave a comment

RDF development in PHP with a PostGreSQL triple store thanks to the LibRDF OO wrapper for redland/librdf

Redland/librdf offers powerful features like being able to persist an RDF model to a relational database (only PostGreSQL seems to work on my setup with 1.0.16, but I may have misconfigured it). You can then do SPARQL queries over the model, and lots of other nice things.

Unfortunately, the default PHP bindings are not really object-oriented, so the code isn’t looking so good.

But thanks to a gentleman named David Shea, there is an object-oriented library named LibRDF (case is sensitive), that helps write nice looking PHP.

I discovered it via the blog post of Felix Ostrowski, who took over the maintenance of the LibRDF library (still the docs live on the original author’s site).

In his post, Felix illustrates how you may use it to parse Richard Cyganiak’s FOAF profile.

But the examples he gives don’t illustrate the full potential of persistence of the RDF graph into the DB.

Here’s my contribution in 2 examples that will hopefully help : first, one that load Richard’s FOAF to the DB, and one, that later retrieve the saved model and perform the same query (both pushed to my github clone of the library).

There may be some problems with the use of librdf, including its availability, as it is not full PHP of course… and I’ve heard of memory management problems, but, depening on your needs, this may be quite handy for writing Linked Data applications.

Posted in Uncategorized | Tagged , , , , , , | 2 Comments

The Debian Package Tracking System now publishes Turtle RDF meta-data

The Debian PTS now speaks the Turtle representation format for the export of RDF meta-data about Debian source packages.

Alongside HTML pages for humans, and the RDF/XML that had already been added to it this means that a new flavour of RDF is now available.

The Turtle format offers the benefits of both machine-readable meta-data, and a somehow human readable textual format too.

For instance, you may check the apache2 Turtle meta-data from the command-line with :
$ curl -L -s -H "Accept: text/turtle" http://packages.qa.debian.org/apache2

Here’s a link to a colorized HTML preview of http://packages.qa.debian.org/a/apache2.ttl.

Under the hood, the XSLT stylesheets of the PTS have been reworked to produce the Turtle format by default, and later convert them to RDF/XML.

Every Debian source package then has a reference URI in the Linked Data word, in the form http://packages.qa.debian.org/PACKAGE_NAME, that redirects, through proper content-negociation (the HTTP Accept header) to the HTML, RDF/XML or Turtle documents. For apache2, these are, resp. at http://packages.qa.debian.org/a/apache2.html, http://packages.qa.debian.org/a/apache2.rdf and http://packages.qa.debian.org/a/apache2.ttl.

The meta-data uses the model of the ADMS.SW ontology (1.0), and the content has also been slightly updated to make it more conformant to the ADMS.SW specifications (checks done with the ADMS.SW validator).

Let’s hope this makes RDF more familiar to Debian folks, and allows more Linked Data interlinking with other resources about FLOSS packages.

Posted in Uncategorized | Tagged , , , , , , , , | 3 Comments

A 30 minutes introduction to git

I’ve been looking for a set of slides that I could have reused to make a 30 minutes introduction to my colleagues at the computer science department.

Finding none that would be suitable (i.e. including graphical examples and not only being the canvas for a workshop), I tried to proceed with making one of my own.

I’ve reused the document git concepts simplified, whose content seemed quite good, and have converted it to a set of slides.

Here’s the result, which has been reworked a bit vs. the original “git concepts simplified” :

Here’s the PDF version.

Note that if you prefer a version that aligns more with the original, here’s also an older version, in : https://github.com/olberger/git-notes/tree/master/gcs

Update: For the lone reader that cannot attend my presentation, I should recommend to read first the HTML version by Sitaram at git concepts simplified, as the slides miss some details (which I’ve kept in the beamer notes only), then only refer to my slides in a second time, for some additions.

If you want the org-mode source (containing the dot source of the diagrams), contact me. I’ll maybe upload the source into some Git repo whan I have enough demand/time ;)

Posted in Uncategorized | Tagged , , | 1 Comment

Presented “Generating Linked Data descriptions of Debian packages in the Debian PTS” at the Paris Mini DebConf

I have made a presentation at the Paris MinDebconf 2012 about the work I’ve done to bring more semantic meta-data to the Debian PTS (see previous posts).

Here are my slides :

Also available here as PDF.

Posted in Uncategorized | Tagged , , , , , | 1 Comment

Debian Package Tracking System now produces RDF description of source packages

Here’s a second post on the subject of RDF descriptions for Debian source packages (see the previous post for some context).

From now on, the Debian Package Tracking System (PTS) will produce, alongside HTML pages meant for humans, RDF pages meant for Linked Data / Semantic Web aware applications.

Every Debian source package, which used to have an HTML page like http://packages.qa.debian.org/packagename now has a corresponding RDF/XML document available provided that the application/rdf+xml content-type is required (the HTTP client being redirected to the proper HTML or RDF document).
Continue reading

Posted in Uncategorized | Tagged , , , , , , , , | 6 Comments

Generating RDF description of Debian package sources with ADMS.SW

Edit : I’ve now managed to roll out my contribution which is now in production on packages.qa.debian.org. See a later post I’ve made on the subject, and beware that the generated RDF has changed a bit also.

ADMS.SW proposes specifications for description of software present in software catalogues.

I’ve tried and apply it to the contents of the Debian Package Tracking System (PTS), using transformation of the information known by the PTS to RDF+XML.

The result is not yet in production, but here’s an example of what can be done, using the Turtle syntax (more readable) :
Continue reading

Posted in Uncategorized | Tagged , , , , , , , , | 3 Comments

How to manage and export bibliographic notes/refs in org-mode

I’ve felt the need to manage my bibliography with org-mode, allowing me to write drafts of papers while being able to keep a track of all the litterature I’ve read and published already.

There are already many resources which explain how to integrate org-mode with reftex for instance, in order to cite papers inside org-mode, or how to link to biblographic references in bibtex format using org-bibtex.

People have also posted hints on how to manage bibliographic notes inside an org-mode file, which would allow to keep a track of read papers, tag them, add comments, and link these notes to the bibtex file contents.

But I couldn’t find a single comprehensive resource explaining if/how to manage links to such bibliographic notes that can both be navigated inside org-mode, and be exported to latex for previewing article drafts.

Here’s a proposal in attempt to bind all these needs together.

Let’s say we have one bibtex file ~/org/bibliography.bib which contains all the papers references.

We’ll also add into ~/org/bibliography.org all the notes relating to these articles. These notes will be identified by CUSTOM_ID properties which will contain the bibliographic reference of the papers.

Then we can create a draft in ~/org/draft.org which takes advantage of these.

We can then use two new link prefixes, bib and note to create links to entries in the bibtex file and the corresponding bibliographic notes. These are based on the use of a special rtcite link, that will be handled by a bit of emacs lisp.

Provided that some code is added in the .emacs to treat link opening and latex export for these rtcite links, we now have a valid solution :

  • clicking on a note:abibref link in an org-mode document will jump to the corresponding bibliographic note about a particular paper ‘abibref’ (a section in ~/org/bibliography.org which has a :CUSTOM_ID: abibref property).
  • clicking on bib:abibref link in an org-mode document will jump to the corresponding bibliographic reference in the bibtex file.
  • exporting an org document containing either of the above links to LaTeX will produce correct references cite{abibref} LaTeX code (see the results here : draft.pdf).

Details of the bibliographic notes contents (~/org/bibliography.org):

#+LINK: bib rtcite:bibliography.bib::%s

#+LINK: note rtcite:bibliography.org::#%s

#+title: My bibliographic notes

# \bibliography{bibliography}

* My papers

** 2005

*** Why and how to contribute to libre software when you integrate them into an in-house application ?

:PROPERTIES:
:CUSTOM_ID: bac05why
:END:

[[bib:bac05why][BibTeX]] .

/This is an interesting paper.../

See also [[note:berger06integration]]

In the above, note that note: links use rtcite links with a # character, which will allow jumping to the CUSTOM_ID property.

Details of a paper draft (~/org/draft.org) :

#+LINK: note rtcite:~/org/bibliography.org::#%s

#+LINK: bib rtcite:~/org/bibliography.bib::%s

#+title: How to mix org and bib for fun and profit
#+author: Olivier Berger

# \bibliography{bibliography}

* Read a lot

See [[note:bac05why][Why and how to contribute to libre software]] or [[bib:berger06integration]] .

#+BIBLIOGRAPHY: bibliography plain limit:t

Excerpts of the corresponding .emacs :

(defun my-rtcite-export-handler (path desc format)
  (message "my-rtcite-export-handler is called : path = %s, desc = %s, format = %s" path desc format)
  (let* ((search (when (string-match "::#?\\(.+\\)\\'" path)
                   (match-string 1 path)))
         (path (substring path 0 (match-beginning 0))))
    (cond ((eq format 'latex)
           (if (or (not desc) 
                   (equal 0 (search "rtcite:" desc)))
               (format "\\cite{%s}" search)
             (format "\\cite[%s]{%s}" desc search))))))


(require 'org)

(org-add-link-type "rtcite" 
                   'org-bibtex-open
                   'my-rtcite-export-handler)

The above is an adapted version of a proposal sent to the org-mode list by Nick Dokos in a response to Andreas Willig : http://lists.gnu.org/archive/html/emacs-orgmode/2012-02/msg00640.html

Posted in Uncategorized | Tagged , , , , , , | 6 Comments