<commit_before>py-xbmc-remote-controller
=========================

XBMC remote controller written in Python

Just a fun small projet to explore JSON, TCP requests, and play with my favorite HTPC, XBMC.

## Useful links

+ [JSON-RPC API][1]
+ [JSON-RPC API/Examples][2]
+ [18.2. json — JSON encoder and decoder][3]

[1]: http://wiki.xbmc.org/?title=JSON-RPC_API
[2]: http://wiki.xbmc.org/index.php?title=JSON-RPC_API/Examples
[3]: http://docs.python.org/2/library/json.html<commit_msg>contributions and quick start<commit_after>py-xbmc-remote-controller
=========================

XBMC remote controller written in Python

Just a fun small project to explore JSON, TCP requests, and play with my favorite HTPC, XBMC.

Well, sometimes I feel bored to seek the TV remote or to launch [Yatse][4] on my phone when coding. With this Python script I can now control XBMC directly from a terminal. Life is good.

Note: a couple of methods are currently covered (see Contributions)

## Quick start

Clone this repo and from the folder, launch the script:

```
python pycontroller.py
```

Use the help command to have the list of available methods, and help + command to display a usage message.

## Contributions

Contributions are welcome and easy. Every methods of the API can be included, only a few are done today. The structure of the program makes this method by method implementation obvious.

In any doubt, I will be pleased to discuss with you.

## Useful links

+ XBMC wiki, ["JSON-RPC API"][1], some general explanations about the API
+ XBMC wiki, ["JSON-RPC API/Examples"][2], the full methods list and description
+ Python docs, ["18.2. json — JSON encoder and decoder"][3], using json in Python

[1]: http://wiki.xbmc.org/?title=JSON-RPC_API
[2]: http://wiki.xbmc.org/index.php?title=JSON-RPC_API/Examples
[3]: http://docs.python.org/2/library/json.html
[4]: http://yatse.leetzone.org/redmine
{'fraction_non_alphanumeric': 0.12961011591148577, 'fraction_numerical': 0.011591148577449948, 'mean_word_length': 4.536443148688047, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, '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': '30489', 'n_tokens_mistral': 592, 'n_tokens_neox': 567, 'n_words': 233}