view publish.py @ 26:5bbb68833868

Output text improvements Detailed error messages are now printed in more cases and have only their first letter forced into lowercase. The description of the --update option now describes properly what it does.
author Oleg Oshmyan <chortos@inbox.lv>
date Thu, 23 Sep 2010 23:50:45 +0000
parents a2c9f7cfa174
children
line wrap: on
line source

#! /usr/bin/python
# Copyright (c) 2009-2010 Chortos-2 <chortos@inbox.lv>

with open('test-svn.py') as t:
	f = t.read()
i = f.find('# $Rev: ')
j = f.find('\n', i)
rev = f[i+8:j-2]
f = f[0:i] + f[j+1:]
f = f.replace('$$REV$$', rev)
with open('test.py', 'wb') as t:
	t.write(f)