abhi11 / tanglu-dak

GNU General Public License v2.0
0 stars 2 forks source link

Desktop-file parser is still broken #26

Closed ximion closed 10 years ago

ximion commented 10 years ago

The broken parser produces funny applications like "Open in Fullscreen" instead of "Stellarium", because it does not respect opened sections in the ini-style format. For example, take a look at the "stellarium" package, which ships stellarium.desktop: https://packages.debian.org/sid/stellarium The current output of the generator is:


---
Categories:
  - Astronomy
  - Education
  - Science
ID: stellarium.desktop
Icon:
  cached: stellarium_stellarium.png
Keywords:
  C:
    - astronomy
    - planetarium
Name:
  C: Open in fullscreen
  ru: Открыть в полноэкранном режиме
Packages:
  - stellarium
Summary:
  C: Planetarium
  es: Planetario
  fr: Planétarium
  ru: Планетарий
Type: desktop-app
abhi11 commented 10 years ago

So in these cases, should we generalise that we only read the [Desktop Entry] block ?

ximion commented 10 years ago

Yes, the other blogs are not important for the metadata (yet - maybe we can do something with that extra information, but that's not in the spec and nothing is planned so far).

abhi11 commented 10 years ago

I have made the changes and pushed the commit.

ximion commented 10 years ago

Thank you, but the implementation of the whole parser is still not good... Something based on ConfigFile would be much better (I'll probably change the whole thing soon).