<commit_before># 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](http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-1.0.html).

## Getting Started
Install the module using [npm](https://npmjs.org/):
```bash
$ 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](examples/getting-started.js)
```javascript
var desktopEntry = require('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:

```bash
$ node getting-started.js
```

## License
Copyright (c) 2013 opatry  
Licensed under the MIT license.<commit_msg>fix npm package name in example<commit_after># 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](http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-1.0.html).

## Getting Started
Install the module using [npm](https://npmjs.org/):
```bash
$ 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](examples/getting-started.js)
```javascript
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:

```bash
$ node getting-started.js
```

## License
Copyright (c) 2013 opatry  
Licensed under the MIT license.
{'fraction_non_alphanumeric': 0.12484076433121019, 'fraction_numerical': 0.016985138004246284, 'mean_word_length': 4.556603773584905, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4949005', 'n_tokens_mistral': 814, 'n_tokens_neox': 709, 'n_words': 242}