desktoptojson (8) Linux Manual Page
desktoptojson – Converts a .desktop file to a .json file.
Synopsis
- desktoptojson –input
DESKTOP-FILE –output JSON-FILE - desktoptojson {–version | –help}
Description
The generated JSON data is a JSON object that maps the entries from the [Desktop Entry] group of the .desktop file. Any other groups are ignored. Most entries are just converted to JSON strings, but certain entries (such as Hidden and X-KDE-PluginInfo-EnabledByDefault) are known to be boolean values and converted as such, and similarly some (such as X-KDE-ServiceTypes and X-KDE-PluginInfo-Depends) are always converted to arrays of strings.
Options
–input DESKTOP-FILE
- The .desktop file to convert.
–output JSON-FILE
- The file to write the generated JSON data to.
–help
- Show a brief help text.
–version
- Show version information.
Usage
Most users of this utility will use the CMake macro kservice_desktop_to_json as part of the process of building a plugin.
-
add_library(myplugin MODULE ${myplugin_SRCS}) kservice_desktop_to_json(myplugin myplugin.desktop)
This will produce the JSON file myplugin.json, which can be referenced from the K_PLUGIN_FACTORY_WITH_JSON or Q_PLUGIN_METADATA macros.
Bugs
Please use m[blue]KDE’s bugtrackerm[][1] to report bugs.
Authors
Scarlett Clark <scarlett [at] scarlettgatelyclark.com>
- Wrote the original documentation.
Alex Merry <alexmerry [at] kde.org>
- Edited the documentation.
Notes
- 1.
- KDE’s bugtracker
