OSDN Git Service

implement *g[], chane column format
[otptools/otptools.git] / markup.py
deleted file mode 120000 (symlink)
index 420615c47070ad048dc7febdf0ca62d6844c9e25..0000000000000000000000000000000000000000
--- a/markup.py
+++ /dev/null
@@ -1 +0,0 @@
-markup_old.py
\ No newline at end of file
new file mode 100755 (executable)
index 0000000000000000000000000000000000000000..d981b163732a530cf0cd1e2d1e20b4f81b47bc2e
--- /dev/null
+++ b/markup.py
@@ -0,0 +1,29 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+import sys
+import os
+import codecs
+
+rootpath = r"C:\Users\hirom\bin\otptools"
+sys.path.insert(0, rootpath)
+
+import markupper
+
+
+str_usage = "markup.pl hashfile targetfile\n"
+
+sys.stdin = codecs.getreader('utf_8')(sys.stdin)
+sys.stdout = codecs.getwriter('utf_8')(sys.stdout)
+
+try:
+#    path_img_hash = sys.argv[1]
+    path_target = sys.argv[1]
+except IndexError:
+    sys.exit(str_usage)
+
+markupper = markupper.Markupper()
+
+file_target = codecs.open(path_target, "r", "utf_8" )
+
+markupper.markup(file_target)