From 41fd882e192f042f83e707c9b2f4c8b00d4bd55d Mon Sep 17 00:00:00 2001 From: "Thomas \"Cakeisalie5\" Touhey" Date: Fri, 27 Jul 2018 02:25:38 +0200 Subject: [PATCH] Updated docs and project structure, dumped to 0.1.1 --- .gitignore | 2 ++ LICENSE.md => LICENSE.txt | 5 +++-- MANIFEST.in | 10 ++++++++++ README.rst | 6 ++++-- {doc => docs}/Makefile | 4 ++-- docs/_static/.gitkeep | 0 docs/_templates/.gitkeep | 0 {doc/source => docs}/conf.py | 8 ++------ {doc/source => docs}/index.rst | 10 ++++++---- {doc/source => docs}/language.rst | 0 {doc => docs}/make.bat | 4 ++-- {doc/source => docs}/tags.rst | 0 {doc/source => docs}/usage.rst | 0 setup.cfg | 5 ++++- setup.py | 5 +++-- textoutpc/__init__.py | 2 +- 16 files changed, 39 insertions(+), 22 deletions(-) rename LICENSE.md => LICENSE.txt (92%) create mode 100644 MANIFEST.in rename {doc => docs}/Makefile (92%) create mode 100644 docs/_static/.gitkeep create mode 100644 docs/_templates/.gitkeep rename {doc/source => docs}/conf.py (97%) rename {doc/source => docs}/index.rst (83%) rename {doc/source => docs}/language.rst (100%) rename {doc => docs}/make.bat (90%) rename {doc/source => docs}/tags.rst (100%) rename {doc/source => docs}/usage.rst (100%) diff --git a/.gitignore b/.gitignore index 79ffa57..9a5c8a2 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,5 @@ __pycache__ /*.egg-info /dist /.spyproject +/build +/docs/_build diff --git a/LICENSE.md b/LICENSE.txt similarity index 92% rename from LICENSE.md rename to LICENSE.txt index 16c928c..45ccebe 100644 --- a/LICENSE.md +++ b/LICENSE.txt @@ -1,5 +1,6 @@ -# The MIT License (MIT) -Copyright (C) 2018 Thomas Touhey <> +The MIT License (MIT) + +Copyright (C) 2018 Thomas Touhey Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..c0eb105 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,10 @@ +include README.rst +include LICENSE.txt +include MANIFEST.in +include setup.py +include setup.cfg + +include docs/*.rst +include docs/conf.py +include docs/Makefile +include docs/make.bat diff --git a/README.rst b/README.rst index c1ed01d..13eaeb5 100644 --- a/README.rst +++ b/README.rst @@ -1,8 +1,9 @@ Planète Casio's textout() BBcode markup language translator =========================================================== -For more information, read the documentation accessible on -`the official website`_. +This module contains a BBcode to HTML translator for +`Planète Casio`_. For more information, read the +documentation accessible on `the official website`_. .. warning:: @@ -29,6 +30,7 @@ What is left to do - Look for security flaws (we really don't want stored XSS flaws!). - 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/ diff --git a/doc/Makefile b/docs/Makefile similarity index 92% rename from doc/Makefile rename to docs/Makefile index f459b9e..ee83786 100644 --- a/doc/Makefile +++ b/docs/Makefile @@ -5,8 +5,8 @@ SPHINXOPTS = SPHINXBUILD = sphinx-build SPHINXPROJ = textoutpc -SOURCEDIR = source -BUILDDIR = build +SOURCEDIR = . +BUILDDIR = _build # Put it first so that "make" without argument is like "make help". help: diff --git a/docs/_static/.gitkeep b/docs/_static/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/docs/_templates/.gitkeep b/docs/_templates/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/doc/source/conf.py b/docs/conf.py similarity index 97% rename from doc/source/conf.py rename to docs/conf.py index 290f6a9..5483889 100644 --- a/doc/source/conf.py +++ b/docs/conf.py @@ -39,7 +39,6 @@ release = '' # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ - 'sphinx.ext.viewcode', ] # Add any paths that contain templates here, relative to this directory. @@ -64,7 +63,7 @@ language = None # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. # This pattern also affects html_static_path and html_extra_path . -exclude_patterns = [] +exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] # The name of the Pygments (syntax highlighting) style to use. pygments_style = 'sphinx' @@ -153,7 +152,4 @@ texinfo_documents = [ (master_doc, 'textoutpc', 'textoutpc Documentation', author, 'textoutpc', 'One line description of project.', 'Miscellaneous'), -] - - -# -- Extension configuration ------------------------------------------------- \ No newline at end of file +] \ No newline at end of file diff --git a/doc/source/index.rst b/docs/index.rst similarity index 83% rename from doc/source/index.rst rename to docs/index.rst index 0c48c57..8e1c9c6 100644 --- a/doc/source/index.rst +++ b/docs/index.rst @@ -1,5 +1,7 @@ -textoutpc, a BBcode markup language translator for Planète Casio -================================================================ +Welcome to textoutpc's documentation! +===================================== + +textoutpc is a BBcode markup language translator project for `Planète Casio`_. BBcode has been invented in the 90s/2000s for bulletin board systems. It has been implemented in `Planète Casio`_ during its first years (although @@ -19,8 +21,8 @@ As this is a rewrite, the vulnerabilities and bug will not be common to this project and the online version of the transcoder. .. toctree:: - :maxdepth: 2 - :caption: Contents: + :maxdepth: 2 + :caption: Contents: language usage diff --git a/doc/source/language.rst b/docs/language.rst similarity index 100% rename from doc/source/language.rst rename to docs/language.rst diff --git a/doc/make.bat b/docs/make.bat similarity index 90% rename from doc/make.bat rename to docs/make.bat index b7d7b4f..50ebd53 100644 --- a/doc/make.bat +++ b/docs/make.bat @@ -7,8 +7,8 @@ REM Command file for Sphinx documentation if "%SPHINXBUILD%" == "" ( set SPHINXBUILD=sphinx-build ) -set SOURCEDIR=source -set BUILDDIR=build +set SOURCEDIR=. +set BUILDDIR=_build set SPHINXPROJ=textoutpc if "%1" == "" goto help diff --git a/doc/source/tags.rst b/docs/tags.rst similarity index 100% rename from doc/source/tags.rst rename to docs/tags.rst diff --git a/doc/source/usage.rst b/docs/usage.rst similarity index 100% rename from doc/source/usage.rst rename to docs/usage.rst diff --git a/setup.cfg b/setup.cfg index 913b8fc..ce1ab01 100644 --- a/setup.cfg +++ b/setup.cfg @@ -25,12 +25,15 @@ packages = find: test_suite = test scripts = scripts/textout2html - scripts/textout2lightscript + scripts/textout2ls install_requires = regex [options.package_data] * = *.txt, *.rst +[build_sphinx] +source-dir = doc + [wheel] universal = True diff --git a/setup.py b/setup.py index e9230f2..ace288b 100755 --- a/setup.py +++ b/setup.py @@ -5,10 +5,11 @@ #****************************************************************************** """ Setup script for the textoutpc Python package and script. """ -from setuptools import setup +from sphinx.setup_command import BuildDoc as _BuildDoc +from setuptools import setup as _setup # Actually, most of the project's data is read from the `setup.cfg` file. -setup() +_setup(cmdclass = {'build_sphinx': _BuildDoc}) # End of file. diff --git a/textoutpc/__init__.py b/textoutpc/__init__.py index bf157d8..4af39c2 100755 --- a/textoutpc/__init__.py +++ b/textoutpc/__init__.py @@ -12,7 +12,7 @@ from .translate import Translator as _Translator __all__ = ["version", "tohtml", "tolightscript"] -version = "0.1" +version = "0.1.1" def tohtml(message, **tweaks): """ Converts textout BBcode to HTML.