aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/Makefile20
-rw-r--r--docs/conf.py35
-rw-r--r--docs/index.rst61
-rw-r--r--docs/make.bat35
4 files changed, 151 insertions, 0 deletions
diff --git a/docs/Makefile b/docs/Makefile
new file mode 100644
index 0000000..d4bb2cb
--- /dev/null
+++ b/docs/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 = .
+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/docs/conf.py b/docs/conf.py
new file mode 100644
index 0000000..a851995
--- /dev/null
+++ b/docs/conf.py
@@ -0,0 +1,35 @@
+import sys
+import pathlib
+
+sys.path.append(str(pathlib.PurePath(__file__).parent.parent.joinpath('src')))
+print(sys.path)
+
+
+# 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 = 'bbss.py'
+copyright = '2023, Aleteoryx'
+author = 'Aleteoryx'
+release = '0.1.0'
+
+# -- General configuration ---------------------------------------------------
+# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
+
+extensions = ['sphinx.ext.autodoc']
+
+templates_path = ['_templates']
+exclude_patterns = ['*~']
+
+autodoc_default_options = { "members": None }
+
+# -- Options for HTML output -------------------------------------------------
+# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
+
+html_theme = 'sphinxdoc'
+html_static_path = ['_static']
diff --git a/docs/index.rst b/docs/index.rst
new file mode 100644
index 0000000..ec56a5d
--- /dev/null
+++ b/docs/index.rst
@@ -0,0 +1,61 @@
+.. bbss.py documentation master file, created by
+ sphinx-quickstart on Tue Dec 5 20:26:05 2023.
+ You can adapt this file completely to your liking, but it should at least
+ contain the root `toctree` directive.
+
+.. role:: python(code)
+ :language: python
+
+=======
+bbss.py
+=======
+
+For more information on BBSS itself, look `here <https://forum.melonland.net/index.php?topic=2047.0>`_.
+This is a simple python module to allow for quickly scraping or exploring BBSS directories on sites.
+
+bbss.site
+=========
+
+.. py:module:: bbss.site
+
+.. py:class:: Site(domain: str[, path: str[, *, scheme: str = 'https']])
+
+ `domain`
+ The domain to check for BBSS files
+
+ `path`
+ An optional subdirectory to treat as the root of the BBSS directory
+
+ `scheme`
+ What protocol to download over; can be either :python:`'http'` or :python:`'https'`
+
+ A representation of some BBSS directory. On construction, all information about an individual site
+ is downloaded.
+
+ .. py:attribute:: default_path
+ :type: bool
+
+ Whether the site was generated from a default directory, or a user-supplied one
+
+ .. py:attribute:: has_sizes_txt
+ :type: bool
+
+ Whether the BBSS directory contains a :code:`sizes.txt` file
+
+ .. py:attribute:: sizes
+ :type: bbss.sizes.SizeListFile
+
+ A list of the sizes found at the site
+
+ .. py:attribute:: friends
+ :type: Optional[bbss.friends.FriendListFile]
+
+ A list of friend sites found at the site
+
+==================
+Indices and tables
+==================
+
+* :ref:`genindex`
+* :ref:`modindex`
+* :ref:`search`
diff --git a/docs/make.bat b/docs/make.bat
new file mode 100644
index 0000000..32bb245
--- /dev/null
+++ b/docs/make.bat
@@ -0,0 +1,35 @@
+@ECHO OFF
+
+pushd %~dp0
+
+REM Command file for Sphinx documentation
+
+if "%SPHINXBUILD%" == "" (
+ set SPHINXBUILD=sphinx-build
+)
+set SOURCEDIR=.
+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