[dots] Added document and translator claseses



commit 117696116c60da749998ec53fd63d67c5b925a07
Author: Fernando Herrera <fherrera onirica com>
Date:   Sat May 15 17:32:02 2010 +0000

    Added document and translator claseses

 dots/document.py   |   33 +++++++++++++++++++++++++++++++++
 dots/translator.py |   24 ++++++++++++++++++++++++
 2 files changed, 57 insertions(+), 0 deletions(-)
---
diff --git a/dots/document.py b/dots/document.py
new file mode 100644
index 0000000..345b793
--- /dev/null
+++ b/dots/document.py
@@ -0,0 +1,33 @@
+# Dots - A braille translation program.
+#
+# Copyright (C) 2010 Consorcio Fernando de los Rios
+#		Author: Fernando Herrera <fherrera onirica com>
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+import translator
+
+class Document():
+    def __init__(self, input_file):
+        self.input_file = input_file
+	self.output_file = None
+
+    def set_output_file (self, output_file):
+	self.output_file = output_file
+
+    def translate(self, config):
+	translator = new Translator(config)
+	translator.translate (self.input_file, self.output_file)
+
+	
diff --git a/dots/translator.py b/dots/translator.py
new file mode 100644
index 0000000..9ddcb0d
--- /dev/null
+++ b/dots/translator.py
@@ -0,0 +1,24 @@
+# Dots - A braille translation program.
+#
+# Copyright (C) 2010 Consorcio Fernando de los Rios
+#		Author: Fernando Herrera <fherrera onirica com>
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+class Translator():
+    def __init__(self, config):
+        self.config = config
+
+    def translate(self, input_file, output_file):
+



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]