From e278e204d4739611f5b20253abe341225bdf7546 Mon Sep 17 00:00:00 2001 From: ftyers Date: Tue, 20 Nov 2007 10:03:42 +0000 Subject: [PATCH] Deleting old templates, updating other stuff git-svn-id: https://apertium.svn.sourceforge.net/svnroot/apertium@2512 72bbbca6-d526-0410-a7d9-f06f51895060 --- apertium-forms-server/README | 15 ++++ apertium-forms-server/pair.py | 5 -- apertium-forms-server/templates/index.html | 99 --------------------- apertium-forms-server/templates/index.pyhtml | 128 --------------------------- 4 files changed, 15 insertions(+), 232 deletions(-) delete mode 100644 apertium-forms-server/templates/index.html delete mode 100644 apertium-forms-server/templates/index.pyhtml diff --git a/apertium-forms-server/README b/apertium-forms-server/README index d0437545..b275266a 100644 --- a/apertium-forms-server/README +++ b/apertium-forms-server/README @@ -13,3 +13,18 @@ Wishlist: * The gloss should really be attached to each paradigm, not to the dictionary. + +Files: + +The server is broadly laid out along the lines of MVC, +although this is broken when and where I please. + +* interface.py: Holds the class to generate the HTML +* pair.py: Holds the various classes representing the + parts of the dictionary we need to use. +* apertium-forms-server.py: Runs the http servlet, and + controls POST / GET on the forms. + +There is an extra file, config.py, which loads the config +file (normally in config/config.xml) and sets up the +various structures in pair.py. diff --git a/apertium-forms-server/pair.py b/apertium-forms-server/pair.py index f08687c8..06536474 100644 --- a/apertium-forms-server/pair.py +++ b/apertium-forms-server/pair.py @@ -246,19 +246,14 @@ class Dictionary: #{ if section.getAttributeNS(None, 'id') == 'main': #{ print >> sys.stderr , 'Writing to file....'; insertion_point = section; - print >>sys.stderr , insertion_point; child_doc = NonvalidatingReader.parseString(_entrada.encode('utf-8'), 'urn:bogus:dummy'); - print >> sys.stderr, child_doc; child_node = child_doc.xpath('.//e')[0]; - print >> sys.stderr, child_node; insertion_point.appendChild(child_node); f = open(self.file, 'w'); Print(self.doc, stream=f); f.close(); print >> sys.stderr, 'Written.'; - -# return; #} #} diff --git a/apertium-forms-server/templates/index.html b/apertium-forms-server/templates/index.html deleted file mode 100644 index b01ebc80..00000000 --- a/apertium-forms-server/templates/index.html +++ /dev/null @@ -1,99 +0,0 @@ -$def with (pairs, tags, left_paradigms, right_paradigms, post_data) - - - - Apertium dictionary management - - - - -
-
-ca · en · es -
-
-
- Language pair: - Part-of-speech: -
- -
-
- - Lemma:? - - Paradigm:? - - -$for stem in left_paradigms[post_data['left_paradigm']].get_stems(): - $post_data['left_lemma'] stem[0]
- $stems[stem][1] - - -
- -
- ←→
- $else: - >←→
- - →→
- $else: - >→→
- - ←←
- $else: - >→→
- - - - - -
- - -
-
- - - diff --git a/apertium-forms-server/templates/index.pyhtml b/apertium-forms-server/templates/index.pyhtml deleted file mode 100644 index 413705fb..00000000 --- a/apertium-forms-server/templates/index.pyhtml +++ /dev/null @@ -1,128 +0,0 @@ - - - Apertium dictionary management - - - - - -
-home -
-ca · en · es -
-
-
- Language pair: - Part-of-speech: -
-
-
- Lemma:? - - Paradigm:? - - - - - ${left_s} - - - No stems - - -
- -
- - ←→
- - ←→
- - - - →→
- - →→
- - - - ←←
- - ←←
- - - - - - -
- - -
-
- - - -- 2.11.4.GIT