Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
NodeJS X11 Menu Entry Library
JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
examples
lib
test
.gitignore
.jshintrc
.travis.yml
Gruntfile.js Update build flow
LICENSE-MIT Initialize a new node Module using grunt-init
README.md fix npm package name in example
package.json Tag the 0.1.1 version.

README.md

X11 Desktop Entry

NodeJS X11 Desktop Entry is a NodeJS Library used to load and handle X11 Desktop Entries as defined by the FreeDesktop Desktop Entry Spec. 1.0.

Getting Started

Install the module using npm:

$ npm install node-x11-desktop-entry

Write a NodeJS script using the library and load a Desktop Entry file:

[Desktop Entry]
Version=1.0
Encoding=UTF-8
Type=MimeType
Comment=This is a comment

getting-started.js

var desktopEntry = require('node-x11-desktop-entry');
desktopEntry.load({
    entry:'./myfile.desktop',
    onSuccess:function(model){
        // model is a JSON representation of the Desktop Entry file
        // where sections are roots of JSON object
        // each root contains a list of {key:value} objects.
        console.log(model["Desktop Entry"].Version);
    },
    onError:function(errorMessage){
        // handle error here
    }
});

Finally invoke node on it:

$ node getting-started.js

License

Copyright (c) 2013 opatry
Licensed under the MIT license.

Something went wrong with that request. Please try again.