From ee1df6970726b805aeb5b4cf0d6457a64214cbc3 Mon Sep 17 00:00:00 2001
From: Evennia docbuilder action
# settings.py MySQL DB configuration
-echo Configuring Game Database...
-echo "" >> "$CONFIG"
-echo "######################################################################" >> "$CONFIG"
-echo "# MySQL Database Configuration" >> "$CONFIG"
-echo "######################################################################" >> "$CONFIG"
+echo Configuring Game Database...
+echo "" >> "$CONFIG"
+echo "######################################################################" >> "$CONFIG"
+echo "# MySQL Database Configuration" >> "$CONFIG"
+echo "######################################################################" >> "$CONFIG"
-echo "DATABASES = {" >> "$CONFIG"
-echo " 'default': {" >> "$CONFIG"
-echo " 'ENGINE': 'django.db.backends.mysql'," >> "$CONFIG"
-echo " 'OPTIONS': {" >> "$CONFIG"
-echo " 'read_default_file': 'server/conf/my.cnf'," >> "$CONFIG"
-echo " }," >> "$CONFIG"
-echo " }" >> "$CONFIG"
-echo "}" >> "$CONFIG"
+echo "DATABASES = {" >> "$CONFIG"
+echo " 'default': {" >> "$CONFIG"
+echo " 'ENGINE': 'django.db.backends.mysql'," >> "$CONFIG"
+echo " 'OPTIONS': {" >> "$CONFIG"
+echo " 'read_default_file': 'server/conf/my.cnf'," >> "$CONFIG"
+echo " }," >> "$CONFIG"
+echo " }" >> "$CONFIG"
+echo "}" >> "$CONFIG"
# Create the My.CNF file.
-echo "[client]" >> "$MYCONF"
-echo "database = %mysql.db%" >> "$MYCONF"
-echo "user = %mysql.user%" >> "$MYCONF"
-echo "password = %mysql.pass%" >> "$MYCONF"
-echo "default-character-set = utf8" >> "$MYCONF"
+echo "[client]" >> "$MYCONF"
+echo "database = %mysql.db%" >> "$MYCONF"
+echo "user = %mysql.user%" >> "$MYCONF"
+echo "password = %mysql.pass%" >> "$MYCONF"
+echo "default-character-set = utf8" >> "$MYCONF"
If you look at the parameters side of the page after saving this script, you’ll notice that some new @@ -193,15 +193,15 @@ step to your game dir.
LOGDIR="server/logs" -. %evenv.dir%/bin/activate +. %evenv.dir%/bin/activate # Check that the logs directory exists. -if [ ! -d "$LOGDIR" ]; then - # Control will enter here if $LOGDIR doesn't exist. - mkdir "$LOGDIR" +if [ ! -d "$LOGDIR" ]; then + # Control will enter here if $LOGDIR doesn't exist. + mkdir "$LOGDIR" fi -evennia makemigrations +evennia makemigrationsCreate yet another build step, this time named: “Execute Database Migration”: @@ -209,18 +209,18 @@ If you’re using Sqlite3 for your game (default database), it’s prudent to ch step to your game dir.
#!/bin/bash
# Apply the database migration.
-
+
LOGDIR="server/logs"
-
-. %evenv.dir%/bin/activate
-
+
+. %evenv.dir%/bin/activate
+
# Check that the logs directory exists.
-if [ ! -d "$LOGDIR" ]; then
- # Control will enter here if $LOGDIR doesn't exist.
- mkdir "$LOGDIR"
+if [ ! -d "$LOGDIR" ]; then
+ # Control will enter here if $LOGDIR doesn't exist.
+ mkdir "$LOGDIR"
fi
-
-evennia migrate
+
+evennia migrate
Our next build step is where we actually publish our build. Up until now, all work on game has been @@ -230,18 +230,18 @@ to where our game actually exists on the local server.
the Database Migration steps. The build order will matter!#!/bin/bash
# Publishes the build to the proper build directory.
-
+
DIRECTORY="<game_dir>"
-
-if [ ! -d "$DIRECTORY" ]; then
- # Control will enter here if $DIRECTORY doesn't exist.
- mkdir "$DIRECTORY"
+
+if [ ! -d "$DIRECTORY" ]; then
+ # Control will enter here if $DIRECTORY doesn't exist.
+ mkdir "$DIRECTORY"
fi
-
+
# Copy all the files.
-cp -ruv %teamcity.build.checkoutDir%/* "$DIRECTORY"
-chmod -R 775 "$DIRECTORY"
-
+cp -ruv %teamcity.build.checkoutDir%/* "$DIRECTORY"
+chmod -R 775 "$DIRECTORY"
+
Finally the last script will reload our game for us.
@@ -253,18 +253,18 @@ The working directory on this build step will be:LOGDIR="server/logs"
PIDDIR="server/server.pid"
-. %evenv.dir%/bin/activate
+. %evenv.dir%/bin/activate
# Check that the logs directory exists.
-if [ ! -d "$LOGDIR" ]; then
- # Control will enter here if $LOGDIR doesn't exist.
- mkdir "$LOGDIR"
+if [ ! -d "$LOGDIR" ]; then
+ # Control will enter here if $LOGDIR doesn't exist.
+ mkdir "$LOGDIR"
fi
# Check that the server is running.
-if [ -d "$PIDDIR" ]; then
- # Control will enter here if the game is running.
- evennia reload
+if [ -d "$PIDDIR" ]; then
+ # Control will enter here if the game is running.
+ evennia reload
fi
diff --git a/docs/1.0/Coding/Continuous-Integration-Travis.html b/docs/1.0/Coding/Continuous-Integration-Travis.html
index 79d18c3068..eaf46705fe 100644
--- a/docs/1.0/Coding/Continuous-Integration-Travis.html
+++ b/docs/1.0/Coding/Continuous-Integration-Travis.html
@@ -108,17 +108,17 @@ need to set up yourself is a Travis config file named language: python
-python:
- - "3.10"
-install:
- - git clone https://github.com/evennia/evennia.git
- - cd evennia
- - pip install -e .
- - cd $TRAVIS_BUILD_DIR
-script:
- - evennia migrate
- - evennia test --settings settings.py .
+language: python
+python:
+ - "3.10"
+install:
+ - git clone https://github.com/evennia/evennia.git
+ - cd evennia
+ - pip install -e .
+ - cd $TRAVIS_BUILD_DIR
+script:
+ - evennia migrate
+ - evennia test --settings settings.py .
This will tell travis how to download Evennia, install it, set up a database and then run
diff --git a/docs/1.0/Coding/Debugging.html b/docs/1.0/Coding/Debugging.html
index 2e01b7490b..af8a65d41b 100644
--- a/docs/1.0/Coding/Debugging.html
+++ b/docs/1.0/Coding/Debugging.html
@@ -151,7 +151,7 @@ default cmdset. Then restart Evennia in interactive mode with class CmdTest(Command):
- """
+ """
A test command just to test pdb.
Usage:
diff --git a/docs/1.0/Coding/Evennia-Code-Style.html b/docs/1.0/Coding/Evennia-Code-Style.html
index 5b51de522b..9a3028c0c1 100644
--- a/docs/1.0/Coding/Evennia-Code-Style.html
+++ b/docs/1.0/Coding/Evennia-Code-Style.html
@@ -189,7 +189,7 @@ important methods, this tends to be hard to keep updated as the API
develops. Don’t use section markers (#, ## etc).
Example of class docstring:
class MyClass(object):
- """
+ """
This class describes the creation of `Objects`. It is useful
in many situations, such as ...
@@ -202,7 +202,7 @@ develops. Don’t use section markers (
def funcname(a, b, c, d=False, **kwargs):
- """
+ """
This is a brief introduction to the function/class/method
Args:
@@ -237,7 +237,7 @@ an indent. When you need to break a line you should start the next line
with another indent. For consistency with the code we recommend all
indents to be 4 spaces wide (no tabs!).
Here are all the supported block headers:
- """
+ """
Args
argname (freeform type): Description endind with period.
Keyword Args:
@@ -290,7 +290,7 @@ docstrings to represent the in-game help entry for that command.
formatted on a similar form. For contribs, this is loosened, but if there is
no particular reason to use a different form, one should aim to use the same
style for contrib-command docstrings as well.
- """
+ """
Short header
Usage:
@@ -317,7 +317,7 @@ will come out as a single The Switches and Examples blocks are optional and based on the Command.
Here is the nick command as an example:
- """
+ """
Define a personal alias/nick
Usage:
diff --git a/docs/1.0/Coding/Soft-Code.html b/docs/1.0/Coding/Soft-Code.html
index c57d5aa6d1..810ac44053 100644
--- a/docs/1.0/Coding/Soft-Code.html
+++ b/docs/1.0/Coding/Soft-Code.html
@@ -117,19 +117,19 @@ or more which is obviously not very readable nor (easily) maintainable over time
Examples of Softcode¶
Here is a simple ‘Hello World!’ command:
- @set me=HELLO_WORLD.C:$hello:@pemit %#=Hello World!
+ @set me=HELLO_WORLD.C:$hello:@pemit %#=Hello World!
Pasting this into a MUX/MUSH and typing ‘hello’ will theoretically yield ‘Hello World!’, assuming
certain flags are not set on your account object.
Setting attributes is done via @set. Softcode also allows the use of the ampersand (&) symbol.
This shorter version looks like this:
- &HELLO_WORLD.C me=$hello:@pemit %#=Hello World!
+ &HELLO_WORLD.C me=$hello:@pemit %#=Hello World!
Perhaps I want to break the Hello World into an attribute which is retrieved when emitting:
- &HELLO_VALUE.D me=Hello World
- &HELLO_WORLD.C me=$hello:@pemit %#=[v(HELLO_VALUE.D)]
+ &HELLO_VALUE.D me=Hello World
+ &HELLO_WORLD.C me=$hello:@pemit %#=[v(HELLO_VALUE.D)]
The v() function returns the HELLO_VALUE.D attribute on the object that the command resides
diff --git a/docs/1.0/Coding/Unit-Testing.html b/docs/1.0/Coding/Unit-Testing.html
index 2d7bf15d64..9d29322934 100644
--- a/docs/1.0/Coding/Unit-Testing.html
+++ b/docs/1.0/Coding/Unit-Testing.html
@@ -184,21 +184,21 @@ and want to test a function in "This tests a function myfunc."
def setUp(self):
- """done before every of the test_ * methods below"""
+ """done before every of the test_ * methods below"""
self.obj = create_object("mytestobject")
def tearDown(self):
- """done after every test_* method below """
+ """done after every test_* method below """
self.obj.delete()
def test_return_value(self):
- """test method. Makes sure return value is as expected."""
+ """test method. Makes sure return value is as expected."""
actual_return = myfunc(self.obj)
expected_return = "This is the good object 'mytestobject'."
# test
self.assertEqual(expected_return, actual_return)
def test_alternative_call(self):
- """test method. Calls with a keyword argument."""
+ """test method. Calls with a keyword argument."""
actual_return = myfunc(self.obj, bad=True)
expected_return = "This is the baaad object 'mytestobject'."
# test
@@ -265,13 +265,13 @@ just there for naming symmetry with <
from evennia.utils.test_resources import EvenniaTest
class TestObject(EvenniaTest):
- """Remember that the testing class creates char1 and char2 inside room1 ..."""
+ """Remember that the testing class creates char1 and char2 inside room1 ..."""
def test_object_search_character(self):
- """Check that char1 can search for char2 by name"""
+ """Check that char1 can search for char2 by name"""
self.assertEqual(self.char1.search(self.char2.key), self.char2)
def test_location_search(self):
- """Check so that char1 can find the current location by name"""
+ """Check so that char1 can find the current location by name"""
self.assertEqual(self.char1.search(self.char1.location.key), self.char1.location)
# ...
diff --git a/docs/1.0/Coding/Version-Control.html b/docs/1.0/Coding/Version-Control.html
index aba0aa5902..21c7f294d5 100644
--- a/docs/1.0/Coding/Version-Control.html
+++ b/docs/1.0/Coding/Version-Control.html
@@ -449,9 +449,9 @@ This is a formal request for upstream Evennia to adopt and pull your code into t
Getting 403: Forbidden access¶
Some users have experienced this on git push to their remote repository. They are not asked for username/password (and don’t have a ssh key set up).
Some users have reported that the workaround is to create a file .netrc under your home directory and add your github credentials there:
-machine github.com
-login <my_github_username>
-password <my_github_password>
+machine github.com
+login <my_github_username>
+password <my_github_password>
diff --git a/docs/1.0/Components/Attributes.html b/docs/1.0/Components/Attributes.html
index fe166280e1..e730fad3b1 100644
--- a/docs/1.0/Components/Attributes.html
+++ b/docs/1.0/Components/Attributes.html
@@ -497,12 +497,12 @@ serialize the db-objects you want to store.
self.mydbobj = mydbobj
def __serialize_dbobjs__(self):
- """This is called before serialization and allows
+ """This is called before serialization and allows
us to custom-handle those 'hidden' dbobjs"""
self.mydbobj = dbserialize.dbserialize(self.mydbobj
def __deserialize_dbobjs__(self):
- """This is called after deserialization and allows you to
+ """This is called after deserialization and allows you to
restore the 'hidden' dbobjs you serialized before"""
if isinstance(self.mydbobj, bytes):
# make sure to check if it's bytes before trying dbunserialize
diff --git a/docs/1.0/Components/Batch-Command-Processor.html b/docs/1.0/Components/Batch-Command-Processor.html
index 3c88716aad..313b4bda82 100644
--- a/docs/1.0/Components/Batch-Command-Processor.html
+++ b/docs/1.0/Components/Batch-Command-Processor.html
@@ -143,46 +143,46 @@ them in-game, except you have more freedom with line breaks.
You cannot nest another batchcommand statement into your batch file. If you want to link many batch-files together, use the #INSERT batch instruction instead. You also cannot launch the batchcode command from your batch file, the two batch processors are not compatible.
Below is a version of the example file found in evennia/contrib/tutorial_examples/batch_cmds.ev.
- #
- # This is an example batch build file for Evennia.
- #
-
- # This creates a red button
- @create button:tutorial_examples.red_button.RedButton
- # (This comment ends input for @create)
- # Next command. Let's create something.
- @set button/desc =
- This is a large red button. Now and then
- it flashes in an evil, yet strangely tantalizing way.
-
- A big sign sits next to it. It says:
+ #
+ # This is an example batch build file for Evennia.
+ #
+
+ # This creates a red button
+ @create button:tutorial_examples.red_button.RedButton
+ # (This comment ends input for @create)
+ # Next command. Let's create something.
+ @set button/desc =
+ This is a large red button. Now and then
+ it flashes in an evil, yet strangely tantalizing way.
+
+ A big sign sits next to it. It says:
-
- -----------
-
- Press me!
-
- -----------
+
+ -----------
+
+ Press me!
+
+ -----------
-
- ... It really begs to be pressed! You
- know you want to!
-
- # This inserts the commands from another batch-cmd file named
- # batch_insert_file.ev.
- #INSERT examples.batch_insert_file
-
-
- # (This ends the @set command). Note that single line breaks
- # and extra whitespace in the argument are ignored. Empty lines
- # translate into line breaks in the output.
- # Now let's place the button where it belongs (let's say limbo #2 is
- # the evil lair in our example)
- @teleport #2
- # (This comments ends the @teleport command.)
- # Now we drop it so others can see it.
- # The very last command in the file needs not be ended with #.
- drop button
+
+ ... It really begs to be pressed! You
+ know you want to!
+
+ # This inserts the commands from another batch-cmd file named
+ # batch_insert_file.ev.
+ #INSERT examples.batch_insert_file
+
+
+ # (This ends the @set command). Note that single line breaks
+ # and extra whitespace in the argument are ignored. Empty lines
+ # translate into line breaks in the output.
+ # Now let's place the button where it belongs (let's say limbo #2 is
+ # the evil lair in our example)
+ @teleport #2
+ # (This comments ends the @teleport command.)
+ # Now we drop it so others can see it.
+ # The very last command in the file needs not be ended with #.
+ drop button
To test this, run @batchcommand on the file:
diff --git a/docs/1.0/Components/Command-Sets.html b/docs/1.0/Components/Command-Sets.html
index 3ba911e77b..a524157905 100644
--- a/docs/1.0/Components/Command-Sets.html
+++ b/docs/1.0/Components/Command-Sets.html
@@ -152,7 +152,7 @@ Sets#merge-rules) section).
class MyCmdSet(CmdSet):
def at_cmdset_creation(self):
- """
+ """
The only thing this method should need
to do is to add commands to the set.
"""
@@ -450,7 +450,7 @@ it appropriately.
key_mergetypes = {'MyOtherCmdSet':'Union'}
def at_cmdset_creation(self):
- """
+ """
The only thing this method should need
to do is to add commands to the set.
"""
diff --git a/docs/1.0/Components/Commands.html b/docs/1.0/Components/Commands.html
index 7941e975e9..7f8505d03e 100644
--- a/docs/1.0/Components/Commands.html
+++ b/docs/1.0/Components/Commands.html
@@ -148,7 +148,7 @@ specifics and use the base from evennia import Command
class MyCmd(Command):
- """
+ """
This is the help-text for the command
"""
key = "mycommand"
@@ -270,7 +270,7 @@ truthfully report this value - that case the from evennia import Command
class CmdSmile(Command):
- """
+ """
A smile command
Usage:
@@ -371,7 +371,7 @@ the current execution of your command and wait for more before processing.
from evennia import Command
class CmdWait(Command):
- """
+ """
A dummy command to show how to wait
Usage:
@@ -384,7 +384,7 @@ the current execution of your command and wait for more before processing.
help_category = "General"
def func(self):
- """Command execution."""
+ """Command execution."""
self.msg("Beginner-Tutorial to wait ...")
yield 5
self.msg("... This shows after 5 seconds. Waiting ...")
@@ -408,7 +408,7 @@ the current execution of your command and wait for more before processing.
Here’s a very simple example:
class CmdConfirm(Command):
- """
+ """
A dummy command to show confirmation.
Usage:
diff --git a/docs/1.0/Components/EvEditor.html b/docs/1.0/Components/EvEditor.html
index b65f7eadea..778675bc5c 100644
--- a/docs/1.0/Components/EvEditor.html
+++ b/docs/1.0/Components/EvEditor.html
@@ -145,7 +145,7 @@ It has no other mechanical function.
from evennia.utils import eveditor
class CmdSetTestAttr(Command):
- """
+ """
Set the "test" Attribute using
the line editor.
@@ -194,7 +194,7 @@ functions will be stored, Python will need to find them.
caller.msg("Editor exited")
class CmdSetTestAttr(Command):
- """
+ """
Set the "test" Attribute using
the line editor.
diff --git a/docs/1.0/Components/EvMenu.html b/docs/1.0/Components/EvMenu.html
index b143246b06..9959e1a5af 100644
--- a/docs/1.0/Components/EvMenu.html
+++ b/docs/1.0/Components/EvMenu.html
@@ -145,16 +145,16 @@