diff options
author | Thomas "Cakeisalie5" Touhey <thomas@touhey.fr> | 2018-09-11 02:20:08 +0200 |
---|---|---|
committer | Thomas "Cakeisalie5" Touhey <thomas@touhey.fr> | 2018-09-11 02:20:08 +0200 |
commit | 516726c4478dff5dfba6f207fc784b8a06a39186 (patch) | |
tree | 0196e5712007f069d9fd641665c99570cc58f459 | |
parent | dcb8611e37faa2e1eeea573932fc88498bc8a1ea (diff) |
Mainly added 'checkdocs' and updated Pipfile.
-rwxr-xr-x | Makefile | 5 | ||||
-rw-r--r-- | Pipfile | 1 | ||||
-rw-r--r-- | Pipfile.lock | 59 | ||||
-rw-r--r-- | README.rst | 15 | ||||
-rw-r--r-- | textoutpc/builtin/_List.py | 7 |
5 files changed, 51 insertions, 36 deletions
@@ -8,6 +8,9 @@ test tests: -prepare docs: -prepare @$(ST) build_sphinx +checkdocs: -prepare + @$(ST) checkdocs + dist: $(DNAME) $(DNAME): -prepare @$(ST) sdist @@ -16,7 +19,7 @@ upload: $(DNAME) @twine upload $(DNAME) -prepare: - @pipenv sync + @pipenv install --dev .PHONY: -prepare test tests dist docs # End of file. @@ -11,4 +11,5 @@ regex = '*' [dev-packages] sphinx = '*' +"collective.checkdocs" = '*' pudb = '*' diff --git a/Pipfile.lock b/Pipfile.lock index bd27a94..486b353 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "17b85803e45d9bc70fd06c90eab447ef90a4b951c78b414c60a3c21e24ddfd39" + "sha256": "befed1c16c1f4986f36ae7b114c67470fca119ca94a89bc557baef9c3a258eb6" }, "pipfile-spec": 6, "requires": { @@ -18,24 +18,24 @@ "default": { "regex": { "hashes": [ - "sha256:060bf5f9c0311794bde90294b858830684861aee9c1f22ef5ce20d8fabf05a4e", - "sha256:0f7cbe57eed5429b8f4295b338ab6492338ec9793e363216bdfba905ae82c7c0", - "sha256:19a76b228cbf13024bbe098da8563fc5f4831271531d5e4d9d289c68c1b01233", - "sha256:22cdfa574fa85bf536ed9197a9796962e1c131c736fc0aa9dd24045f3e333304", - "sha256:4d3323f434782185d0b89f34ba6c125f19e3bfe5e099a72c1e33e7cfd43013d2", - "sha256:56494baf1ed525deea426d3676b1ae3fdcc906b55eccfcb4ea928453e11f2a43", - "sha256:5c896c51b06c96d9d5e1c41495fd0fbe92f711225b889e2faef534f0a697f0db", - "sha256:5f1838807ced5c5fa011e3f935568ff59e0b2e6c83119668b961e3bb383e12f6", - "sha256:5f3ab6220d9c191392563c9727552fd3c1f3a3566180a64717d37554ad7414b7", - "sha256:7c90d56daeb64371670e528bd08a6e722a025a508effa84842d6c66727e7e422", - "sha256:98179516aa75ef0e9ecbda8cd4b14f6e4186e32da3fc21466edd25c917fd8110", - "sha256:c7a5613e903937c73d02f9b3b4b4dce0275fd6909295939a9f3ea50dbf6a2d4e", - "sha256:d8945dba30c1070c398ad2e0356aa0dd55d87129fa9bac2cd885ca95ff92a555", - "sha256:e45c34102da4621eee9fc25df1651129ab3adcc1f754bb77ea329aea39c2288c", - "sha256:eb5a96f142f0bb4ac37b8e8a334c234c48b571324b385cf2d66a84522d5ec075" + "sha256:22d7ef8c2df344328a8a3c61edade2ee714e5de9360911d22a9213931c769faa", + "sha256:3a699780c6b712c67dc23207b129ccc6a7e1270233f7aadead3ea3f83c893702", + "sha256:42f460d349baebd5faec02a0c920988fb0300b24baf898d9c139886565b66b6c", + "sha256:43bf3d79940cbdf19adda838d8b26b28b47bec793cda46590b5b25703742f440", + "sha256:47d6c7f0588ef33464e00023067c4e7cce68e0d6a686a73c7ee15abfdad503d4", + "sha256:5b879f59f25ed9b91bc8693a9a994014b431f224f492519ad0255ce6b54b83e5", + "sha256:8ba0093c412900f636b0f826c597a0c3ea0e395344bc99894ddefe88b76c9c7e", + "sha256:a4789254a1a0bd7a637036cce0b7ed72d8cc864e93f2e9cfd10ac00ae27bb7b0", + "sha256:b73cea07117dca888b0c3671770b501bef19aac9c45c8ffdb5bea2cca2377b0a", + "sha256:d3eb59fa3e5b5438438ec97acd9dc86f077428e020b015b43987e35bea68ef4c", + "sha256:d51d232b4e2f106deaf286001f563947fee255bc5bd209a696f027e15cf0a1e7", + "sha256:d59b03131a8e35061b47a8f186324a95eaf30d5f6ee9cc0637e7b87d29c7c9b5", + "sha256:dd705df1b47470388fc4630e4df3cbbe7677e2ab80092a1c660cae630a307b2d", + "sha256:e87fffa437a4b00afb17af785da9b01618425d6cd984c677639deb937037d8f2", + "sha256:ed40e0474ab5ab228a8d133759d451b31d3ccdebaff698646e54aff82c3de4f8" ], "index": "pypi", - "version": "==2018.8.17" + "version": "==2018.8.29" } }, "develop": { @@ -67,6 +67,13 @@ ], "version": "==3.0.4" }, + "collective.checkdocs": { + "hashes": [ + "sha256:3a5328257c5224bc72753820c182910d7fb336bc1dba5e09113d48566655e46e" + ], + "index": "pypi", + "version": "==0.2" + }, "docutils": { "hashes": [ "sha256:02aec4bd92ab067f6ff27a38a38a41173bf01bed8f89157768c1573f53e474a6", @@ -84,10 +91,11 @@ }, "imagesize": { "hashes": [ - "sha256:3620cc0cadba3f7475f9940d22431fc4d407269f1be59ec9b8edcca26440cf18", - "sha256:5b326e4678b6925158ccc66a9fa3122b6106d7c876ee32d7de6ce59385b96315" + "sha256:3f349de3eb99145973fefb7dbe38554414e5c30abd0c8e4b970a7c9d09f3a1d8", + "sha256:f3832918bc3c66617f92e35f5d70729187676313caa60c187eb0f28b8fe5e3b5" ], - "version": "==1.0.0" + "markers": "python_version != '3.1.*' and python_version != '3.3.*' and python_version != '3.2.*' and python_version != '3.0.*' and python_version >= '2.7'", + "version": "==1.1.0" }, "jinja2": { "hashes": [ @@ -142,7 +150,6 @@ "sha256:63b52e3c866428a224f97cab011de738c36aec0185aa91cfacd418b5d58911d1", "sha256:ec22d826a36ed72a7358ff3fe56cbd4ba69dd7a6718ffd450ff0e9df7a47ce6a" ], - "markers": "python_version >= '2.6' and python_version != '3.1.*' and python_version != '3.0.*' and python_version != '3.3.*' and python_version != '3.2.*' and python_version < '4'", "version": "==2.19.1" }, "six": { @@ -161,18 +168,18 @@ }, "sphinx": { "hashes": [ - "sha256:71531900af3f68625a29c4e00381bee8f85255219a3d500a3e255076a45b735e", - "sha256:a3defde5e17b5bc2aa21820674409287acc4d56bf8d009213d275e4b9d0d490d" + "sha256:217a7705adcb573da5bbe1e0f5cab4fa0bd89fd9342c9159121746f593c2d5a4", + "sha256:a602513f385f1d5785ff1ca420d9c7eb1a1b63381733b2f0ea8188a391314a86" ], "index": "pypi", - "version": "==1.7.7" + "version": "==1.7.9" }, "sphinxcontrib-websupport": { "hashes": [ "sha256:68ca7ff70785cbe1e7bccc71a48b5b6d965d79ca50629606c7861a21b206d9dd", "sha256:9de47f375baf1ea07cdb3436ff39d7a9c76042c10a769c52353ec46e4e8fc3b9" ], - "markers": "python_version != '3.1.*' and python_version >= '2.7' and python_version != '3.0.*' and python_version != '3.3.*' and python_version != '3.2.*'", + "markers": "python_version != '3.1.*' and python_version != '3.3.*' and python_version != '3.2.*' and python_version != '3.0.*' and python_version >= '2.7'", "version": "==1.1.0" }, "urllib3": { @@ -180,7 +187,7 @@ "sha256:a68ac5e15e76e7e5dd2b8f94007233e01effe3e50e8daddf69acfd81cb686baf", "sha256:b5725a0bd4ba422ab0e66e89e030c806576753ea3ee08554382c14e685d117b5" ], - "markers": "python_version >= '2.6' and python_version != '3.1.*' and python_version != '3.0.*' and python_version != '3.3.*' and python_version != '3.2.*' and python_version < '4'", + "markers": "python_version != '3.1.*' and python_version != '3.3.*' and python_version >= '2.6' and python_version < '4' and python_version != '3.2.*' and python_version != '3.0.*'", "version": "==1.23" }, "urwid": { @@ -15,8 +15,11 @@ What is left to do ------------------ - Implement the ``not_within_itself`` attribute (for ``[*]``). -- Implement the ``expect_child`` attribute (for `[list] blah [*]`` to ignore - ``blah`` and anything before the first ``[*]``). +- Implement the ``allowed_tags`` attribute to only allow a set of tags within + itself. +- Implement the ``only_allowed_tags`` attribute (for ``[list] blah [*]`` to + ignore ``blah`` and anything outside of ``[*]`` tags which is in + ``allow_tags``). - Add an ``[imgurl]`` tag. - Manage lightscript (or even markdown?) as output languages; - Check where the errors are to display them to the user: @@ -30,7 +33,7 @@ What is left to do - Implement match names (such as ``\[\*+\]`` for lists). - Manage keywords with tags such as ``[tag key=value other="something else"]``. -.. _Planète Casio:: https://www.planet-casio.com/ -.. _Planète Casio's forge:: https://gitea.planet-casio.com/ -.. _Thomas' forge:: https://forge.touhey.fr/pc/textout.git -.. _the official website:: https://textout.touhey.fr/ +.. _Planète Casio: https://www.planet-casio.com/ +.. _Planète Casio's forge: https://gitea.planet-casio.com/ +.. _Thomas' forge: https://forge.touhey.fr/pc/textout.git +.. _the official website: https://textout.touhey.fr/ diff --git a/textoutpc/builtin/_List.py b/textoutpc/builtin/_List.py index da1fa0e..846feec 100644 --- a/textoutpc/builtin/_List.py +++ b/textoutpc/builtin/_List.py @@ -35,7 +35,7 @@ _ol_lst_names = set(_ol_list_style_types.keys()) class ListElementTag(_BlockTag): """ List element for basic lists (see `ListTag`). """ - aliases = ('[*]',) + aliases = ('[*]', '[li]') notempty = True superblock = True not_within_itself = True @@ -49,7 +49,7 @@ class ListElementTag(_BlockTag): class ListTag(_BlockTag): """ Main tag for making basic lists. Example use: - + [ul] [*] Item number one. [*] Item number [b]two[/b]. @@ -59,7 +59,8 @@ class ListTag(_BlockTag): aliases = ('[list]', '[ul]', '[ol]') notempty = True superblock = True - expect_child = (_ListElement,) + allowed_tags = (_ListElement,) + only_allowed_tags = True def prepare(self, name, value): us = _ul_lst_names |