From debfb9118dece693025c0fc50ad8cbde84ab565b Mon Sep 17 00:00:00 2001 From: Elena ``of Valhalla'' Grandi Date: Wed, 14 Jun 2023 09:32:28 +0200 Subject: Project structure --- .gitignore | 1 + Makefile | 20 +++++++++++ make.bat | 35 ++++++++++++++++++ source/bibliography/index.rst | 9 +++++ source/bibliography/misc.bib | 0 source/conf.py | 59 ++++++++++++++++++++++++++++++ source/index.rst | 84 +++++++++++++++++++++++++++++++++++++++++++ 7 files changed, 208 insertions(+) create mode 100644 .gitignore create mode 100644 Makefile create mode 100644 make.bat create mode 100644 source/bibliography/index.rst create mode 100644 source/bibliography/misc.bib create mode 100644 source/conf.py create mode 100644 source/index.rst diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..378eac2 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +build diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..d0c3cbf --- /dev/null +++ b/Makefile @@ -0,0 +1,20 @@ +# Minimal makefile for Sphinx documentation +# + +# You can set these variables from the command line, and also +# from the environment for the first two. +SPHINXOPTS ?= +SPHINXBUILD ?= sphinx-build +SOURCEDIR = source +BUILDDIR = build + +# Put it first so that "make" without argument is like "make help". +help: + @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + +.PHONY: help Makefile + +# Catch-all target: route all unknown targets to Sphinx using the new +# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). +%: Makefile + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/make.bat b/make.bat new file mode 100644 index 0000000..747ffb7 --- /dev/null +++ b/make.bat @@ -0,0 +1,35 @@ +@ECHO OFF + +pushd %~dp0 + +REM Command file for Sphinx documentation + +if "%SPHINXBUILD%" == "" ( + set SPHINXBUILD=sphinx-build +) +set SOURCEDIR=source +set BUILDDIR=build + +%SPHINXBUILD% >NUL 2>NUL +if errorlevel 9009 ( + echo. + echo.The 'sphinx-build' command was not found. Make sure you have Sphinx + echo.installed, then set the SPHINXBUILD environment variable to point + echo.to the full path of the 'sphinx-build' executable. Alternatively you + echo.may add the Sphinx directory to PATH. + echo. + echo.If you don't have Sphinx installed, grab it from + echo.https://www.sphinx-doc.org/ + exit /b 1 +) + +if "%1" == "" goto help + +%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% +goto end + +:help +%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% + +:end +popd diff --git a/source/bibliography/index.rst b/source/bibliography/index.rst new file mode 100644 index 0000000..b5317b2 --- /dev/null +++ b/source/bibliography/index.rst @@ -0,0 +1,9 @@ +############## + Bibliography +############## + +Miscellaneous +============= + +.. bibliography:: misc.bib + :all: diff --git a/source/bibliography/misc.bib b/source/bibliography/misc.bib new file mode 100644 index 0000000..e69de29 diff --git a/source/conf.py b/source/conf.py new file mode 100644 index 0000000..96ccd7d --- /dev/null +++ b/source/conf.py @@ -0,0 +1,59 @@ +# Configuration file for the Sphinx documentation builder. +# +# For the full list of built-in configuration values, see the documentation: +# https://www.sphinx-doc.org/en/master/usage/configuration.html + +# -- Project information ----------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information + +project = "Valhalla's craft patterns" +copyright = '2023, Elena “of Valhalla”' +author = 'Elena “of Valhalla”' + +# -- General configuration --------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration + +extensions = [ + 'sphinxcontrib.inkscapeconverter', + 'sphinxcontrib.bibtex', +] + +templates_path = ['_templates'] +exclude_patterns = [] + + + +# -- Options for HTML output ------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output + +html_theme = 'alabaster' +html_static_path = ['_static'] + +# -- Options for latex output ------------------------------------------------- + +latex_engine = 'xelatex' +latex_show_urls = 'footnote' +latex_toplevel_sectioning = 'part' + +latex_elements = { + 'papersize': 'a5paper', + 'fontpkg': r''' + \setmainfont{Gentium} + \setsansfont{Gentium} + \setmonofont{FreeMono}[Scale=0.8] + ''', + 'sphinxsetup': r''' + TitleColor={named}{black}, + InnerLinkColor={named}{gray}, + OuterLinkColor={named}{gray}, + hmargin={2cm,2cm}, + vmargin={2.5cm,2.5cm}, + ''', + 'fncychap': r'\usepackage[Rejne]{fncychap}', + } + +# Options for extensions + +bibtex_bibfiles = [ + "bibliography/misc.bib", +] diff --git a/source/index.rst b/source/index.rst new file mode 100644 index 0000000..d899c1a --- /dev/null +++ b/source/index.rst @@ -0,0 +1,84 @@ +.. Valhalla's crafting patterns documentation master file, created by + sphinx-quickstart on Wed Jun 14 09:23:05 2023. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +Valhalla's craft patterns +========================= + +This is a collection of crafting patterns and tutorials designed or +adapted by Elena “of Valhalla”. + +The latest version of this document is published on +https://craft-patterns.trueelena.org/; a `pdf version +`_ +and an `epub version +`_ +are also available; note however that this document is pretty image +heavy, and may not load correctly in many ebook readers. + +The PDF and epub versions also don't include any download file which can +be downloaded from the individual pages of this webiste, or as the `full +website source zip archive +`_ or +`website source tarball +`_. + +There are also companion websites for `sewing patterns +`_ and `fiber craft patterns +`_. + +This document is generated with Sphinx_, and its sources are published +on https://git.trueelena.org/crafts/craft_patterns/. + +.. _Sphinx: https://www.sphinx-doc.org + +Generating an rss of new pages with Sphinx doesn't seem to be (easily) +possible, but when new patterns are added or existing patterns receive +significant changes they are usually announced on `my blog`_, which of +course has an rss. + +.. _`my blog`: https://blog.trueelena.org + +.. raw:: html + +

+ If you have questions or comments about anything in these patterns you + can contact me via email at patterns AT trueelena.org, or you can find + me on the fediverse + + @valhalla@social.gl.como.it + +

+ +.. only:: not html + + If you have questions or comments about anything in these patterns you + can contact me via email at patterns AT trueelena.org, or you can find + me on the fediverse as `@valhalla@social.gl.como.it + `_. + +------ + +Copyright 2023 Elena Grandi + +This work is licensed under the Creative Commons Attribution-ShareAlike +4.0 International License. To view a copy of this license, visit +http://creativecommons.org/licenses/by-sa/4.0/ or send a letter to +Creative Commons, PO Box 1866, Mountain View, CA 94042, USA. + +------ + +.. toctree:: + :maxdepth: 3 + :caption: Contents: + + bibliography/index + +.. only:: draft + + * :ref:`genindex` + +.. only:: html + + * :ref:`search` -- cgit v1.2.3