<commit_before>reddit-rss-submit
=============

## node.js (required)

	#mac
	brew install node

Other OS (windows, linux) should install from source found at http://nodejs.org

## install

    git clone <EMAIL>:chovy/reddit-rss-submit.git
    cd reddit-rss-submit
    
    #create cache
    mkdir tmp
    echo '{}' > tmp/seen.json
    
    npm install

    # add a cronjob to periodically check
    crontab -e

    # add this line (runs every 5 minutes)
    */5 * * * * /usr/local/bin/node ~/path/to/reddit-rss-submit/index.js -u user -p pass

## configure

Only json is supported, best thing to convert RSS to JSON is to setup a Yahoo pipes over at http://pipes.yahoo.com
You can can then grab the URL of your pipe's output as JSON.

	cp config.sample.json config.json
	
Edit `config.json` to point to the URL of your feed (see yahoo pipes to convert to JSON)

## options

- user: reddit uername
- pass: <PASSWORD>it password
- v: verbosity (`-vvv` to increase)
- t: throttle (number of minutes between link submissions, defaults to 10)

LICENSE: MIT
<commit_msg>add flock example to readme<commit_after>reddit-rss-submit
=============

## node.js (required)

	#mac
	brew install node

Other OS (windows, linux) should install from source found at http://nodejs.org

## install

    git clone <EMAIL>:chovy/reddit-rss-submit.git
    cd reddit-rss-submit
    
    #create cache
    mkdir tmp
    echo '{}' > tmp/seen.json
    
    npm install

    # add a cronjob to periodically check
    crontab -e

    # add this line (runs every hour on hh:05)
    5 * * * * /usr/local/bin/node ~/path/to/reddit-rss-submit/index.js -u user -p pass
    
    # use flock to skip runs where script is already running (recommended - allows to run every 5 mins)
    */5 * * * * flock -n /tmp/reddit.lock -c "/path/to/reddit-rss-submit/index.js -u user -p pass"

## configure

Only json is supported, best thing to convert RSS to JSON is to setup a Yahoo pipes over at http://pipes.yahoo.com
You can can then grab the URL of your pipe's output as JSON.

	cp config.sample.json config.json
	
Edit `config.json` to point to the URL of your feed (see yahoo pipes to convert to JSON)

## options

- user: reddit uername
- pass: <PASSWORD>
- v: verbosity (`-vvv` to increase)
- t: throttle (number of minutes between link submissions, defaults to 10)

LICENSE: MIT

{'fraction_non_alphanumeric': 0.107981220657277, 'fraction_numerical': 0.004694835680751174, 'mean_word_length': 2.9863945578231292, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, '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': '5462206', 'n_tokens_mistral': 785, 'n_tokens_neox': 738, 'n_words': 297}