[AppStream] [GSOC] AppStream feature to deal with package recommendations
Lucas Moura
lucas.moura128 at gmail.com
Tue May 24 13:49:39 UTC 2016
Hello,
My name is Lucas Moura and I am Google Summer of Code Student working for
the Debian project. My summer project is related to AppRecommender, a
Debian package recommender system:
https://github.com/TCC-AppRecommender/AppRecommender
This application works by creating an user profile based on the user
installed packages, this profile is basically the most significant terms on
all user packages. With this profile built, AppRecommender uses Xapian to
query for Debian packages and display the closest ones with the query.
Currently, this application can only be used via terminal access. However,
my gsoc project is to change that, and allow AppRecommender to be
integrated into graphical package managers:
https://wiki.debian.org/SummerOfCode2016/StudentApplications/LucasMoura
I have already discussed this approach in two different lists, one in
PackageKit:
https://lists.freedesktop.org/archives/packagekit/2016-April/026411.html
And on the distributions list:
https://lists.freedesktop.org/archives/distributions/2016-May/000723.html
But summing it all up, the idea would be to add a feature for AppStream
that would allow it manage package recommendations. AppStream would be able
to read the recommendations file, generated by a package recommender
application, and make it available for other packages that make use of
AppStream data.
I have thought about how to implement this feature and the XML that would
define a package recommendation. The idea is that the XML file would like
this:
<?xml version="1.0" encoding="UTF-8"?>
<recommendation>
<id>winpdb.desktop </id>
<because>
<id>ipython.desktop</id>
<id>pida.desktop</id>
</because>
</recommendation>
The "id" would represent the package being recommended and "because" tags
would be used to
show which user packages were responsible for generating the given
recommendation. But this is a optional field.
With that in mind, I have thought about implementing the feature similar to
appstreamcli refresh-index function. The function would do the following
steps:
* Verify if a recommendation file exists (thought about placing it on
/usr/share/app-info/recommendation/)
* Verify if the file is a valid XML file
* Parse the XML files
* Create the recommendation cache with the recommendation components
However, I still don't know if the best approach for dealing with the
recommendation is to have a separate xapian database for them or if just
holding a variable containing the recommendations in memory would be enough.
But does this approach fits AppStream, making a function on appstreamcli to
deal with recommendations files ? And if it does, should I create a
separate file just to handle recommendations, or can add the new functions
on the existing modules ? For example, to parse the recommendation XML, is
it ok to add the function to the as-metadata.c file ?
Best regards,
Lucas Moura
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/appstream/attachments/20160524/a89adcc7/attachment.html>
More information about the AppStream
mailing list