Commit Graph

9 Commits

Author SHA1 Message Date
Phaedrus Leeds
600e18567c Add a vim modeline and .editorconfig
To make indentation work with less effort. The modeline was copied from
libostree with minor modification and the .editorconfig from GLib.

The advantage of having both a modeline and an editorconfig is we can
work out of the box on more editor setups, and the modeline allows us to
specify the style with a lot more fine grained control.
2022-08-22 19:48:10 -07:00
Alexander Larsson
7c3e6f7214 appdata: Fix leak of id string. 2019-12-19 16:52:58 +01:00
Philip Withnall
0e53094645 flatpak-appdata: Add support for extracting app content ratings
This will be used in upcoming commits to enforce parental controls on
app installations.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://github.com/flatpak/flatpak/pull/2797
2019-10-03 10:42:04 +02:00
Matthew Leeds
8d962a686f Run uncrustify
I had to make a few manual edits but other than those the changes look
reasonable.

Closes: #2715
Approved by: matthiasclasen
2019-02-25 18:12:30 +00:00
Matthias Clasen
228ee0bd0a appdata: Ignore allowed attributes
We only interested in a few of the attributes of some
tags, but we shouldn't fail if other valid attributes
are present.

Add some of the allowed attributes to the <release> element
in the appdata test and verify that we can still parse it.

The appstream spec is here:
https://www.freedesktop.org/software/appstream/docs/

Closes: #2674
Approved by: matthiasclasen
2019-02-02 00:52:32 +00:00
Alexander Larsson
f0c404d104 Add backported version of g_date_time_new_from_iso8601
Closes: #2642
Approved by: matthiasclasen
2019-01-28 16:36:38 +00:00
Matthias Clasen
69212da002 Parse date attributes in appdata
The spec allowed either timestamp or date to
be specified for a release, so we should support
both.

Closes: #2614

Closes: #2619
Approved by: alexlarsson
2019-01-21 08:46:57 +00:00
Matthias Clasen
5db64fe342 Add a minimal GMarkup-based appdata parser
This parser nderstands just enough appdata to pull
out the strings we want.

Closes: #2580
Approved by: alexlarsson
2019-01-14 15:06:41 +00:00
Matthias Clasen
728f917418 Move appdata parsing to its own file
This is just moving some code around for now.
It is still using libappstream-glib.

Closes: #2580
Approved by: alexlarsson
2019-01-14 15:06:41 +00:00