xhtm 0.2.0__tar.gz → 0.2.1__tar.gz

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 (36) hide show
  1. {xhtm-0.2.0 → xhtm-0.2.1}/PKG-INFO +1 -1
  2. {xhtm-0.2.0 → xhtm-0.2.1}/xhtm.egg-info/PKG-INFO +1 -1
  3. xhtm-0.2.1/xhtml/__init__.py +11 -0
  4. {xhtm-0.2.0 → xhtm-0.2.1}/xhtml/attribute.py +1 -1
  5. xhtm-0.2.1/xhtml/element/__init__.py +20 -0
  6. {xhtm-0.2.0 → xhtm-0.2.1}/xhtml/element/css.py +3 -3
  7. {xhtm-0.2.0 → xhtm-0.2.1}/xhtml/element/doc.py +1 -1
  8. {xhtm-0.2.0 → xhtm-0.2.1}/xhtml/element/tag.py +6 -6
  9. xhtm-0.2.1/xhtml/flask/__init__.py +3 -0
  10. xhtm-0.2.1/xhtml/header/__init__.py +4 -0
  11. xhtm-0.2.1/xhtml/request/__init__.py +3 -0
  12. xhtm-0.2.1/xhtml/template/__init__.py +32 -0
  13. xhtm-0.2.0/xhtml/__init__.py +0 -10
  14. xhtm-0.2.0/xhtml/element/__init__.py +0 -20
  15. xhtm-0.2.0/xhtml/flask/__init__.py +0 -3
  16. xhtm-0.2.0/xhtml/header/__init__.py +0 -4
  17. xhtm-0.2.0/xhtml/request/__init__.py +0 -3
  18. xhtm-0.2.0/xhtml/template/__init__.py +0 -17
  19. {xhtm-0.2.0 → xhtm-0.2.1}/LICENSE +0 -0
  20. {xhtm-0.2.0 → xhtm-0.2.1}/README.md +0 -0
  21. {xhtm-0.2.0 → xhtm-0.2.1}/setup.cfg +0 -0
  22. {xhtm-0.2.0 → xhtm-0.2.1}/setup.py +0 -0
  23. {xhtm-0.2.0 → xhtm-0.2.1}/xhtm.egg-info/SOURCES.txt +0 -0
  24. {xhtm-0.2.0 → xhtm-0.2.1}/xhtm.egg-info/dependency_links.txt +0 -0
  25. {xhtm-0.2.0 → xhtm-0.2.1}/xhtm.egg-info/requires.txt +0 -0
  26. {xhtm-0.2.0 → xhtm-0.2.1}/xhtm.egg-info/top_level.txt +0 -0
  27. {xhtm-0.2.0 → xhtm-0.2.1}/xhtm.egg-info/zip-safe +0 -0
  28. {xhtm-0.2.0 → xhtm-0.2.1}/xhtml/element/attr.py +0 -0
  29. {xhtm-0.2.0 → xhtm-0.2.1}/xhtml/flask/proxy.py +0 -0
  30. {xhtm-0.2.0 → xhtm-0.2.1}/xhtml/header/accept.py +0 -0
  31. {xhtm-0.2.0 → xhtm-0.2.1}/xhtml/header/content.py +0 -0
  32. {xhtm-0.2.0 → xhtm-0.2.1}/xhtml/request/stream.py +0 -0
  33. {xhtm-0.2.0 → xhtm-0.2.1}/xhtml/resource/__init__.py +0 -0
  34. {xhtm-0.2.0 → xhtm-0.2.1}/xhtml/resource/favicon.ico +0 -0
  35. {xhtm-0.2.0 → xhtm-0.2.1}/xhtml/resource/logo.svg +0 -0
  36. {xhtm-0.2.0 → xhtm-0.2.1}/xhtml/template/hello.html +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: xhtm
3
- Version: 0.2.0
3
+ Version: 0.2.1
4
4
  Summary: Rendering HTML Text
5
5
  Home-page: https://github.com/bondbox/xhtm
6
6
  Author: Mingzhe Zou
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: xhtm
3
- Version: 0.2.0
3
+ Version: 0.2.1
4
4
  Summary: Rendering HTML Text
5
5
  Home-page: https://github.com/bondbox/xhtm
6
6
  Author: Mingzhe Zou
@@ -0,0 +1,11 @@
1
+ # coding:utf-8
2
+
3
+ from xhtml.element import * # noqa:F401,F403
4
+ from xhtml.flask import FlaskProxy # noqa:F401
5
+ from xhtml.header import AcceptLanguage # noqa:F401
6
+ from xhtml.header import LanguageQ # noqa:F401
7
+ from xhtml.request import StreamResponse # noqa:F401
8
+ from xhtml.resource import FileResource # noqa:F401
9
+ from xhtml.resource import Resource # noqa:F401
10
+ from xhtml.template import LocaleTemplate # noqa:F401
11
+ from xhtml.template import Template # noqa:F401
@@ -3,7 +3,7 @@
3
3
  from urllib.parse import urljoin
4
4
 
5
5
  __project__ = "xhtm"
6
- __version__ = "0.2.0"
6
+ __version__ = "0.2.1"
7
7
  __description__ = "Rendering HTML Text"
8
8
  __urlhome__ = "https://github.com/bondbox/xhtm"
9
9
  __urlcode__ = __urlhome__
@@ -0,0 +1,20 @@
1
+ # coding:utf-8
2
+
3
+ from xhtml.element.attr import Attr # noqa:F401
4
+ from xhtml.element.css import StyleCSS # noqa:F401
5
+ from xhtml.element.doc import HtmlDoc # noqa:F401
6
+ from xhtml.element.tag import Body # noqa:F401
7
+ from xhtml.element.tag import Br # noqa:F401
8
+ from xhtml.element.tag import Div # noqa:F401
9
+ from xhtml.element.tag import EmptyTag # noqa:F401
10
+ from xhtml.element.tag import Form # noqa:F401
11
+ from xhtml.element.tag import FormAttrs # noqa:F401
12
+ from xhtml.element.tag import Head # noqa:F401
13
+ from xhtml.element.tag import Html # noqa:F401
14
+ from xhtml.element.tag import HtmlAttrs # noqa:F401
15
+ from xhtml.element.tag import Input # noqa:F401
16
+ from xhtml.element.tag import InputAttrs # noqa:F401
17
+ from xhtml.element.tag import Span # noqa:F401
18
+ from xhtml.element.tag import Tag # noqa:F401
19
+ from xhtml.element.tag import TextTag # noqa:F401
20
+ from xhtml.element.tag import Title # noqa:F401
@@ -1,8 +1,8 @@
1
1
  # coding:utf-8
2
2
 
3
- from .attr import Args
4
- from .attr import Arguments
5
- from .attr import Attr
3
+ from xhtml.element.attr import Args
4
+ from xhtml.element.attr import Arguments
5
+ from xhtml.element.attr import Attr
6
6
 
7
7
 
8
8
  class StyleCSS(Attr):
@@ -1,6 +1,6 @@
1
1
  # coding:utf-8
2
2
 
3
- from .tag import Html
3
+ from xhtml.element.tag import Html
4
4
 
5
5
 
6
6
  class HtmlDoc(Html):
@@ -6,12 +6,12 @@ from typing import List
6
6
  from typing import Optional
7
7
  from typing import TypeVar
8
8
 
9
- from ..attribute import __description__
10
- from ..attribute import __project__
11
- from .attr import Args
12
- from .attr import Arguments
13
- from .attr import Attr
14
- from .css import StyleCSS
9
+ from xhtml.attribute import __description__
10
+ from xhtml.attribute import __project__
11
+ from xhtml.element.attr import Args
12
+ from xhtml.element.attr import Arguments
13
+ from xhtml.element.attr import Attr
14
+ from xhtml.element.css import StyleCSS
15
15
 
16
16
 
17
17
  class Attrs(Args):
@@ -0,0 +1,3 @@
1
+ # coding:utf-8
2
+
3
+ from xhtml.flask.proxy import FlaskProxy # noqa:F401
@@ -0,0 +1,4 @@
1
+ # coding:utf-8
2
+
3
+ from xhtml.header.accept import AcceptLanguage # noqa:F401
4
+ from xhtml.header.accept import LanguageQ # noqa:F401
@@ -0,0 +1,3 @@
1
+ # coding:utf-8
2
+
3
+ from xhtml.request.stream import StreamResponse # noqa:F401
@@ -0,0 +1,32 @@
1
+ # coding:utf-8
2
+
3
+ from os.path import abspath
4
+ from os.path import dirname
5
+ from os.path import isdir
6
+ from os.path import join
7
+ from typing import Optional
8
+
9
+ from xlc import Message
10
+ from xlc import Section
11
+
12
+ from xhtml.header import AcceptLanguage
13
+ from xhtml.resource import Resource
14
+
15
+ BASE_DIR = dirname(abspath(__file__))
16
+
17
+
18
+ class Template(Resource):
19
+ FAVICON: str = "favicon.ico"
20
+
21
+ def __init__(self, base: Optional[str] = None):
22
+ super().__init__(base if base and isdir(base) else BASE_DIR)
23
+
24
+
25
+ class LocaleTemplate(Template):
26
+ def __init__(self, base: str):
27
+ self.__message: Message = Message.load(join(base, "locale"))
28
+ super().__init__(base)
29
+
30
+ def search(self, accept_language: str, section: str) -> Section:
31
+ language: AcceptLanguage = AcceptLanguage(accept_language)
32
+ return language.choice(self.__message).seek(section)
@@ -1,10 +0,0 @@
1
- # coding:utf-8
2
-
3
- from .element import * # noqa:F401,F403
4
- from .flask import FlaskProxy # noqa:F401
5
- from .header import AcceptLanguage # noqa:F401
6
- from .header import LanguageQ # noqa:F401
7
- from .request import StreamResponse # noqa:F401
8
- from .resource import FileResource # noqa:F401
9
- from .resource import Resource # noqa:F401
10
- from .template import Template # noqa:F401
@@ -1,20 +0,0 @@
1
- # coding:utf-8
2
-
3
- from .attr import Attr # noqa:F401
4
- from .css import StyleCSS # noqa:F401
5
- from .doc import HtmlDoc # noqa:F401
6
- from .tag import Body # noqa:F401
7
- from .tag import Br # noqa:F401
8
- from .tag import Div # noqa:F401
9
- from .tag import EmptyTag # noqa:F401
10
- from .tag import Form # noqa:F401
11
- from .tag import FormAttrs # noqa:F401
12
- from .tag import Head # noqa:F401
13
- from .tag import Html # noqa:F401
14
- from .tag import HtmlAttrs # noqa:F401
15
- from .tag import Input # noqa:F401
16
- from .tag import InputAttrs # noqa:F401
17
- from .tag import Span # noqa:F401
18
- from .tag import Tag # noqa:F401
19
- from .tag import TextTag # noqa:F401
20
- from .tag import Title # noqa:F401
@@ -1,3 +0,0 @@
1
- # coding:utf-8
2
-
3
- from .proxy import FlaskProxy # noqa:F401
@@ -1,4 +0,0 @@
1
- # coding:utf-8
2
-
3
- from .accept import AcceptLanguage # noqa:F401
4
- from .accept import LanguageQ # noqa:F401
@@ -1,3 +0,0 @@
1
- # coding:utf-8
2
-
3
- from .stream import StreamResponse # noqa:F401
@@ -1,17 +0,0 @@
1
- # coding:utf-8
2
-
3
- from os.path import abspath
4
- from os.path import dirname
5
- from os.path import isdir
6
- from typing import Optional
7
-
8
- from xhtml.resource import Resource
9
-
10
- BASE_DIR = dirname(abspath(__file__))
11
-
12
-
13
- class Template(Resource):
14
- FAVICON: str = "favicon.ico"
15
-
16
- def __init__(self, base: Optional[str] = None):
17
- super().__init__(base if base and isdir(base) else BASE_DIR)
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes