lino 25.3.0__py3-none-any.whl → 25.3.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. lino/__init__.py +1 -1
  2. lino/api/doctest.py +34 -36
  3. lino/core/inject.py +7 -6
  4. lino/core/kernel.py +0 -46
  5. lino/core/model.py +17 -15
  6. lino/core/plugin.py +4 -4
  7. lino/core/site.py +84 -30
  8. lino/management/commands/prep.py +1 -1
  9. lino/modlib/help/management/commands/makehelp.py +5 -2
  10. lino/modlib/jinja/mixins.py +2 -2
  11. lino/modlib/linod/mixins.py +3 -0
  12. lino/modlib/printing/mixins.py +3 -0
  13. lino/modlib/uploads/models.py +7 -6
  14. {lino-25.3.0.dist-info → lino-25.3.1.dist-info}/METADATA +1 -1
  15. {lino-25.3.0.dist-info → lino-25.3.1.dist-info}/RECORD +18 -39
  16. lino/sandbox/bcss/PerformInvestigation.py +0 -2260
  17. lino/sandbox/bcss/SSDNReply.py +0 -3924
  18. lino/sandbox/bcss/SSDNRequest.py +0 -3723
  19. lino/sandbox/bcss/__init__.py +0 -0
  20. lino/sandbox/bcss/readme.txt +0 -1
  21. lino/sandbox/bcss/test.py +0 -92
  22. lino/sandbox/bcss/test2.py +0 -128
  23. lino/sandbox/bcss/test3.py +0 -161
  24. lino/sandbox/bcss/test4.py +0 -167
  25. lino/sandbox/contacts/__init__.py +0 -0
  26. lino/sandbox/contacts/fixtures/__init__.py +0 -0
  27. lino/sandbox/contacts/fixtures/demo.py +0 -365
  28. lino/sandbox/contacts/manage.py +0 -10
  29. lino/sandbox/contacts/models.py +0 -395
  30. lino/sandbox/contacts/settings.py +0 -67
  31. lino/sandbox/tx25/XSD/RetrieveTIGroupsV3.wsdl +0 -65
  32. lino/sandbox/tx25/XSD/RetrieveTIGroupsV3.xsd +0 -286
  33. lino/sandbox/tx25/XSD/rn25_Release201104.xsd +0 -2855
  34. lino/sandbox/tx25/xsd2py1.py +0 -68
  35. lino/sandbox/tx25/xsd2py2.py +0 -62
  36. lino/sandbox/tx25/xsd2py3.py +0 -56
  37. {lino-25.3.0.dist-info → lino-25.3.1.dist-info}/WHEEL +0 -0
  38. {lino-25.3.0.dist-info → lino-25.3.1.dist-info}/licenses/AUTHORS.rst +0 -0
  39. {lino-25.3.0.dist-info → lino-25.3.1.dist-info}/licenses/COPYING +0 -0
@@ -1,68 +0,0 @@
1
- import os
2
- from xml.dom import minidom
3
-
4
-
5
- def elements(node):
6
- e = node.firstChild
7
- while e is not None:
8
- if e.nodeType == minidom.Node.ELEMENT_NODE:
9
- yield e
10
- e = e.nextSibling
11
-
12
-
13
- def xsd2xg(fn, nsname):
14
- dom = minidom.parse(fn)
15
- yield "from lino.utils import xmlgen as xg"
16
- yield "class %s(xg.Namespace):" % nsname
17
- yield " url = %r" % str(
18
- dom.documentElement.attributes.get("targetNamespace").value
19
- )
20
- # ~ e = dom.documentElement.firstChild
21
- # ~ while e is not None:
22
- indent = " "
23
- for e in elements(dom.documentElement):
24
- if e.tagName == "xsd:complexType":
25
- na = e.attributes.get("name", None)
26
- if na is None:
27
- yield indent + "# skipped nameless %s" % e.tagName
28
- continue
29
- yield indent + "# %s" % e.tagName
30
- yield indent + "class %s(xg.Container):" % na.value
31
- for ee in elements(e):
32
- # ~ seq = e.getElementsByTagName('xsd:sequence')[0]
33
- if ee.tagName == "xsd:sequence":
34
- # ~ seq = e.attributes.get('sequence',None)
35
- # ~ if seq:
36
- for item in elements(ee):
37
- na = item.attributes.get("name", None)
38
- if na is None:
39
- continue
40
- ta = item.attributes.get("type", None)
41
- if ta is None:
42
- yield indent * 2 + "class %s(): pass" % na.value
43
- else:
44
- if ":" in ta.value:
45
- typename = ta.value.replace(":", ".")
46
- else:
47
- typename = nsname + "." + ta.value
48
- yield indent * 2 + "class %s(%s): pass" % (
49
- na.value,
50
- typename,
51
- )
52
- elif e.tagName == "xsd:simpleType":
53
- na = e.attributes.get("name", None)
54
- if na is None:
55
- yield indent + "# skipped nameless %s" % e.tagName
56
- continue
57
- yield indent + "# %s" % e.tagName
58
- yield indent + "class %s(xg.Container):" % na.value
59
- else:
60
- yield indent + "# unhandled element %s" % e.tagName
61
- # ~ e = e.nextSibling
62
-
63
-
64
- fn = os.path.join("XSD", "RetrieveTIGroupsV3.xsd")
65
- # ~ for i,ln in enumerate(text_lines(dom)):
66
- for ln in xsd2xg(fn, "tx25"):
67
- # ~ print "%d:%s" % (i,ln)
68
- print(ln)
@@ -1,62 +0,0 @@
1
- import os
2
-
3
- # ~ from xml.dom import minidom
4
- from lxml import etree
5
-
6
- XHTML_NAMESPACE = "http://www.w3.org/1999/xhtml"
7
- XHTML = "{%s}" % XHTML_NAMESPACE
8
-
9
- XSD_NAMESPACE = "http://www.w3.org/2001/XMLSchema"
10
- XSD = "{%s}" % XSD_NAMESPACE
11
-
12
- # ~ NSMAP = {None : XHTML_NAMESPACE} # the default namespace (no prefix)
13
- NSMAP = dict(xsd=XSD_NAMESPACE)
14
-
15
-
16
- def xsd2xg(fn, nsname):
17
- tree = etree.parse(fn)
18
- root = tree.getroot()
19
- yield "from lino.utils import xmlgen as xg"
20
- yield "class %s(xg.Namespace):" % nsname
21
- yield " url = %r" % str(root.get("targetNamespace"))
22
- indent = " "
23
- for e in root:
24
- if e.tag == XSD + "complexType":
25
- na = e.get("name", None)
26
- if na is None:
27
- yield indent + "# skipped nameless %s" % e.tag
28
- continue
29
- yield indent + "# %s" % e.tag
30
- yield indent + "class %s(xg.Container):" % na
31
- for ee in e:
32
- # ~ seq = e.getElementsByTagName('xsd:sequence')[0]
33
- if ee.tag == XSD + "sequence":
34
- # ~ seq = e.attributes.get('sequence',None)
35
- # ~ if seq:
36
- for item in ee:
37
- na = item.get("name", None)
38
- if na is None:
39
- continue
40
- ta = item.get("type", None)
41
- if ta is None:
42
- yield indent * 2 + "class %s(): pass" % na
43
- else:
44
- if ":" in ta:
45
- typename = ta.replace(":", ".")
46
- else:
47
- typename = nsname + "." + ta
48
- yield indent * 2 + "class %s(%s): pass" % (na, typename)
49
- elif e.tag == XSD + "simpleType":
50
- na = e.get("name", None)
51
- if na is None:
52
- yield indent + "# skipped nameless %s" % e.tag
53
- continue
54
- yield indent + "# %s" % e.tag
55
- yield indent + "class %s(xg.Container):" % na
56
- else:
57
- yield indent + "# unhandled element %s" % e.tag
58
-
59
-
60
- fn = os.path.join("XSD", "RetrieveTIGroupsV3.xsd")
61
- for ln in xsd2xg(fn, "tx25"):
62
- print(ln)
@@ -1,56 +0,0 @@
1
- import os
2
-
3
- # ~ from xml.dom import minidom
4
- from lxml import etree
5
-
6
- XSD_NAMESPACE = "http://www.w3.org/2001/XMLSchema"
7
- XSD = "{%s}" % XSD_NAMESPACE
8
-
9
- NSMAP = dict(xsd=XSD_NAMESPACE)
10
-
11
-
12
- def xsd2py(fn, nsname):
13
- tree = etree.parse(fn)
14
- root = tree.getroot()
15
- yield "from lino.utils.bcss import Namespace"
16
- yield "%s = Namespace(%r,%r):" % (nsname, nsname, str(root.get("targetNamespace")))
17
- for e in root:
18
- if e.tag == XSD + "complexType":
19
- na = e.get("name", None)
20
- if na is None:
21
- yield indent + "# skipped nameless %s" % e.tag
22
- continue
23
- yield indent + "class %s(xg.Container):" % na
24
- for ee in e:
25
- # ~ seq = e.getElementsByTagName('xsd:sequence')[0]
26
- if ee.tag == XSD + "sequence":
27
- # ~ seq = e.attributes.get('sequence',None)
28
- # ~ if seq:
29
- for item in ee:
30
- na = item.get("name", None)
31
- if na is None:
32
- continue
33
- ta = item.get("type", None)
34
- if ta is None:
35
- yield indent * 2 + "class %s(): pass" % na
36
- else:
37
- if ":" in ta:
38
- typename = ta.replace(":", ".")
39
- else:
40
- typename = nsname + "." + ta
41
- yield indent * 2 + "class %s(%s): pass" % (na, typename)
42
- elif e.tag == XSD + "simpleType":
43
- na = e.get("name", None)
44
- if na is None:
45
- yield indent + "# skipped nameless %s" % e.tag
46
- continue
47
- yield indent + "# %s" % e.tag
48
- yield indent + "class %s(xg.Container):" % na
49
- else:
50
- yield indent + "# unhandled element %s" % e.tag
51
-
52
-
53
- def main():
54
- fn = os.path.join("XSD", "RetrieveTIGroupsV3.xsd")
55
- for ln in xsd2py(fn, "tx25"):
56
- print(ln)
File without changes