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.
- {xhtm-0.2.0 → xhtm-0.2.1}/PKG-INFO +1 -1
- {xhtm-0.2.0 → xhtm-0.2.1}/xhtm.egg-info/PKG-INFO +1 -1
- xhtm-0.2.1/xhtml/__init__.py +11 -0
- {xhtm-0.2.0 → xhtm-0.2.1}/xhtml/attribute.py +1 -1
- xhtm-0.2.1/xhtml/element/__init__.py +20 -0
- {xhtm-0.2.0 → xhtm-0.2.1}/xhtml/element/css.py +3 -3
- {xhtm-0.2.0 → xhtm-0.2.1}/xhtml/element/doc.py +1 -1
- {xhtm-0.2.0 → xhtm-0.2.1}/xhtml/element/tag.py +6 -6
- xhtm-0.2.1/xhtml/flask/__init__.py +3 -0
- xhtm-0.2.1/xhtml/header/__init__.py +4 -0
- xhtm-0.2.1/xhtml/request/__init__.py +3 -0
- xhtm-0.2.1/xhtml/template/__init__.py +32 -0
- xhtm-0.2.0/xhtml/__init__.py +0 -10
- xhtm-0.2.0/xhtml/element/__init__.py +0 -20
- xhtm-0.2.0/xhtml/flask/__init__.py +0 -3
- xhtm-0.2.0/xhtml/header/__init__.py +0 -4
- xhtm-0.2.0/xhtml/request/__init__.py +0 -3
- xhtm-0.2.0/xhtml/template/__init__.py +0 -17
- {xhtm-0.2.0 → xhtm-0.2.1}/LICENSE +0 -0
- {xhtm-0.2.0 → xhtm-0.2.1}/README.md +0 -0
- {xhtm-0.2.0 → xhtm-0.2.1}/setup.cfg +0 -0
- {xhtm-0.2.0 → xhtm-0.2.1}/setup.py +0 -0
- {xhtm-0.2.0 → xhtm-0.2.1}/xhtm.egg-info/SOURCES.txt +0 -0
- {xhtm-0.2.0 → xhtm-0.2.1}/xhtm.egg-info/dependency_links.txt +0 -0
- {xhtm-0.2.0 → xhtm-0.2.1}/xhtm.egg-info/requires.txt +0 -0
- {xhtm-0.2.0 → xhtm-0.2.1}/xhtm.egg-info/top_level.txt +0 -0
- {xhtm-0.2.0 → xhtm-0.2.1}/xhtm.egg-info/zip-safe +0 -0
- {xhtm-0.2.0 → xhtm-0.2.1}/xhtml/element/attr.py +0 -0
- {xhtm-0.2.0 → xhtm-0.2.1}/xhtml/flask/proxy.py +0 -0
- {xhtm-0.2.0 → xhtm-0.2.1}/xhtml/header/accept.py +0 -0
- {xhtm-0.2.0 → xhtm-0.2.1}/xhtml/header/content.py +0 -0
- {xhtm-0.2.0 → xhtm-0.2.1}/xhtml/request/stream.py +0 -0
- {xhtm-0.2.0 → xhtm-0.2.1}/xhtml/resource/__init__.py +0 -0
- {xhtm-0.2.0 → xhtm-0.2.1}/xhtml/resource/favicon.ico +0 -0
- {xhtm-0.2.0 → xhtm-0.2.1}/xhtml/resource/logo.svg +0 -0
- {xhtm-0.2.0 → xhtm-0.2.1}/xhtml/template/hello.html +0 -0
|
@@ -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
|
|
@@ -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
|
|
@@ -6,12 +6,12 @@ from typing import List
|
|
|
6
6
|
from typing import Optional
|
|
7
7
|
from typing import TypeVar
|
|
8
8
|
|
|
9
|
-
from
|
|
10
|
-
from
|
|
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,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)
|
xhtm-0.2.0/xhtml/__init__.py
DELETED
|
@@ -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,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
|
|
File without changes
|