<commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2008 <NAME> <<EMAIL>>
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.

"""
CouchDB DbUpdateNotification Script that triggers replication

Daemon script that acts as CouchDB DbUpdateNotificationProcess and triggers
replication on each incoming database update between the specified servers

Setup
Add this to your couch.ini:
DbUpdateNotificationProcess=/path/to/this/script/replication-helper.py \
--source-server=http://127.0.0.1 --target-server=http://127.0.0.1:5985

Format of messages it reads
{"db":"replication_notification_test","type":"updated"}

Todo: 
 - Generic'-out the listener part and implement the resplication trigger as
a delegate or subclass.
 - Check if sub-second sleep delays are possible
"""<commit_msg>update docs for 0.9, closes 60<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2008 <NAME> <<EMAIL>>
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.

"""
CouchDB DbUpdateNotification Script that triggers replication

Daemon script that acts as CouchDB DbUpdateNotificationProcess and triggers
replication on each incoming database update between the specified servers

Setup
Add this to your local.ini, in the section [update_notification]:
DbUpdateNotificationProcess=/path/to/this/script/replication-helper.py \
--source-server=http://127.0.0.1 --target-server=http://127.0.0.1:5985

Format of messages it reads
{"db":"replication_notification_test","type":"updated"}

Todo: 
 - Generic'-out the listener part and implement the resplication trigger as
a delegate or subclass.
 - Check if sub-second sleep delays are possible
"""
{'fraction_non_alphanumeric': 0.09983452840595698, 'fraction_numerical': 0.0253723110865968, 'mean_word_length': 4.8705501618122975, 'pattern_counts': {'":': 4, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 4, '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': '4105127', 'n_tokens_mistral': 536, 'n_tokens_neox': 488, 'n_words': 189}