mlhim-specs-dev team mailing list archive
-
mlhim-specs-dev team
-
Mailing list archive
-
Message #00654
[Branch ~cdd-dev/cdd/trunk] Rev 216: cleaned up document organizations.
------------------------------------------------------------
revno: 216
committer: Timothy W. Cook <timothywayne.cook@xxxxxxxxx>
branch nick: cdd
timestamp: Sat 2012-08-04 08:06:19 -0300
message:
cleaned up document organizations.
removed:
CDD_design_and_use.odt
cdd-manual.odt
cdd-manual.pdf
xmind2xsd.py
added:
docs/
docs/CDD_design_and_use.odt
docs/cdd-manual.odt
docs/cdd-manual.pdf
modified:
README.txt
--
lp:cdd
https://code.launchpad.net/~cdd-dev/cdd/trunk
Your team MLHIM Specifications Developers is subscribed to branch lp:cdd.
To unsubscribe from this branch go to https://code.launchpad.net/~cdd-dev/cdd/trunk/+edit-subscription
=== removed file 'CDD_design_and_use.odt'
Binary files CDD_design_and_use.odt 2012-08-02 12:47:15 +0000 and CDD_design_and_use.odt 1970-01-01 00:00:00 +0000 differ
=== modified file 'README.txt'
--- README.txt 2012-08-02 12:47:15 +0000
+++ README.txt 2012-08-04 11:06:19 +0000
@@ -5,6 +5,7 @@
There is also a cross platform version as well as a Windows version on http://www.hkcr.net
-The CDD manual is under a rewrite at this time. However, an earlier version can be seen here. http://www.hkcr.net/tools
+The CDD manual is under a rewrite at this time. However, an earlier version as well as a document describing how to use the CDD to create a basic CCDare available in the docs subdirectory.
+
=== removed file 'cdd-manual.odt'
Binary files cdd-manual.odt 2012-08-02 12:47:15 +0000 and cdd-manual.odt 1970-01-01 00:00:00 +0000 differ
=== removed file 'cdd-manual.pdf'
Binary files cdd-manual.pdf 2012-08-02 12:47:15 +0000 and cdd-manual.pdf 1970-01-01 00:00:00 +0000 differ
=== added directory 'docs'
=== added file 'docs/CDD_design_and_use.odt'
Binary files docs/CDD_design_and_use.odt 1970-01-01 00:00:00 +0000 and docs/CDD_design_and_use.odt 2012-08-04 11:06:19 +0000 differ
=== added file 'docs/cdd-manual.odt'
Binary files docs/cdd-manual.odt 1970-01-01 00:00:00 +0000 and docs/cdd-manual.odt 2012-08-04 11:06:19 +0000 differ
=== added file 'docs/cdd-manual.pdf'
Binary files docs/cdd-manual.pdf 1970-01-01 00:00:00 +0000 and docs/cdd-manual.pdf 2012-08-04 11:06:19 +0000 differ
=== removed file 'xmind2xsd.py'
--- xmind2xsd.py 2012-03-26 22:23:19 +0000
+++ xmind2xsd.py 1970-01-01 00:00:00 +0000
@@ -1,133 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# 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/>.
-
-
-# Eesse código aqui é só o primeiro rascunho de um conversor
-# de xmind para xsd. Não tem quase comentários e os arquivos
-# xsd gerados, apesar de válidos, são bem simples.
-# E tem um funcionamento específico também, convertendo
-# uma construção do xmind característica
-
-import sys
-
-print "xmind2xsd 0.1alpha"
-print
-
-try:
- import mekk.xmind as xmind
-except ImportError:
- print "Por favor, instale o pacote <mekk.xmind> e tente novamente."
- sys.exit(1)
-
-try:
- import lxml.etree as etree
- from lxml.builder import ElementMaker
-except ImportError:
- print "Por favor, instale o pacote <lxml> e tente novamente."
- sys.exit(1)
-
-
-
-def checkparams():
- if len(sys.argv) < 2:
- print "Uso: xmind2xsd.py <arquivo xmind>"
- sys.exit(1)
-
-
-
-checkparams()
-
-emaker = ElementMaker(namespace='http://www.w3.org/2001/XMLSchema',
- nsmap = {'xsd' : 'http://www.w3.org/2001/XMLSchema'})
-
-try:
- xmind_doc = xmind.XMindDocument.open(sys.argv[1])
-except:
- print "Erro ao tentar abrir %s" % sys.argv[1]
- sys.exit(0)
-
-# Não gera xsd válido :s
-def get_hierarchy(topic, xsd):
- myxsd = xsd
-
- for fazer in (False, True): # attached and detached
- for t in topic.get_subtopics(detached=fazer):
- if t:
- if [i for i in t.get_subtopics()]: #Ugly, but works
- tipo = 'complexType'
- else:
- tipo = 'simpleType'
-
- myxsd.append(emaker(tipo, {'name' : t.get_title().replace(' ','_')}))
- myxsd = myxsd.getchildren()[len(myxsd)-1]
-
- get_hierarchy(t, myxsd)
-
- myxsd = myxsd.getparent()
-
-xsd_doc = emaker('schema')
-
-
-def get_attributes(topic, xsd):
- mydict = {}
- for t in topic.get_subtopics():
- tmp = [i for i in t.get_subtopics()]
- if tmp:
-
- mydict[t.get_title()] = tmp[0].get_title()
-
- return mydict
-
-def get_subtopics(topic, xsd):
- attributes = {}
- myxsd = xsd
- myxsd.append(emaker('sequence'))
- myxsd = myxsd.getchildren()[len(myxsd)-1]
- for t in topic.get_subtopics():
- attributes['name'] = t.get_title()
- attributes.update(get_attributes(t, myxsd))
- myxsd.append(emaker('element', attributes))
-
- myxsd = myxsd.getparent()
-
-def get_topics(topic, xsd):
- myxsd = xsd
-
- for t in topic.get_subtopics(detached=True):
- myxsd.append(emaker('complexType', {'name' : t.get_title().replace(' ','_')}))
- myxsd = myxsd.getchildren()[len(myxsd)-1]
- get_subtopics(t, myxsd)
- myxsd = myxsd.getparent()
-
-
-print "Processando %s" % sys.argv[1]
-print
-
-for sheet in xmind_doc.get_all_sheets():
- "Percorre cada sheet do arquivo .xmind"
-
-
- topic = sheet.get_root_topic()
-
- namefile_xsd = topic.get_title().replace(' ', '_') + '.xsd'
-
- get_topics(topic, xsd_doc)
-
- print "Gerando arquivo %s ..." % namefile_xsd
- saida = etree.ElementTree(xsd_doc)
- saida.write(namefile_xsd, pretty_print=True, xml_declaration=True)
-
-print
-print "Processamento concluído"