blob: fcaa71b265561e5b2b13881c8e0c3384fcf1cf1d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#! /bin/env python
"""Script to write MIF files from ref.book and ref*.doc."""
import os
import glob
def main():
pipe = os.popen("fmbatch", 'w')
for i in ['ref.book'] + glob.glob('ref*.doc'):
cmd = "Open %s\nSaveAs m %s %s.MIF\n" % (i, i, os.path.splitext(i)[0])
print cmd
pipe.write(cmd)
pipe.write("Quit\n")
if __name__ == '__main__':
main()
|