Combined public and private docs together

doc_update
Joey Hines 2019-12-03 18:10:54 -06:00
parent 42257a1750
commit 38df420552
9 changed files with 115 additions and 357 deletions

View File

@ -1,19 +0,0 @@
# Minimal makefile for Sphinx documentation
#
# You can set these variables from the command line.
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)

View File

@ -1,35 +0,0 @@
@ECHO OFF
pushd %~dp0
REM Command file for Sphinx documentation
if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=source
set BUILDDIR=build
if "%1" == "" goto help
%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.http://sphinx-doc.org/
exit /b 1
)
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
goto end
:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
:end
popd

View File

@ -1,173 +0,0 @@
# -*- coding: utf-8 -*-
#
# Configuration file for the Sphinx documentation builder.
#
# This file does only contain 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('.'))
# -- Project information -----------------------------------------------------
project = 'Geoffrey'
copyright = '2019, ZeroHD'
author = 'ZeroHD'
# The short X.Y version
version = ''
# The full version, including alpha/beta/rc tags
release = '2.0'
# -- General configuration ---------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
#
# needs_sphinx = '1.0'
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
]
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#
# source_suffix = ['.rst', '.md']
source_suffix = '.rst'
# The master toctree document.
master_doc = 'index'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
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 = []
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = None
# -- Options for HTML output -------------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'sphinx_rtd_theme'
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#
# html_theme_options = {}
# 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']
# Custom sidebar templates, must be a dictionary that maps document names
# to template names.
#
# The default sidebars (for documents that don't match any pattern) are
# defined by theme itself. Builtin themes are using these templates by
# default: ``['localtoc.html', 'relations.html', 'sourcelink.html',
# 'searchbox.html']``.
#
# html_sidebars = {}
# -- Options for HTMLHelp output ---------------------------------------------
# Output file base name for HTML help builder.
htmlhelp_basename = 'GeoffreyPublicdoc'
# -- Options for LaTeX output ------------------------------------------------
latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#
# 'papersize': 'letterpaper',
# The font size ('10pt', '11pt' or '12pt').
#
# 'pointsize': '10pt',
# Additional stuff for the LaTeX preamble.
#
# 'preamble': '',
# Latex figure (float) alignment
#
# 'figure_align': 'htbp',
}
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'GeoffreyPublic.tex', 'GeoffreyPublic Documentation',
'ZeroHD', 'manual'),
]
# -- Options for manual page output ------------------------------------------
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'geoffreypublic', 'GeoffreyPublic Documentation',
[author], 1)
]
# -- Options for Texinfo output ----------------------------------------------
# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'GeoffreyPublic', 'GeoffreyPublic Documentation',
author, 'GeoffreyPublic', 'One line description of project.',
'Miscellaneous'),
]
# -- Options for Epub output -------------------------------------------------
# Bibliographic Dublin Core info.
epub_title = project
# The unique identifier of the text. This can be a ISBN number
# or the project homepage.
#
# epub_identifier = ''
# A unique identification for the text.
#
# epub_uid = ''
# A list of files that should not be packed into the epub file.
epub_exclude_files = ['search.html']

View File

@ -1,26 +0,0 @@
.. GeoffreyPublic documentation master file, created by
sphinx-quickstart on Mon Sep 30 12:55:02 2019.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Geoffrey: Minecraft Location Info
=================================
Geoffrey was created to be an information source for bases, shops, towns and other locations on Minecraft severs.
This allows for users to quickly find each other's builds and find shops selling goods either from a discord bot
or a web interface
The Geoffrey Discord bot can be used on a Discord server or in a private message with the bot.
The web interface allows users to easily view location information.
Any feedback should be sent to ZeroHD.
.. toctree::
:maxdepth: 1
:caption: Contents:
getting_started
new_in_2.0

View File

@ -1,103 +0,0 @@
.. _bot_quickstart:
Geoffrey Bot Quickstart
***********************
Geoffrey: A Discord Bot for Minecraft Servers
=============================================
Geoffrey was created to be an information source for base and shop locations on Minecraft severs. The bot mainly tracks
base, shop, and tunnel locations. This allows for users to quickly find each other's builds and find shops selling
goods.
Geoffrey can be used on a Discord server or in a private message with the bot.
Adding a base
-------------
First you must register with the bot if you are a new user::
?register
This allows Geoffrey to link your MC name with your Discord account.
Then you can add your first base::
?add_base 500 550
Your first base does not need a name, it defaults to "[Username]'s Base"
If you want to specify a name::
?add_base 500 550 My New Base
To delete a base::
?delete "My Base"
Adding a shop
-------------
A shop can be added like a base::
?add_shop 500 550
or::
?add_shop 500 550 Cool Shop
The following command then adds dirt to the shop with the price of 5 dirt for 1 diamond::
?add_item Dirt 5 1
Then you could delete that entry by::
?delete_item dirt
To delete a shop::
?delete "My shop"
If you have more than one shop, you need to specify the shop name.
Searching in the database
-------------------------
The ``?find`` command is used to find bases and shops in Geoffrey. ``?find`` searches for both location names and owner names::
?find ZeroHD
Then to find out more info about a location, use ``?info``::
?info ZeroHD's Base
``?selling`` can be used to find items for sale. Tip is better search for a subset of the item name
ig for `enderchests` search `ender`::
?selling ender
You can also search around a position for locations with ``?find_around``::
?find_around 0 0
Editing Locations
-----------------
To rename a base/shop you can do the following (the quotations around the location names are important!)::
?edit_name "Cool New Name" "Current Name"
To move a location's position, use ``?edit_pos``::
?edit_pos 420 69 Cool Base
To change the tunnel of a base, use ``?edit_tunnel``::
?edit_tunnel North 545

View File

@ -0,0 +1,112 @@
.. _geoffrey_setup:
.. |br| raw:: html
<br>
***************
Geoffrey Setup
***************
Requirements
#############
Versions shown have been tested to work
* `Python 3.6.6`_
* `Django 2.1.2`_
* `Requests 2.20.0`_
* `simplejson 3.16.0`_
.. _Python 3.6.6: https://www.python.org/
.. _Django 2.1.2: https://pypi.org/project/Django/
.. _Requests 2.20.0: https://pypi.org/project/requests2/
.. _simplejson 3.16.0: https://pypi.org/project/simplejson/
Setup
#####
.. Note:: Geoffrey is a Django application. To install Geoffrey, you need to have a Django site already setup instructions to do that can be found `here`_
.. _here: https://docs.djangoproject.com/en/2.1/intro/tutorial01/
Installing GeoffreyApp From Source
**********************************
1. Download Geoffrey by cloning it
::
git clone https://git.etztech.xyz/ZeroHD/Geoffrey.git GeoffreyApp
2. Change directories into GeoffreyApp
::
cd GeoffreyApp/
3. Install Geoffrey as a module
::
pip3 install -e .
Integrate Geoffrey Into a Django Project
******************************************
1. In ``settings.py`` add ``GeoffreyApp`` to ``INSTALLED_APPS``
::
INSTALLED_APPS = [
'GeoffreyApp',
...
2. Once installed, run the migrations to setup the database for the first time
::
python manage.py makemigrations
python manage.py migrate
3. Then add the URLs to your projects's ``urls.py``
::
path('GeoffreyApp/', include('GeoffreyApp.urls')),
Setup Settings
**************
To setup your ``settings.py`` for Geoffrey, checkout :ref:`django_settings`
Enable Username Updates
***********************
Minecraft usernames in Geoffrey can be updated using the `update_mc_username` sub-command:
::
python manage.py update_mc_username
To handle username updates automatically, an external scheduling program should be used. Below is an example of how to
do this with a Linux cron job:
.. code-block:: bash
#!/bin/bash
PATH_TO_GEOFFREY_MANAGE=/home/geoffrey/django/manage.py
PATH_TO_VENV=/home/geoffrey/venv
source "$PATH_TO_VENV/bin/activate"
python $PATH_TO_GEOFFREY_MANAGE update_mc_username
deactivate
The above script should be placed in the appropriate `/etc/cron.` directory.

View File

@ -1,4 +1,4 @@
.. _bot_quickstart: .. _getting_started:
Geoffrey Bot Quickstart Geoffrey Bot Quickstart
*********************** ***********************

View File

@ -11,6 +11,8 @@ bases, shops, items for sale, tunnels, towns, public farms and more!
:caption: Contents: :caption: Contents:
getting_started getting_started
new_in_2.0
geoffrey_setup
django_settings django_settings
commands commands
models models