summaryrefslogtreecommitdiff
path: root/third_party/spiro/font/replace_class.py
diff options
context:
space:
mode:
authorRoozbeh Pournader <roozbeh@google.com>2014-07-26 11:20:29 -0700
committerRoozbeh Pournader <roozbeh@google.com>2014-07-26 11:20:29 -0700
commit0f1bd27678fb542f8601bbaf493baa1c22732fe2 (patch)
tree78ecb8f8082fb1b3ae24720549578b9272f36f0c /third_party/spiro/font/replace_class.py
parent5a480b939b43dec473550292501a88518fe1208c (diff)
Add Spiro version 0.01.
Diffstat (limited to 'third_party/spiro/font/replace_class.py')
-rw-r--r--third_party/spiro/font/replace_class.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/third_party/spiro/font/replace_class.py b/third_party/spiro/font/replace_class.py
new file mode 100644
index 0000000..9a1da51
--- /dev/null
+++ b/third_party/spiro/font/replace_class.py
@@ -0,0 +1,14 @@
+#!/usr/bin/env python
+
+import sys
+srfile = file(sys.argv[1])
+table = {}
+for line in srfile.xreadlines():
+ clas, repl = line.split()
+ if repl[-1] not in '-?':
+ table['class' + clas] = repl
+
+for line in sys.stdin.xreadlines():
+ fn, clas = line.split()
+ if table.has_key(clas):
+ print fn, table[clas]