From 4c924ccf7db665b8af0197e07d7e09ac6dac1e4d Mon Sep 17 00:00:00 2001 From: Nick Sweeting Date: Sun, 28 Apr 2019 16:46:25 -0400 Subject: [PATCH] add instructions for building sphinx docs --- README.md | 12 +- archivebox/docs/Makefile | 19 --- archivebox/docs/archivebox.cli.rst | 142 ------------------ archivebox/docs/archivebox.config.rst | 22 --- .../docs/archivebox.core.migrations.rst | 30 ---- archivebox/docs/archivebox.core.rst | 93 ------------ archivebox/docs/archivebox.extractors.rst | 86 ----------- archivebox/docs/archivebox.index.rst | 46 ------ archivebox/docs/archivebox.parsers.rst | 78 ---------- archivebox/docs/archivebox.rst | 50 ------ archivebox/docs/conf.py | 110 -------------- archivebox/docs/modules.rst | 7 - docs | 2 +- 13 files changed, 12 insertions(+), 685 deletions(-) delete mode 100644 archivebox/docs/Makefile delete mode 100644 archivebox/docs/archivebox.cli.rst delete mode 100644 archivebox/docs/archivebox.config.rst delete mode 100644 archivebox/docs/archivebox.core.migrations.rst delete mode 100644 archivebox/docs/archivebox.core.rst delete mode 100644 archivebox/docs/archivebox.extractors.rst delete mode 100644 archivebox/docs/archivebox.index.rst delete mode 100644 archivebox/docs/archivebox.parsers.rst delete mode 100644 archivebox/docs/archivebox.rst delete mode 100644 archivebox/docs/conf.py delete mode 100644 archivebox/docs/modules.rst diff --git a/README.md b/README.md index 36d12d8a..80fe591d 100644 --- a/README.md +++ b/README.md @@ -203,10 +203,20 @@ Whether you want learn which organizations are the big players in the web archiv -We use the [Github wiki system](https://github.com/pirate/ArchiveBox/wiki) for documentation. +We use the [Github wiki system](https://github.com/pirate/ArchiveBox/wiki) and [Read the Docs](https://archivebox.readthedocs.io/en/latest/) for documentation. You can also access the docs locally by looking in the [`ArchiveBox/docs/`](https://github.com/pirate/ArchiveBox/wiki/Home) folder. +You can build the docs by running: +```python +cd ArchiveBox +pipenv install --dev +sphinx-apidoc -o docs archivebox +cd docs/ +make html +# then open docs/_build/html/index.html +``` + ## Getting Started - [Quickstart](https://github.com/pirate/ArchiveBox/wiki/Quickstart) diff --git a/archivebox/docs/Makefile b/archivebox/docs/Makefile deleted file mode 100644 index 298ea9e2..00000000 --- a/archivebox/docs/Makefile +++ /dev/null @@ -1,19 +0,0 @@ -# Minimal makefile for Sphinx documentation -# - -# You can set these variables from the command line. -SPHINXOPTS = -SPHINXBUILD = sphinx-build -SOURCEDIR = . -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) \ No newline at end of file diff --git a/archivebox/docs/archivebox.cli.rst b/archivebox/docs/archivebox.cli.rst deleted file mode 100644 index 7c6a3573..00000000 --- a/archivebox/docs/archivebox.cli.rst +++ /dev/null @@ -1,142 +0,0 @@ -archivebox.cli package -====================== - -Submodules ----------- - -archivebox.cli.archivebox module --------------------------------- - -.. automodule:: archivebox.cli.archivebox - :members: - :undoc-members: - :show-inheritance: - -archivebox.cli.archivebox\_add module -------------------------------------- - -.. automodule:: archivebox.cli.archivebox_add - :members: - :undoc-members: - :show-inheritance: - -archivebox.cli.archivebox\_config module ----------------------------------------- - -.. automodule:: archivebox.cli.archivebox_config - :members: - :undoc-members: - :show-inheritance: - -archivebox.cli.archivebox\_help module --------------------------------------- - -.. automodule:: archivebox.cli.archivebox_help - :members: - :undoc-members: - :show-inheritance: - -archivebox.cli.archivebox\_info module --------------------------------------- - -.. automodule:: archivebox.cli.archivebox_info - :members: - :undoc-members: - :show-inheritance: - -archivebox.cli.archivebox\_init module --------------------------------------- - -.. automodule:: archivebox.cli.archivebox_init - :members: - :undoc-members: - :show-inheritance: - -archivebox.cli.archivebox\_list module --------------------------------------- - -.. automodule:: archivebox.cli.archivebox_list - :members: - :undoc-members: - :show-inheritance: - -archivebox.cli.archivebox\_manage module ----------------------------------------- - -.. automodule:: archivebox.cli.archivebox_manage - :members: - :undoc-members: - :show-inheritance: - -archivebox.cli.archivebox\_remove module ----------------------------------------- - -.. automodule:: archivebox.cli.archivebox_remove - :members: - :undoc-members: - :show-inheritance: - -archivebox.cli.archivebox\_schedule module ------------------------------------------- - -.. automodule:: archivebox.cli.archivebox_schedule - :members: - :undoc-members: - :show-inheritance: - -archivebox.cli.archivebox\_server module ----------------------------------------- - -.. automodule:: archivebox.cli.archivebox_server - :members: - :undoc-members: - :show-inheritance: - -archivebox.cli.archivebox\_shell module ---------------------------------------- - -.. automodule:: archivebox.cli.archivebox_shell - :members: - :undoc-members: - :show-inheritance: - -archivebox.cli.archivebox\_update module ----------------------------------------- - -.. automodule:: archivebox.cli.archivebox_update - :members: - :undoc-members: - :show-inheritance: - -archivebox.cli.archivebox\_version module ------------------------------------------ - -.. automodule:: archivebox.cli.archivebox_version - :members: - :undoc-members: - :show-inheritance: - -archivebox.cli.logging module ------------------------------ - -.. automodule:: archivebox.cli.logging - :members: - :undoc-members: - :show-inheritance: - -archivebox.cli.tests module ---------------------------- - -.. automodule:: archivebox.cli.tests - :members: - :undoc-members: - :show-inheritance: - - -Module contents ---------------- - -.. automodule:: archivebox.cli - :members: - :undoc-members: - :show-inheritance: diff --git a/archivebox/docs/archivebox.config.rst b/archivebox/docs/archivebox.config.rst deleted file mode 100644 index b71af50e..00000000 --- a/archivebox/docs/archivebox.config.rst +++ /dev/null @@ -1,22 +0,0 @@ -archivebox.config package -========================= - -Submodules ----------- - -archivebox.config.stubs module ------------------------------- - -.. automodule:: archivebox.config.stubs - :members: - :undoc-members: - :show-inheritance: - - -Module contents ---------------- - -.. automodule:: archivebox.config - :members: - :undoc-members: - :show-inheritance: diff --git a/archivebox/docs/archivebox.core.migrations.rst b/archivebox/docs/archivebox.core.migrations.rst deleted file mode 100644 index 72c2291e..00000000 --- a/archivebox/docs/archivebox.core.migrations.rst +++ /dev/null @@ -1,30 +0,0 @@ -archivebox.core.migrations package -================================== - -Submodules ----------- - -archivebox.core.migrations.0001\_initial module ------------------------------------------------ - -.. automodule:: archivebox.core.migrations.0001_initial - :members: - :undoc-members: - :show-inheritance: - -archivebox.core.migrations.0002\_auto\_20190417\_0739 module ------------------------------------------------------------- - -.. automodule:: archivebox.core.migrations.0002_auto_20190417_0739 - :members: - :undoc-members: - :show-inheritance: - - -Module contents ---------------- - -.. automodule:: archivebox.core.migrations - :members: - :undoc-members: - :show-inheritance: diff --git a/archivebox/docs/archivebox.core.rst b/archivebox/docs/archivebox.core.rst deleted file mode 100644 index 8b4682ce..00000000 --- a/archivebox/docs/archivebox.core.rst +++ /dev/null @@ -1,93 +0,0 @@ -archivebox.core package -======================= - -Subpackages ------------ - -.. toctree:: - - archivebox.core.migrations - -Submodules ----------- - -archivebox.core.admin module ----------------------------- - -.. automodule:: archivebox.core.admin - :members: - :undoc-members: - :show-inheritance: - -archivebox.core.apps module ---------------------------- - -.. automodule:: archivebox.core.apps - :members: - :undoc-members: - :show-inheritance: - -archivebox.core.models module ------------------------------ - -.. automodule:: archivebox.core.models - :members: - :undoc-members: - :show-inheritance: - -archivebox.core.settings module -------------------------------- - -.. automodule:: archivebox.core.settings - :members: - :undoc-members: - :show-inheritance: - -archivebox.core.tests module ----------------------------- - -.. automodule:: archivebox.core.tests - :members: - :undoc-members: - :show-inheritance: - -archivebox.core.urls module ---------------------------- - -.. automodule:: archivebox.core.urls - :members: - :undoc-members: - :show-inheritance: - -archivebox.core.views module ----------------------------- - -.. automodule:: archivebox.core.views - :members: - :undoc-members: - :show-inheritance: - -archivebox.core.welcome\_message module ---------------------------------------- - -.. automodule:: archivebox.core.welcome_message - :members: - :undoc-members: - :show-inheritance: - -archivebox.core.wsgi module ---------------------------- - -.. automodule:: archivebox.core.wsgi - :members: - :undoc-members: - :show-inheritance: - - -Module contents ---------------- - -.. automodule:: archivebox.core - :members: - :undoc-members: - :show-inheritance: diff --git a/archivebox/docs/archivebox.extractors.rst b/archivebox/docs/archivebox.extractors.rst deleted file mode 100644 index a8ba6a38..00000000 --- a/archivebox/docs/archivebox.extractors.rst +++ /dev/null @@ -1,86 +0,0 @@ -archivebox.extractors package -============================= - -Submodules ----------- - -archivebox.extractors.archive\_org module ------------------------------------------ - -.. automodule:: archivebox.extractors.archive_org - :members: - :undoc-members: - :show-inheritance: - -archivebox.extractors.dom module --------------------------------- - -.. automodule:: archivebox.extractors.dom - :members: - :undoc-members: - :show-inheritance: - -archivebox.extractors.favicon module ------------------------------------- - -.. automodule:: archivebox.extractors.favicon - :members: - :undoc-members: - :show-inheritance: - -archivebox.extractors.git module --------------------------------- - -.. automodule:: archivebox.extractors.git - :members: - :undoc-members: - :show-inheritance: - -archivebox.extractors.media module ----------------------------------- - -.. automodule:: archivebox.extractors.media - :members: - :undoc-members: - :show-inheritance: - -archivebox.extractors.pdf module --------------------------------- - -.. automodule:: archivebox.extractors.pdf - :members: - :undoc-members: - :show-inheritance: - -archivebox.extractors.screenshot module ---------------------------------------- - -.. automodule:: archivebox.extractors.screenshot - :members: - :undoc-members: - :show-inheritance: - -archivebox.extractors.title module ----------------------------------- - -.. automodule:: archivebox.extractors.title - :members: - :undoc-members: - :show-inheritance: - -archivebox.extractors.wget module ---------------------------------- - -.. automodule:: archivebox.extractors.wget - :members: - :undoc-members: - :show-inheritance: - - -Module contents ---------------- - -.. automodule:: archivebox.extractors - :members: - :undoc-members: - :show-inheritance: diff --git a/archivebox/docs/archivebox.index.rst b/archivebox/docs/archivebox.index.rst deleted file mode 100644 index 58989cdf..00000000 --- a/archivebox/docs/archivebox.index.rst +++ /dev/null @@ -1,46 +0,0 @@ -archivebox.index package -======================== - -Submodules ----------- - -archivebox.index.html module ----------------------------- - -.. automodule:: archivebox.index.html - :members: - :undoc-members: - :show-inheritance: - -archivebox.index.json module ----------------------------- - -.. automodule:: archivebox.index.json - :members: - :undoc-members: - :show-inheritance: - -archivebox.index.schema module ------------------------------- - -.. automodule:: archivebox.index.schema - :members: - :undoc-members: - :show-inheritance: - -archivebox.index.sql module ---------------------------- - -.. automodule:: archivebox.index.sql - :members: - :undoc-members: - :show-inheritance: - - -Module contents ---------------- - -.. automodule:: archivebox.index - :members: - :undoc-members: - :show-inheritance: diff --git a/archivebox/docs/archivebox.parsers.rst b/archivebox/docs/archivebox.parsers.rst deleted file mode 100644 index d3b902c8..00000000 --- a/archivebox/docs/archivebox.parsers.rst +++ /dev/null @@ -1,78 +0,0 @@ -archivebox.parsers package -========================== - -Submodules ----------- - -archivebox.parsers.generic\_json module ---------------------------------------- - -.. automodule:: archivebox.parsers.generic_json - :members: - :undoc-members: - :show-inheritance: - -archivebox.parsers.generic\_rss module --------------------------------------- - -.. automodule:: archivebox.parsers.generic_rss - :members: - :undoc-members: - :show-inheritance: - -archivebox.parsers.generic\_txt module --------------------------------------- - -.. automodule:: archivebox.parsers.generic_txt - :members: - :undoc-members: - :show-inheritance: - -archivebox.parsers.medium\_rss module -------------------------------------- - -.. automodule:: archivebox.parsers.medium_rss - :members: - :undoc-members: - :show-inheritance: - -archivebox.parsers.netscape\_html module ----------------------------------------- - -.. automodule:: archivebox.parsers.netscape_html - :members: - :undoc-members: - :show-inheritance: - -archivebox.parsers.pinboard\_rss module ---------------------------------------- - -.. automodule:: archivebox.parsers.pinboard_rss - :members: - :undoc-members: - :show-inheritance: - -archivebox.parsers.pocket\_html module --------------------------------------- - -.. automodule:: archivebox.parsers.pocket_html - :members: - :undoc-members: - :show-inheritance: - -archivebox.parsers.shaarli\_rss module --------------------------------------- - -.. automodule:: archivebox.parsers.shaarli_rss - :members: - :undoc-members: - :show-inheritance: - - -Module contents ---------------- - -.. automodule:: archivebox.parsers - :members: - :undoc-members: - :show-inheritance: diff --git a/archivebox/docs/archivebox.rst b/archivebox/docs/archivebox.rst deleted file mode 100644 index d9360ac2..00000000 --- a/archivebox/docs/archivebox.rst +++ /dev/null @@ -1,50 +0,0 @@ -archivebox package -================== - -Subpackages ------------ - -.. toctree:: - - archivebox.cli - archivebox.config - archivebox.core - archivebox.extractors - archivebox.index - archivebox.parsers - -Submodules ----------- - -archivebox.main module ----------------------- - -.. automodule:: archivebox.main - :members: - :undoc-members: - :show-inheritance: - -archivebox.manage module ------------------------- - -.. automodule:: archivebox.manage - :members: - :undoc-members: - :show-inheritance: - -archivebox.util module ----------------------- - -.. automodule:: archivebox.util - :members: - :undoc-members: - :show-inheritance: - - -Module contents ---------------- - -.. automodule:: archivebox - :members: - :undoc-members: - :show-inheritance: diff --git a/archivebox/docs/conf.py b/archivebox/docs/conf.py deleted file mode 100644 index 0f459198..00000000 --- a/archivebox/docs/conf.py +++ /dev/null @@ -1,110 +0,0 @@ -# Configuration file for the Sphinx documentation builder. -# -# This file only contains a selection of the most common options. For a full -# list see the documentation: -# http://www.sphinx-doc.org/en/master/config - -# -- Path setup -------------------------------------------------------------- - -# If extensions (or modules to document with autodoc) are in another directory, -# add these directories to sys.path here. If the directory is relative to the -# documentation root, use os.path.abspath to make it absolute, like shown here. -# -import os -import sys -sys.path.insert(0, os.path.abspath('.')) - -import django - -os.environ['USE_CHROME'] = 'False' - -PYTHON_DIR = os.path.abspath(os.path.join(os.path.dirname(os.path.abspath(__file__)), '..')) - -sys.path.insert(0, os.path.abspath('../')) -sys.path.insert(0, os.path.abspath('.')) -os.environ.setdefault("DJANGO_SETTINGS_MODULE", "core.settings") -django.setup() - -VERSION = open(os.path.join(PYTHON_DIR, 'VERSION'), 'r').read().strip() - -# -- Project information ----------------------------------------------------- - -project = 'ArchiveBox' -copyright = '2019, Nick Sweeting' -author = 'Nick Sweeting' - -# The full version, including alpha/beta/rc tags -release = VERSION - - -# -- General configuration --------------------------------------------------- - -# Add any Sphinx extension module names here, as strings. They can be -# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom -# ones. -extensions = [ - 'sphinx.ext.autodoc', - 'sphinx.ext.napoleon', - 'sphinx.ext.viewcode', - # 'sphinxcontrib.blockdiag' - 'recommonmark' -] - -source_suffix = { - '.rst': 'restructuredtext', - '.txt': 'markdown', - '.md': 'markdown', -} -master_doc = 'archivebox' -napoleon_google_docstring = True -napoleon_use_param = True -napoleon_use_ivar = False -napoleon_use_rtype = True -napoleon_include_special_with_doc = False - -# Add any paths that contain templates here, relative to this directory. -templates_path = ['_templates'] - -# 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 = [ - '_build', - 'Thumbs.db', - '.DS_Store', - 'data', - 'output', - 'templates', - 'tests', - 'migrations', -] - - -# -- Options for HTML output ------------------------------------------------- - -# The theme to use for HTML and HTML Help pages. See the documentation for -# a list of builtin themes. -# -github_url = 'https://github.com/pirate/ArchiveBox' -html_logo = '../themes/static/archive.png' -html_theme = 'sphinx_rtd_theme' -html_theme_options = {} - -texinfo_documents = [ - (master_doc, 'archivebox', 'archivebox Documentation', - author, 'archivebox', 'The open-source self-hosted internet archive.', - 'Miscellaneous'), -] - -pygments_style = 'friendly' - -# Add any paths that contain custom static files (such as style sheets) here, -# relative to this directory. They are copied after the builtin static files, -# so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['_static'] - - -man_pages = [ - (master_doc, 'archivebox', 'archivebox Documentation', - [author], 1) -] diff --git a/archivebox/docs/modules.rst b/archivebox/docs/modules.rst deleted file mode 100644 index 2ef953f1..00000000 --- a/archivebox/docs/modules.rst +++ /dev/null @@ -1,7 +0,0 @@ -archivebox -========== - -.. toctree:: - :maxdepth: 4 - - archivebox diff --git a/docs b/docs index d8daa737..f1b6bf67 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit d8daa7373ee39b14db08fa9c6c66f90ff38ed590 +Subproject commit f1b6bf67581e1cb836ab6102f16975b3e83478e6