diff --git a/docs/.gitignore b/docs/.gitignore new file mode 100644 index 0000000..ae6e71a --- /dev/null +++ b/docs/.gitignore @@ -0,0 +1,6 @@ +.idea/ +*.iml +target/ +dependency-reduced-pom.xml +build/ +source/.doctrees/ \ No newline at end of file diff --git a/docs/Makefile b/docs/Makefile new file mode 100644 index 0000000..fde8618 --- /dev/null +++ b/docs/Makefile @@ -0,0 +1,20 @@ +# Minimal makefile for Sphinx documentation +# + +# You can set these variables from the command line. +SPHINXOPTS = +SPHINXBUILD = sphinx-build +SPHINXPROJ = MinecraftManager +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) \ No newline at end of file diff --git a/docs/make.bat b/docs/make.bat new file mode 100644 index 0000000..eed4a58 --- /dev/null +++ b/docs/make.bat @@ -0,0 +1,42 @@ +@ECHO OFF + +pushd %~dp0 + +REM Command file for Sphinx documentation + +if "%SPHINXBUILD%" == "" ( + set SPHINXBUILD=sphinx-build +) +set SOURCEDIR=source +set BUILDDIR=build +set SPHINXPROJ=MinecraftManager + +if "%1" == "" goto help +if "%1" == "html" goto clean + +: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.http://sphinx-doc.org/ + exit /b 1 +) + +%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% +goto end + +:help +%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% + +:clean +%SPHINXBUILD% -M clean %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% +goto build + +:end +popd \ No newline at end of file diff --git a/docs/source/_static/favicon.png b/docs/source/_static/favicon.png new file mode 100644 index 0000000..0764cee Binary files /dev/null and b/docs/source/_static/favicon.png differ diff --git a/docs/source/_static/timezones.txt b/docs/source/_static/timezones.txt new file mode 100644 index 0000000..66e09f3 --- /dev/null +++ b/docs/source/_static/timezones.txt @@ -0,0 +1,439 @@ +Africa/Abidjan +Africa/Accra +Africa/Addis_Ababa +Africa/Algiers +Africa/Asmara +Africa/Bamako +Africa/Bangui +Africa/Banjul +Africa/Bissau +Africa/Blantyre +Africa/Brazzaville +Africa/Bujumbura +Africa/Cairo +Africa/Casablanca +Africa/Ceuta +Africa/Conakry +Africa/Dakar +Africa/Dar_es_Salaam +Africa/Djibouti +Africa/Douala +Africa/El_Aaiun +Africa/Freetown +Africa/Gaborone +Africa/Harare +Africa/Johannesburg +Africa/Juba +Africa/Kampala +Africa/Khartoum +Africa/Kigali +Africa/Kinshasa +Africa/Lagos +Africa/Libreville +Africa/Lome +Africa/Luanda +Africa/Lubumbashi +Africa/Lusaka +Africa/Malabo +Africa/Maputo +Africa/Maseru +Africa/Mbabane +Africa/Mogadishu +Africa/Monrovia +Africa/Nairobi +Africa/Ndjamena +Africa/Niamey +Africa/Nouakchott +Africa/Ouagadougou +Africa/Porto-Novo +Africa/Sao_Tome +Africa/Tripoli +Africa/Tunis +Africa/Windhoek +America/Adak +America/Anchorage +America/Anguilla +America/Antigua +America/Araguaina +America/Argentina/Buenos_Aires +America/Argentina/Catamarca +America/Argentina/Cordoba +America/Argentina/Jujuy +America/Argentina/La_Rioja +America/Argentina/Mendoza +America/Argentina/Rio_Gallegos +America/Argentina/Salta +America/Argentina/San_Juan +America/Argentina/San_Luis +America/Argentina/Tucuman +America/Argentina/Ushuaia +America/Aruba +America/Asuncion +America/Atikokan +America/Bahia +America/Bahia_Banderas +America/Barbados +America/Belem +America/Belize +America/Blanc-Sablon +America/Boa_Vista +America/Bogota +America/Boise +America/Cambridge_Bay +America/Campo_Grande +America/Cancun +America/Caracas +America/Cayenne +America/Cayman +America/Chicago +America/Chihuahua +America/Costa_Rica +America/Creston +America/Cuiaba +America/Curacao +America/Danmarkshavn +America/Dawson +America/Dawson_Creek +America/Denver +America/Detroit +America/Dominica +America/Edmonton +America/Eirunepe +America/El_Salvador +America/Fort_Nelson +America/Fortaleza +America/Glace_Bay +America/Godthab +America/Goose_Bay +America/Grand_Turk +America/Grenada +America/Guadeloupe +America/Guatemala +America/Guayaquil +America/Guyana +America/Halifax +America/Havana +America/Hermosillo +America/Indiana/Indianapolis +America/Indiana/Knox +America/Indiana/Marengo +America/Indiana/Petersburg +America/Indiana/Tell_City +America/Indiana/Vevay +America/Indiana/Vincennes +America/Indiana/Winamac +America/Inuvik +America/Iqaluit +America/Jamaica +America/Juneau +America/Kentucky/Louisville +America/Kentucky/Monticello +America/Kralendijk +America/La_Paz +America/Lima +America/Los_Angeles +America/Lower_Princes +America/Maceio +America/Managua +America/Manaus +America/Marigot +America/Martinique +America/Matamoros +America/Mazatlan +America/Menominee +America/Merida +America/Metlakatla +America/Mexico_City +America/Miquelon +America/Moncton +America/Monterrey +America/Montevideo +America/Montserrat +America/Nassau +America/New_York +America/Nipigon +America/Nome +America/Noronha +America/North_Dakota/Beulah +America/North_Dakota/Center +America/North_Dakota/New_Salem +America/Ojinaga +America/Panama +America/Pangnirtung +America/Paramaribo +America/Phoenix +America/Port-au-Prince +America/Port_of_Spain +America/Porto_Velho +America/Puerto_Rico +America/Punta_Arenas +America/Rainy_River +America/Rankin_Inlet +America/Recife +America/Regina +America/Resolute +America/Rio_Branco +America/Santarem +America/Santiago +America/Santo_Domingo +America/Sao_Paulo +America/Scoresbysund +America/Sitka +America/St_Barthelemy +America/St_Johns +America/St_Kitts +America/St_Lucia +America/St_Thomas +America/St_Vincent +America/Swift_Current +America/Tegucigalpa +America/Thule +America/Thunder_Bay +America/Tijuana +America/Toronto +America/Tortola +America/Vancouver +America/Whitehorse +America/Winnipeg +America/Yakutat +America/Yellowknife +Antarctica/Casey +Antarctica/Davis +Antarctica/DumontDUrville +Antarctica/Macquarie +Antarctica/Mawson +Antarctica/McMurdo +Antarctica/Palmer +Antarctica/Rothera +Antarctica/Syowa +Antarctica/Troll +Antarctica/Vostok +Arctic/Longyearbyen +Asia/Aden +Asia/Almaty +Asia/Amman +Asia/Anadyr +Asia/Aqtau +Asia/Aqtobe +Asia/Ashgabat +Asia/Atyrau +Asia/Baghdad +Asia/Bahrain +Asia/Baku +Asia/Bangkok +Asia/Barnaul +Asia/Beirut +Asia/Bishkek +Asia/Brunei +Asia/Chita +Asia/Choibalsan +Asia/Colombo +Asia/Damascus +Asia/Dhaka +Asia/Dili +Asia/Dubai +Asia/Dushanbe +Asia/Famagusta +Asia/Gaza +Asia/Hebron +Asia/Ho_Chi_Minh +Asia/Hong_Kong +Asia/Hovd +Asia/Irkutsk +Asia/Jakarta +Asia/Jayapura +Asia/Jerusalem +Asia/Kabul +Asia/Kamchatka +Asia/Karachi +Asia/Kathmandu +Asia/Khandyga +Asia/Kolkata +Asia/Krasnoyarsk +Asia/Kuala_Lumpur +Asia/Kuching +Asia/Kuwait +Asia/Macau +Asia/Magadan +Asia/Makassar +Asia/Manila +Asia/Muscat +Asia/Nicosia +Asia/Novokuznetsk +Asia/Novosibirsk +Asia/Omsk +Asia/Oral +Asia/Phnom_Penh +Asia/Pontianak +Asia/Pyongyang +Asia/Qatar +Asia/Qyzylorda +Asia/Riyadh +Asia/Sakhalin +Asia/Samarkand +Asia/Seoul +Asia/Shanghai +Asia/Singapore +Asia/Srednekolymsk +Asia/Taipei +Asia/Tashkent +Asia/Tbilisi +Asia/Tehran +Asia/Thimphu +Asia/Tokyo +Asia/Tomsk +Asia/Ulaanbaatar +Asia/Urumqi +Asia/Ust-Nera +Asia/Vientiane +Asia/Vladivostok +Asia/Yakutsk +Asia/Yangon +Asia/Yekaterinburg +Asia/Yerevan +Atlantic/Azores +Atlantic/Bermuda +Atlantic/Canary +Atlantic/Cape_Verde +Atlantic/Faroe +Atlantic/Madeira +Atlantic/Reykjavik +Atlantic/South_Georgia +Atlantic/St_Helena +Atlantic/Stanley +Australia/Adelaide +Australia/Brisbane +Australia/Broken_Hill +Australia/Currie +Australia/Darwin +Australia/Eucla +Australia/Hobart +Australia/Lindeman +Australia/Lord_Howe +Australia/Melbourne +Australia/Perth +Australia/Sydney +Canada/Atlantic +Canada/Central +Canada/Eastern +Canada/Mountain +Canada/Newfoundland +Canada/Pacific +Europe/Amsterdam +Europe/Andorra +Europe/Astrakhan +Europe/Athens +Europe/Belgrade +Europe/Berlin +Europe/Bratislava +Europe/Brussels +Europe/Bucharest +Europe/Budapest +Europe/Busingen +Europe/Chisinau +Europe/Copenhagen +Europe/Dublin +Europe/Gibraltar +Europe/Guernsey +Europe/Helsinki +Europe/Isle_of_Man +Europe/Istanbul +Europe/Jersey +Europe/Kaliningrad +Europe/Kiev +Europe/Kirov +Europe/Lisbon +Europe/Ljubljana +Europe/London +Europe/Luxembourg +Europe/Madrid +Europe/Malta +Europe/Mariehamn +Europe/Minsk +Europe/Monaco +Europe/Moscow +Europe/Oslo +Europe/Paris +Europe/Podgorica +Europe/Prague +Europe/Riga +Europe/Rome +Europe/Samara +Europe/San_Marino +Europe/Sarajevo +Europe/Saratov +Europe/Simferopol +Europe/Skopje +Europe/Sofia +Europe/Stockholm +Europe/Tallinn +Europe/Tirane +Europe/Ulyanovsk +Europe/Uzhgorod +Europe/Vaduz +Europe/Vatican +Europe/Vienna +Europe/Vilnius +Europe/Volgograd +Europe/Warsaw +Europe/Zagreb +Europe/Zaporozhye +Europe/Zurich +GMT +Indian/Antananarivo +Indian/Chagos +Indian/Christmas +Indian/Cocos +Indian/Comoro +Indian/Kerguelen +Indian/Mahe +Indian/Maldives +Indian/Mauritius +Indian/Mayotte +Indian/Reunion +Pacific/Apia +Pacific/Auckland +Pacific/Bougainville +Pacific/Chatham +Pacific/Chuuk +Pacific/Easter +Pacific/Efate +Pacific/Enderbury +Pacific/Fakaofo +Pacific/Fiji +Pacific/Funafuti +Pacific/Galapagos +Pacific/Gambier +Pacific/Guadalcanal +Pacific/Guam +Pacific/Honolulu +Pacific/Kiritimati +Pacific/Kosrae +Pacific/Kwajalein +Pacific/Majuro +Pacific/Marquesas +Pacific/Midway +Pacific/Nauru +Pacific/Niue +Pacific/Norfolk +Pacific/Noumea +Pacific/Pago_Pago +Pacific/Palau +Pacific/Pitcairn +Pacific/Pohnpei +Pacific/Port_Moresby +Pacific/Rarotonga +Pacific/Saipan +Pacific/Tahiti +Pacific/Tarawa +Pacific/Tongatapu +Pacific/Wake +Pacific/Wallis +US/Alaska +US/Arizona +US/Central +US/Eastern +US/Hawaii +US/Mountain +US/Pacific +UTC \ No newline at end of file diff --git a/docs/source/api.rst b/docs/source/api.rst new file mode 100644 index 0000000..3613d3a --- /dev/null +++ b/docs/source/api.rst @@ -0,0 +1,45 @@ +.. include:: common.rst + +.. _api: + +API Usage +========= + + +Model API +--------- + +.. warning:: + You will need to pass the API password with any request in order for the API to respond. |br| + The API will only respond to an authenticated user or a request containing the correct API password. |br| + Send the password with the key ``api`` + +The model API is used to query any of the :ref:`models` and get back results in a JSON format. + +.. note:: + This assumes that your base API URL is http://localhost:8000/api/\. |br| + Your URL may be something like \http://www.yoursite.com/mcm/api/. + +You can include any Django filters_ as GET parameters to filter your search. + +.. _filters: https://docs.djangoproject.com/en/2.0/ref/models/querysets/#id4 + + +Sample Queries +~~~~~~~~~~~~~~ + +Querying applications with the word ``test`` in the username. +:: + + http://localhost:8000/api/model/application/?username__icontains=test + +Querying applications whose age is over ``20``. +:: + + http://localhost:8000/api/model/application/?age__gt=20 + + +Querying tickets sent in by ``Etzelia``. +:: + + http://localhost:8000/api/model/ticket/?player__username=Etzelia \ No newline at end of file diff --git a/docs/source/common.rst b/docs/source/common.rst new file mode 100644 index 0000000..71f9e4d --- /dev/null +++ b/docs/source/common.rst @@ -0,0 +1,3 @@ +.. |br| raw:: html + +
\ No newline at end of file diff --git a/docs/source/conf.py b/docs/source/conf.py new file mode 100644 index 0000000..7fcf1b0 --- /dev/null +++ b/docs/source/conf.py @@ -0,0 +1,170 @@ +# -*- 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. +# + + +# -- Project information ----------------------------------------------------- + +project = 'Minecraft Manager' +copyright = '2018, Etzelia' +author = 'Etzelia' + +# The short X.Y version +version = '1.0' +# The full version, including alpha/beta/rc tags +release = '1.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 = [ + 'sphinx.ext.doctest', + 'sphinx.ext.todo', + 'sphinx.ext.coverage', + 'sphinx.ext.ifconfig', + 'sphinx.ext.autodoc', +] + +# 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' + +html_show_sourcelink = False + +# 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 = ['common.rst', 'template.rst'] + +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = 'sphinx' + + +# -- 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' + +# Path to the favicon +html_favicon = '_static/favicon.png' + +# 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 = [] + +# 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 = 'MinecraftManagerdoc' + + +# -- 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, 'MinecraftManager.tex', 'Minecraft Manager Documentation', + 'Etzelia', '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, 'minecraftmanager', 'Minecraft Manager 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, 'MinecraftManager', 'Minecraft Manager Documentation', + author, 'MinecraftManager', 'One line description of project.', + 'Miscellaneous'), +] + + +# -- Extension configuration ------------------------------------------------- + +# -- Options for todo extension ---------------------------------------------- + +# If true, `todo` and `todoList` produce output, else they produce nothing. +todo_include_todos = True \ No newline at end of file diff --git a/docs/source/django-settings.rst b/docs/source/django-settings.rst new file mode 100644 index 0000000..387b2b5 --- /dev/null +++ b/docs/source/django-settings.rst @@ -0,0 +1,64 @@ +.. include:: common.rst + +.. _django-settings: + +Django Settings +=============== + +Required +-------- + +``MINECRAFT_BASE_DIR`` - The base location of your Spigot server. (The one with your server.jar) + +``MCM_BASE_LINK`` - The base URL to your whitelist. e.g. http://localhost:8000/whitelist/ + +---- + +Optional +-------- + +``WINDOW_TITLE`` - The title of all MCM web app windows. + +``DASHBOARD_TITLE`` - The header of the dashboard (probably the name of your server). + +``BOT_DIR`` - The path to your bot directory. + +``DISCORD_NOTIFICATION_WEBHOOK`` - The URL for the webhook used for notifications. + +``DISCORD_PING_LIST`` - A list of Discord Role IDs to ping whenever certain messages are sent. + +``DISCORD_MCM_WEBHOOK`` - The URL for the webhook used for Applications, Tickets, and Warnings. + +``DISCORD_INVITE`` - The invite code to your Discord, for after a player applies on the web form. + +``DYNMAP_URL`` - The URL to your dynmap if you have one. Leave blank if you'd rather use a static background for web forms. + +``DYNMAP_STATIC_URL`` - The URL to your static dynmap if you have one. + +``WORLD`` - The name of your overworld. This is used by dynmap as well as statistics. + +``WORLD_BORDER`` - The size of your world border. Used to generate a random location on the dynmap if used. + +``PLUGIN_PORT`` - The port that's set in your plugin's config.yml + +``GLOBAL_LOG`` - The path to your global chat log file. Assuming a normal install: os.path.join(MINECRAFT_BASE_DIR, 'plugins/MinecraftManager/logs/global.log') + +``STAFF_LOG`` - The path to your staff chat log file. Assuming a normal install: os.path.join(MINECRAFT_BASE_DIR, 'plugins/MinecraftManager/logs/staff.log') + +``SERVER_QUERY_IP`` - The full IP (and port) used to query your server. (This is used to get a player list) + +``API_PASSWORD`` - The password used to validate API requests from unauthenticated sources. + +``COREPROTECT_WEB_URL`` - The URL to your CoreProtect Web UI, if it exists. + +``COREPROTECT_ACTIVITY_URL`` - The URL to your CoreProtect Activity Web UI, if it exists. + +``DISCORD_BOT_TOKEN`` - The token to use to run the Discord bot. This must be generated by you in the Discord developer area. + +``DISCORD_BOT_PREFIX`` - The prefix to use for Discord bot commands. Set to ``!`` by default. + +``DISCORD_BOT_ROLES`` - A list of Discord Roles allowed to use the bot. If this list is empty, no one can use the bot! + +``CAPTCHA_SECRET`` - Your secret key used for reCAPTCHA + +``STATS_FILTER`` - A python list of partial strings used to filter out stats. e.g. ``['broken', 'dropped', 'picked_up']`` to filter out broken, dropped and picked up stats \ No newline at end of file diff --git a/docs/source/faq.rst b/docs/source/faq.rst new file mode 100644 index 0000000..69d7718 --- /dev/null +++ b/docs/source/faq.rst @@ -0,0 +1,45 @@ +.. include:: common.rst + +.. _faq: + +FAQ +=== + + +What is Minecraft Manager? +-------------------------- + +Minecraft Manager (MCM) is the second iteration of the Whitelist application used by the 24CarrotCraft survival server. + +It was primarily developed for this server, though it is now in use for other servers controlled by the same owners, such as 24CreativeCraft. + +All source code for the plugin and web application were created by Etzelia. + + +This looks the same as the Whitelist app....what's different? +------------------------------------------------------------- + +The changes for this are largely under the hood. That is, you *shouldn't* notice a big difference. One of the major things is that this is re-written to be portable. + +When we first launched 24CreativeCraft, for example, copying the Whitelist application and changing hard-coded values was a nightmare. Now, we simply start a new Django project and import this app, change a handful of settings and run. + + +How will this affect me in Discord? +----------------------------------- + +24-Karat-Bot will not be going away, however it **will** lose some functionality, such as application processing. Applications will now be processed through MCM via a different built-in bot. + +Applications and Tickets are now using embeds, so they look far more polished than the plain-text versions you might be used to. + + +How will this affect me in-game? +-------------------------------- + +.. note:: + There are some command changes as well. See the plugin doc's commands page for more details. + +Probably another of the largest reasons this project was started, there is now a companion plugin shipped with MCM. + +Previously, all in-game integrations to the Whitelist application were done through a third-party plugin called `Skript `_. This caused a few cascading effects, most notably numerous failed applications. Since Skript allows scripting using its pseudo-language, it has the unfortunate side effect of being hard to make the code do exactly what you want all the time. + +With the inclusion of a hand-made plugin, MCM now has 100% control over its data flow. \ No newline at end of file diff --git a/docs/source/getting-started.rst b/docs/source/getting-started.rst new file mode 100644 index 0000000..4cd9d2f --- /dev/null +++ b/docs/source/getting-started.rst @@ -0,0 +1,25 @@ +.. include:: common.rst + +.. _getting-started: + +Getting Started +=============== + +Start A Django Project +---------------------- + +First, you will need a working Django project. Instructions on how to set one up can be found on Django's website_. + +.. _website: https://docs.djangoproject.com/en/2.0/intro/install/ + +Once you have a working Django project, you will need to install Minecraft Manager. + + + +Installation +------------ + +Install Minecraft Manager with pip. +:: + + pip install minecraft-manager-1.0.tar.gz \ No newline at end of file diff --git a/docs/source/index.rst b/docs/source/index.rst new file mode 100644 index 0000000..1bbd083 --- /dev/null +++ b/docs/source/index.rst @@ -0,0 +1,13 @@ +.. include:: common.rst + +Home +==== + +.. toctree:: + :maxdepth: 1 + + faq + getting-started + django-settings + models + api \ No newline at end of file diff --git a/docs/source/models.rst b/docs/source/models.rst new file mode 100644 index 0000000..912d06d --- /dev/null +++ b/docs/source/models.rst @@ -0,0 +1,224 @@ +.. include:: common.rst + +.. _models: + +MCM Models +========== + + +User +---- + +.. note:: + This is not specific to MCM. This model cannot be queried. |br| + It is only here because it can be used to filter other models that use it as a foreign key. + +Fields can be found on the official Django docs_. + +.. _docs: https://docs.djangoproject.com/en/2.0/ref/contrib/auth/#user-model + +---- + +User Settings +------------- + +.. note:: + When querying, there is no space. It is UserSettings. + +Results +~~~~~~~ + + ``10`` - 10 + + ``25`` - 25 + + ``50`` - 50 + + ``100`` - 100 + + ``-1`` - All + +Themes +~~~~~~ + + ``DE`` - Default + + ``DA`` - Dark + + ``SO`` - Solar + + ``SL`` - Slate + +Timezones +~~~~~~~~~ + + :download:`Any timezone in this list. <_static/timezones.txt>` + +``auth_user`` - User_ + +``default_results`` - Results_ + +``default_theme`` - Themes_ + +``default_timezone`` - Timezones_ + +``search_player_ip`` - Boolean + +``show_timestamp_chat`` - Boolean + +``last_ip`` - Text + +---- + +Application +----------- + +``username`` - Text + +``age`` - Integer + +``player_type`` - Test + +``ever_banned`` - Boolean + +``ever_banned_explanation`` - Text + +``reference`` - Text + +``read_rules`` - Text + +``accepted`` - Boolean (can be null as well) + +``date`` - DateTime + +---- + +Player +------ + +``auth_user`` - User_ + +``uuid`` - Text + +``username`` - Text + +``application`` - Application_ + +``first_seen`` - DateTime + +``last_seen`` - DateTime + +---- + +Ticket +------ + +Priority +~~~~~~~~ + + ``L`` - Low + + ``M`` - Medium + + ``H`` - High + +Worlds +~~~~~~ + + ``O`` - Overworld + + ``N`` - The Nether + + ``E`` - The End + +``player`` - Player_ + +``message`` - Text + +``priority`` - Priority_ + +``staff`` - User_ + +``resolved`` - Boolean + +``world`` - Worlds_ + +``x`` - Text (in Integer format) + +``y`` - Text (in Integer format) + +``z`` - Text (in Integer format) + +``date`` - DateTime + +---- + +Warning +------- + +Severity +~~~~~~~~ + + ``L`` - Low + + ``M`` - Medium + + ``H`` - High + +``player`` - Player_ + +``message`` - Text + +``severity`` - Severity_ + +``staff`` - User_ + +``date`` - DateTime + +---- + +IP +-- + +``player`` - Player_ + +``ip`` - Text + +---- + +Alert +----- + +``user`` - User_ + +``message`` - Text + +``seen`` - Boolean + +``date`` - DateTime + +---- + +Note +---- + +Notable +~~~~~~~ + + ``PL`` - Player Table + + ``TI`` - Ticket Table + + ``WA`` - Warning Table + +``author`` - User_ + +``ref_table`` - Notable_ + +``ref_id`` - Text (the ID of the row in the ``ref_table``) + +``message`` - Text + +``last_update`` - DateTime + +``date`` - DateTime \ No newline at end of file diff --git a/docs/source/template.rst b/docs/source/template.rst new file mode 100644 index 0000000..42fa06b --- /dev/null +++ b/docs/source/template.rst @@ -0,0 +1,9 @@ +.. include:: common.rst + +.. _template: + +Title +===== + +Header +------