Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 558c09e

Browse files
committed
Script to write MIF files from ref*.{book,doc}
1 parent 58a7856 commit 558c09e

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

Doc/ref/makeMIFs.py

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

0 commit comments

Comments
 (0)