<commit_before># Kral #

<http://github.com/Tawlk/kral>

## About ##

kral (pronounced: "crawl") is a python library intended to be a flexible solution
for retreiving live streaming data from a variety of social network apis on given
keyword(s), and yeilding the retreived data in a unified format.

## Current Features ##

  * Ability to harvest user information, and posts from Twitter, Facebook, Buzz,
    Identica, Youtube, Flickr, Wordpress
  * Ability to expand all short-urls into full real URLs.
  * Ability to track number of mentions of a given URL across multiple networks.
  * Modular design. Easily add or disable plugins for different social networks.

## Usage / Installation ##

1. Install kral

    ```bash
    pip install -e git+https://github.com/Tawlk/kral/#egg=kral
    ```

2. Configure

    Include settings and set any credentials for services that require them

    ```python
    include kral.settings
    kral.settings['TWITTER_USER'] = 'your_user'
    kral.settings['TWITTER_USER'] = 'your_pass'
    kral.settings['BUZZ_API_KEY'] = 'your_key'
    kral.settings['FACEBOOK_API_KEY'] = 'your_key'
    kral.settings['FLICKR_API_KEY'] = 'your_key'
    ```

    Or, if you plan on using kral via the CLI, set up a kral.ini file as follows:

    ```ini
    [ DEFAULT ]
    TWITTER_USER = 'your_user'
    TWITTER_PASS = '<PASSWORD>'
    BUZZ_API_KEY = 'your_key'
    FACEBOOK_API_KEY = 'your_key'
    FLICKR_API_KEY = 'your_key'
    ```

3.  Collect data

    From here you can start using the kral.stream() generator to collect data
    within your appliction.

    Example that outputs the latest social data on "android" and "bitcoin" across
    all available networks.

    ```python
    import kral

    for item in kral.stream(['android','bitcoin']):
        print "%s | %s" % (item.service,item.text)
    ```

    Example that outputs the latest social data on "obama" using only twitter.

    ```python
    import kral

    for item in kral.stream('obama','twitter'):
        print "%s | %s" % (item.service,item.text)
    ```

    You can also collect data via the CLI interface.

    ```bash
    kral stream --services=twitter,facebook android
    ```

    For more information on the CLI interface run:

    ```bash
    kral --help
    ```

## Notes ##
<commit_msg>update README to reflect config file usage for CLI<commit_after># Kral #

<http://github.com/Tawlk/kral>

## About ##

kral (pronounced: "crawl") is a python library intended to be a flexible solution
for retreiving live streaming data from a variety of social network apis on given
keyword(s), and yeilding the retreived data in a unified format.

## Current Features ##

  * Ability to harvest user information, and posts from Twitter, Facebook, Buzz,
    Identica, Youtube, Flickr, Wordpress
  * Ability to expand all short-urls into full real URLs.
  * Ability to track number of mentions of a given URL across multiple networks.
  * Modular design. Easily add or disable plugins for different social networks.

## Usage / Installation ##

1. Install kral

    ```bash
    pip install -e git+https://github.com/Tawlk/kral/#egg=kral
    ```

2. Configure

    Include settings and set any credentials for services that require them

    ```python
    include kral.settings
    kral.settings['TWITTER_USER'] = 'your_user'
    kral.settings['TWITTER_USER'] = 'your_pass'
    kral.settings['BUZZ_API_KEY'] = 'your_key'
    kral.settings['FACEBOOK_API_KEY'] = 'your_key'
    kral.settings['FLICKR_API_KEY'] = 'your_key'
    ```

    Or, if you plan on using kral via the CLI, set up a kral.ini file as follows:

    ```ini
    [ DEFAULT ]
    TWITTER_USER = 'your_user'
    TWITTER_PASS = '<PASSWORD>'
    BUZZ_API_KEY = 'your_key'
    FACEBOOK_API_KEY = 'your_key'
    FLICKR_API_KEY = 'your_key'
    ```

3.  Collect data

    From here you can start using the kral.stream() generator to collect data
    within your appliction.

    Example that outputs the latest social data on "android" and "bitcoin" across
    all available networks.

    ```python
    import kral

    for item in kral.stream(['android','bitcoin']):
        print "%s | %s" % (item.service,item.text)
    ```

    Example that outputs the latest social data on "obama" using only twitter.

    ```python
    import kral

    for item in kral.stream('obama','twitter'):
        print "%s | %s" % (item.service,item.text)
    ```

    You can also collect data via the CLI interface.

    ```bash
    kral stream --config="kral.ini" --services="twitter,facebook" --queries="android"
    ```

    For more information on the CLI interface run:

    ```bash
    kral --help
    ```

## Notes ##

{'fraction_non_alphanumeric': 0.10448401630551384, 'fraction_numerical': 0.0012872774082814847, 'mean_word_length': 3.15878679750223, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6376903', 'n_tokens_mistral': 1507, 'n_tokens_neox': 1423, 'n_words': 507}