#!/usr/bin/env python

'''Paragraph marker
This piece of code reads <stdin> marks all paragraph boundaries with
__PARAGRAPH__ and all linebreaks with __LINEBREAK__ and writes to <stdout>.
Usage (example): cat text.txt | ./paramark.py > text.paramarked.txt
'''
__author__ = 'Oezguer Demir <oeze@gmx.de>'
__date__ = 'Thu Nov 28, 2002 11:33 PM'
__version__ = '1.4'
__project__ = 'terminparser' 

from sys import stdin, stdout
from re import sub

text = stdin.read()
text = sub('\n', '\n <LINEBREAK/> ', text)
stdout.write(text)

  