diff options
author | Marti Bolivar <mbolivar@leaflabs.com> | 2011-01-11 18:16:05 -0500 |
---|---|---|
committer | Marti Bolivar <mbolivar@leaflabs.com> | 2011-01-13 00:10:06 -0500 |
commit | 63c03fe6d1aeada3d6c581bacd6c1229b00374b4 (patch) | |
tree | 602a767ab241d62e392c9c8e3094d9a939ac58fb | |
parent | 451f72f34e12b860937b5f40f4118855ef45308f (diff) | |
download | librambutan-63c03fe6d1aeada3d6c581bacd6c1229b00374b4.tar.gz librambutan-63c03fe6d1aeada3d6c581bacd6c1229b00374b4.zip |
updating copy-to-ide script for more convenient IDE compilation
-rw-r--r-- | flibbit.py | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/flibbit.py b/flibbit.py deleted file mode 100644 index 5f149d4..0000000 --- a/flibbit.py +++ /dev/null @@ -1,26 +0,0 @@ -import os -import shutil -import re -from os.path import * - -src = '/Users/mbolivar/foo/arduino.cc/en/Reference' -dst = '/Users/mbolivar/hack/leaf/libmaple/docs/source/arduino' - -fs = [x for x in os.listdir(src) if x.endswith('.rst')] - -def process(line): - if re.match('-+$', line.rstrip()): - return '=' * (len(line) - 1) + '\n' - elif re.match('\^+$', line.rstrip()): - return '-' * (len(line) - 1) + '\n' - return line - -for f in fs: - print 'processing:', f - with open(join(src,f), 'r') as f_in: - with open(join(dst, basename(f)), 'w') as f_out: - label = '.. _arduino-%s:\n\n' % (f.split('.')[0]) - f_out.write(label) - for line in list(f_in.readlines())[20:-22]: - f_out.write(process(line)) - |