mirror of
https://github.com/evennia/evennia.git
synced 2026-03-16 21:06:30 +01:00
Fixed things in wiki repo so reST decumentation conversion don't hickup as much.
This commit is contained in:
parent
daa327877c
commit
22b23be095
24 changed files with 148 additions and 203 deletions
|
|
@ -14,14 +14,8 @@ Installation and Early Life
|
|||
Evennia <StartStopReload.html>`_
|
||||
- `Keeping your game up to date <UpdatingYourGame.html>`_
|
||||
- `Change Evennia's language <Internationalization.html>`_
|
||||
|
||||
<wiki:comment>
|
||||
|
||||
- `Collaborate with others using version
|
||||
control <StaffVersionControl.html>`_
|
||||
|
||||
</wiki:comment>
|
||||
|
||||
control <StaffVersionControl.html>`_ (not updated)
|
||||
- `Apache Configuration <ApacheConfig.html>`_ (optional)
|
||||
- `Text encodings <TextEncodings.html>`_ used when connecting to
|
||||
Evennia
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
: Using the Evennia batch code processor
|
||||
|
||||
The Batch-Code processor
|
||||
========================
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
: Using the Evennia command batch processors
|
||||
|
||||
The Batch-Command processor
|
||||
===========================
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ Giving permissions to your staff
|
|||
================================
|
||||
|
||||
*OBS: This gives only a brief introduction to the access system. Locks
|
||||
and permissions are fully detailed `here <Locks.html>`_.*
|
||||
and permissions are fully detailed* `here <Locks.html>`_.
|
||||
|
||||
The super user
|
||||
--------------
|
||||
|
|
|
|||
|
|
@ -1,9 +1,7 @@
|
|||
Putting Colour to your game
|
||||
===========================
|
||||
|
||||
<wiki:comment> </wiki:comment>
|
||||
|
||||
*Note that the Wiki does not display colour the way it would look on the
|
||||
*Note that the Docs does not display colour the way it would look on the
|
||||
screen.*
|
||||
|
||||
Evennia supports the ``ANSI`` standard for displaying text. This means
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
Details on how to use and extend the command system.
|
||||
|
||||
Command system
|
||||
==============
|
||||
|
||||
|
|
|
|||
|
|
@ -1,109 +1,86 @@
|
|||
<wiki:toc max*depth*
|
||||
|
||||
"3" />
|
||||
======
|
||||
|
||||
Communications
|
||||
==============
|
||||
|
||||
Apart from moving around in the game world and talking, players might
|
||||
need other forms of communication. This is offered by Evennia's ``Comm``
|
||||
system. Stock evennia implements a 'MUX-like
|
||||
system. Stock evennia implements a 'MUX-like' system of channels, but
|
||||
there is nothing stopping you from changing things to better suit your
|
||||
taste.
|
||||
|
||||
::
|
||||
|
||||
system of channels, but there is nothing stopping you from changing things to better suit your taste. Comms rely on two main database objects -
|
||||
|
||||
Msg``and``Channel
|
||||
|
||||
::
|
||||
|
||||
. == Msg ==The
|
||||
Comms rely on two main database objects - ``Msg`` and ``Channel``.
|
||||
|
||||
Msg
|
||||
---
|
||||
|
||||
The ``Msg`` object is the basic unit of communication in Evennia. A
|
||||
message works a little like an e-mail; it always has a sender (a
|
||||
`Player <Players.html>`_) and one or more recipients. The recipients may
|
||||
be either other Players, or a *Channel* (see below). You can mix
|
||||
recipients to send the message to both Channels and Players if you like.
|
||||
|
||||
Once created, a ``Msg`` is normally not changed. It is peristently saved
|
||||
in the database. This allows for comprehensive logging of
|
||||
communications, both in channels, but also for allowing
|
||||
senders/receivers to have 'mailboxes' with the messages they want to
|
||||
keep.
|
||||
|
||||
Properties defined on ``Msg``
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
- ``sender`` - this is a reference to a unique `Player <Players.html>`_
|
||||
object sending the message.
|
||||
- ``receivers`` - a list of target `Players <Players.html>`_ to send
|
||||
to.
|
||||
- ``channels`` - a list of target Channels to send to.
|
||||
- ``message`` - the actual text being sent
|
||||
- ``date_sent`` - when message was sent.
|
||||
- ``locks`` - a `lock definition <Locks.html>`_.
|
||||
|
||||
The following is currently unimplemented in Evennia (stay tuned):
|
||||
|
||||
- hide*from*sender - bool if message should be hidden from sender
|
||||
- hide*from*receivers - list of receiver objects to hide message from
|
||||
- hide*from*channels - list of channels objects to hide message from
|
||||
|
||||
You create new messages in code using
|
||||
``src.utils.create.create_message.``
|
||||
|
||||
!TempMsg
|
||||
~~~~~~~~
|
||||
|
||||
``src.objects.models`` contains a class called ``TempMsg`` that mimics a
|
||||
``Msg`` but does not get saved to the database and do not require a
|
||||
sender object of a certain type. It's not used by default, but you could
|
||||
use it in code to send one-off messages to systems expecting a ``Msg``.
|
||||
|
||||
Channels
|
||||
--------
|
||||
|
||||
Channels act as generic distributors of messages. Players *subscribe* to
|
||||
channels and can then send and receive message from it. Channels have
|
||||
`Locks <Locks.html>`_ to limit who may join them.
|
||||
|
||||
There are three default channels created in stock Evennia - ``MUDinfo``,
|
||||
``MUDconnections`` and ``Public``. Two first ones are server-related
|
||||
messages meant for Admins, the last one is open to everyone to chat on
|
||||
(all new players are automatically joined to it when logging in, useful
|
||||
for asking questions).
|
||||
|
||||
You create new channels with ``src.utils.create.create_channel()``.
|
||||
|
||||
In code, messages are sent to a channel using the
|
||||
``msg(message, from_obj=None)`` method. The argument ``message`` can
|
||||
either be a previously constructed ``Msg`` object or a message string.
|
||||
If you send a text string, you should usually also define ``from_obj``;
|
||||
a ``Msg`` object will then be created for you behind the scenes. If you
|
||||
don't supply ``from_obj``, just the string will be sent to the channel
|
||||
and nothing will be stored in the database (could be useful for certain
|
||||
spammy error messages). You can also use ``channel.tempmsg()`` to always
|
||||
send a non-persistent message, also if you send it a ``Msg`` object.
|
||||
|
||||
::
|
||||
|
||||
object is the basic unit of communication in Evennia. A message works a little like an e-mail; it always has a sender (a [Players Player]) and one or more recipients. The recipients may be either other Players, or a _Channel_ (see below). You can mix recipients to send the message to both Channels and Players if you like.Once created, a
|
||||
|
||||
Msg
|
||||
|
||||
::
|
||||
|
||||
is normally not changed. It is peristently saved in the database. This allows for comprehensive logging of communications, both in channels, but also for allowing senders/receivers to have 'mailboxes' with the messages they want to keep. === Properties defined on
|
||||
|
||||
Msg
|
||||
|
||||
::
|
||||
|
||||
=== *
|
||||
|
||||
sender
|
||||
|
||||
::
|
||||
|
||||
- this is a reference to a unique [Players Player] object sending the message. *
|
||||
|
||||
receivers
|
||||
|
||||
::
|
||||
|
||||
- a list of target [Players] to send to. *
|
||||
|
||||
channels
|
||||
|
||||
::
|
||||
|
||||
- a list of target Channels to send to. *
|
||||
|
||||
message
|
||||
|
||||
::
|
||||
|
||||
- the actual text being sent *
|
||||
|
||||
datesent
|
||||
|
||||
::
|
||||
|
||||
- when message was sent. *
|
||||
|
||||
locks
|
||||
|
||||
::
|
||||
|
||||
- a [Locks lock definition]. The following is currently unimplemented in Evennia (stay tuned): * hide_from_sender - bool if message should be hidden from sender * hide_from_receivers - list of receiver objects to hide message from * hide_from_channels - list of channels objects to hide message fromYou create new messages in code using
|
||||
|
||||
src.utils.create.create*message.*
|
||||
|
||||
::
|
||||
|
||||
===!TempMsg===
|
||||
|
||||
src.objects.models``contains a class called``TempMsg``that mimics a``Msg``but does not get saved to the database and do not require a sender object of a certain type. It's not used by default, but you could use it in code to send one-off messages to systems expecting a``Msg
|
||||
|
||||
::
|
||||
|
||||
.== Channels == Channels act as generic distributors of messages. Players _subscribe_ to channels and can then send and receive message from it. Channels have [Locks] to limit who may join them. There are three default channels created in stock Evennia -
|
||||
|
||||
MUDinfo``,``MUDconnections``and``Public
|
||||
|
||||
::
|
||||
|
||||
. Two first ones are server-related messages meant for Admins, the last one is open to everyone to chat on (all new players are automatically joined to it when logging in, useful for asking questions). You create new channels with
|
||||
|
||||
src.utils.create.createchannel()
|
||||
|
||||
::
|
||||
|
||||
.In code, messages are sent to a channel using the
|
||||
|
||||
msg(message, fromobj
|
||||
|
||||
None)``method. The argument``message``can either be a previously constructed``Msg``object or a message string. If you send a text string, you should usually also define``fromobj``; a``Msg``object will then be created for you behind the scenes. If you don't supply``from\_obj``, just the string will be sent to the channel and nothing will be stored in the database (could be useful for certain spammy error messages). You can also use``channel.tempmsg()``to always send a non-persistent message, also if you send it a``Msg
|
||||
|
||||
::
|
||||
|
||||
object.# assume we have a 'sender' object and a channel named 'mychan'# send and store in database from src.utils import create mymsg = create.create_message(sender, "Hello!", channels=[mychan]) mychan.msg(mymsg)# send a one-time message mychan.msg("Hello!")# send a one-time message created from a Msg object mychan.tempmsg(mymsg)
|
||||
# assume we have a 'sender' object and a channel named 'mychan'# send and store in database from src.utils import create mymsg = create.create_message(sender, "Hello!", channels=[mychan]) mychan.msg(mymsg)# send a one-time message mychan.msg("Hello!")# send a one-time message created from a Msg object mychan.tempmsg(mymsg)
|
||||
|
||||
As a more advanced note, sending text to channels is a "special
|
||||
exception" as far as commands are concerned, and you may completely
|
||||
|
|
|
|||
|
|
@ -3,8 +3,15 @@ The Connection Screen
|
|||
|
||||
When you first connect to your game you are greeted by Evennia's default
|
||||
connection screen. It welcomes you, gives you the server version and
|
||||
tells you how to connect. Effective, but not very exciting. You will
|
||||
most likely want to change this to be more unique for your game.
|
||||
tells you how to connect.
|
||||
|
||||
::
|
||||
|
||||
==============================================================
|
||||
Welcome to Evennia, version SVN-Alpha! If you have an existing account, connect to it by typing: connect <email> <password> If you need to create an account, type (without the <>'s): create "<username>" <email> <password> Enter help for more info. look will re-show this screen. ==============================================================
|
||||
|
||||
Effective, but not very exciting. You will most likely want to change
|
||||
this to be more unique for your game.
|
||||
|
||||
You can customize the connection screen easily. If you look in
|
||||
``game/gamesrc/world`` you will find a module named
|
||||
|
|
|
|||
|
|
@ -1,17 +1,22 @@
|
|||
Contributing to Evennia
|
||||
=======================
|
||||
|
||||
Wanna help out? Great! Here's how.
|
||||
|
||||
Contributing with Documentation
|
||||
===============================
|
||||
-------------------------------
|
||||
|
||||
Evennia depends heavily on good documentation and we are always looking
|
||||
for extra eyes and hands to improve it. Even a small thing such as
|
||||
fixing typos is a great help.
|
||||
for extra eyes and hands to improve it. Even small things such as fixing
|
||||
typos is a great help.
|
||||
|
||||
Contributing with Code
|
||||
======================
|
||||
Contributing with Code through a clone repository
|
||||
-------------------------------------------------
|
||||
|
||||
Code sharing with Clone repository
|
||||
----------------------------------
|
||||
We always need more eyes and hands on the code. Even if you don't feel
|
||||
confident with tackling any major bugs or features, just correcting
|
||||
typos, adjusting formatting or simply using the thing helps us a lot in
|
||||
improving things.
|
||||
|
||||
The most elegant way to contribute code to Evennia is to use Mercurial
|
||||
to create an online *clone* of the Evennia repository and make your
|
||||
|
|
@ -43,11 +48,12 @@ changes to that. .
|
|||
From your online repo, Evennia devs can then, assuming the change is
|
||||
deemed good, pick and merge your work into Evennia proper.
|
||||
|
||||
Patches
|
||||
-------
|
||||
Contributing with Patches
|
||||
-------------------------
|
||||
|
||||
It's recommended to use a clone repository as described above. Otherwise
|
||||
you are also welcome to submit your suggested Evennia fixes/addendums as
|
||||
It's recommended to use a clone repository as described above, but for
|
||||
small, well isolated things you are also welcome to submit your
|
||||
suggested Evennia fixes/addendums as
|
||||
`patches <https://secure.wikimedia.org/wikipedia/en/wiki/Patch_(computing).html>`_
|
||||
if you like. Depending on what fits best, post your patch to the `issue
|
||||
tracker <https://code.google.com/p/evennia/issues/list.html>`_ or to the
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ Commands in Evennia's default command set
|
|||
=========================================
|
||||
|
||||
*Note: This wiki page is auto-generated from the current status of the
|
||||
code base and should not be edited manually.*\_
|
||||
code base and should not be edited manually.*
|
||||
|
||||
The commands are ordered after their given help category, which should
|
||||
usually match a module in ``src/commands/default``. So for example, the
|
||||
|
|
|
|||
|
|
@ -14,17 +14,13 @@ General Evennia development information
|
|||
---------------------------------------
|
||||
|
||||
- `Evennia Licensing FAQ <Licensing.html>`_
|
||||
- `Contributing code to Evennia <Contributing.html>`_
|
||||
- `Contributing to Evennia <Contributing.html>`_
|
||||
- `Evennia Code Style
|
||||
Guide <http://evennia.googlecode.com/svn/trunk/CODING_STYLE>`_
|
||||
(Important!)
|
||||
- `Policy for 'MUX-like' default commands <UsingMUXAsAStandard.html>`_
|
||||
|
||||
<wiki:comment>
|
||||
|
||||
- `Setting up a Bazaar environment for coding <BazaarDevel.html>`_
|
||||
|
||||
</wiki:comment>
|
||||
- `Setting up a Bazaar environment for coding <BazaarDevel.html>`_ (not
|
||||
updated)
|
||||
|
||||
Evennia Component Documentation
|
||||
-------------------------------
|
||||
|
|
|
|||
|
|
@ -1,13 +1,10 @@
|
|||
Summary of changes in devel-branch
|
||||
|
||||
<wiki:toc max\_depth
|
||||
|
||||
"3" />
|
||||
|
||||
*Note: The devel branch merged with trunk as of r970. So if you are new
|
||||
to Evennia, this page is of no real interest to you.*
|
||||
*Note: The devel branch merged with trunk as of r970 (aug2010). So if
|
||||
you are new to Evennia, this page is of no real interest to you.*
|
||||
|
||||
Introduction
|
||||
============
|
||||
|
||||
The Evennia that has been growing in trunk for the last few years is a
|
||||
wonderful piece of software, with which you can do very nice coding
|
||||
|
|
@ -37,7 +34,8 @@ report bugs, you can get it from the *griatch* branch with
|
|||
|
||||
``svn checkout http://evennia.googlecode.com/svn/branches/griatch evennia-devel``
|
||||
|
||||
Concepts changed from trunk to devel=
|
||||
Concepts changed from trunk to devel
|
||||
====================================
|
||||
|
||||
Script parent -> Typeclasses
|
||||
----------------------------
|
||||
|
|
|
|||
|
|
@ -1,9 +1,5 @@
|
|||
<wiki:toc max\_depth
|
||||
|
||||
"3" />
|
||||
======
|
||||
|
||||
The ``@py`` command =
|
||||
The ``@py`` command
|
||||
===================
|
||||
|
||||
The ``@py`` command supplied with the default command set of Evennia
|
||||
allows you to execute Python commands directly from inside the game. An
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
Introduction to and configuration for IMC2.
|
||||
|
||||
IMC2
|
||||
====
|
||||
|
||||
|
|
@ -74,8 +72,6 @@ You should join the channel automatically.
|
|||
Setting up a Channel ``<->`` IMC2 binding
|
||||
-----------------------------------------
|
||||
|
||||
=
|
||||
|
||||
Evennia developers have an open-access IMC channel called ``ievennia``
|
||||
on ``Server01`` of the Mudbytes network. For Evennia development we
|
||||
recommend you connect to this for sharing evennia anecdotes!
|
||||
|
|
|
|||
|
|
@ -14,12 +14,8 @@ internet connection. For IRC operation you also need
|
|||
is available simply as a package *python-twisted-words* in many Linux
|
||||
distros, or directly downloadable from the link.
|
||||
|
||||
<wiki:toc max\_depth
|
||||
|
||||
"3" />
|
||||
======
|
||||
|
||||
Configuring IRC =
|
||||
Configuring IRC
|
||||
---------------
|
||||
|
||||
To configure IRC, you'll need to activate it in your settings file. You
|
||||
do this by copying the ``IRC_ENABLED`` flag from
|
||||
|
|
|
|||
|
|
@ -1,33 +1,30 @@
|
|||
Evennia Licence
|
||||
===============
|
||||
Evennia Licence FAQ
|
||||
===================
|
||||
|
||||
Evennia is licensed under the very friendly *Modified Clarified Artistic
|
||||
License*. You can find the license as ``LICENCE`` in the Evennia root
|
||||
directory. You can also read the full license file
|
||||
`here <http://code.google.com/p/evennia/source/browse/trunk/LICENSE>`_.
|
||||
|
||||
Licence FAQ
|
||||
-----------
|
||||
|
||||
You should read the full license file to know what it says exactly, but
|
||||
here are some answers to common questions.
|
||||
|
||||
Q: I have created a game using Evennia, what does the license allow me
|
||||
Q: When creating a game using Evennia, what does the licence permit me
|
||||
to do with it?
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
-------------------------------------------------------------------------------------
|
||||
|
||||
**A:** It's your own world to do with what you please! In summary, a
|
||||
MU``*`` world you create using Evennia (i.e. the files you create in
|
||||
``game``) falls under **§6** of the license (it's a sort of "library").
|
||||
So your game world and all its contents belongs to you (as it should
|
||||
be). Keep it to yourself or re-distribute it under any license of your
|
||||
choice - or sell it and become filthy rich for all we care.
|
||||
**A:** It's your own world to do with as you please! To summarize, a MUD
|
||||
world you create using Evennia (i.e. the files you create in ``game``)
|
||||
falls under **§6** of the license (it's a sort of "library"). So your
|
||||
game world and all its contents belongs to you (as it should be). Keep
|
||||
it to yourself or re-distribute it under any license of your choice - or
|
||||
sell it and become filthy rich for all we care.
|
||||
|
||||
Q: I have modified Evennia itself, what does the license say about that?
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
------------------------------------------------------------------------
|
||||
|
||||
**A:** The Evennia package itself (i.e. the stuff you download from us)
|
||||
is referred to as "The Package", "Standard version" in the license.
|
||||
is referred to as "The Package, Standard version" in the license.
|
||||
|
||||
- If you just fixed a typo or bug, that falls under **§2** - that is,
|
||||
you don't *have* to do anything to appease the license. Regardless,
|
||||
|
|
@ -42,7 +39,7 @@ is referred to as "The Package", "Standard version" in the license.
|
|||
developer!
|
||||
|
||||
Q: Can I re-distribute Evennia along with my custom game implementation?
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
------------------------------------------------------------------------
|
||||
|
||||
**A:** Sure. This is covered in **§4** - just package the "Standard
|
||||
version" (that is, the one you download from us) with your package. Make
|
||||
|
|
|
|||
|
|
@ -22,6 +22,8 @@ Evennia links
|
|||
Third-party Evennia links
|
||||
-------------------------
|
||||
|
||||
- `Read Evennia's manual on
|
||||
ReadTheDocs <http://evennia.readthedocs.org>`_
|
||||
- `Hosting Evennia on
|
||||
Webfaction <http://lotek.heavy.ch/evennia#Hosting>`_
|
||||
- `Evennia on Ohloh <http://www.ohloh.net/projects/6906>`_
|
||||
|
|
|
|||
|
|
@ -1,9 +1,5 @@
|
|||
<wiki:toc max\_depth
|
||||
|
||||
"3" />
|
||||
======
|
||||
|
||||
Locks =
|
||||
Locks
|
||||
=====
|
||||
|
||||
For most games it is a good idea to restrict what people can do. In
|
||||
Evennia such restrictions are applied and checked by something called
|
||||
|
|
|
|||
|
|
@ -1,9 +1,5 @@
|
|||
<wiki:toc max\_depth
|
||||
|
||||
"3" />
|
||||
======
|
||||
|
||||
Players=
|
||||
Players
|
||||
=======
|
||||
|
||||
All users (in the sense of actual people) connecting to Evennia are
|
||||
doing so through an object called *Player*. The Player object has no
|
||||
|
|
|
|||
|
|
@ -1,6 +1,3 @@
|
|||
A brief explanation of what MUSH softcode is and why we use Python
|
||||
instead.
|
||||
|
||||
On MUX and Softcode: A brief overview
|
||||
=====================================
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ class methods that you shouldn't edit.
|
|||
|
||||
Properties available to all typeclassed entities (Players, Objects,
|
||||
Scripts)
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
- ``key`` - the main identifier for the entity, say 'Rose', 'myscript'
|
||||
or 'Paul'. ``name`` is an alias that can also be used.
|
||||
|
|
@ -46,7 +46,7 @@ properties. Go to the pages for `Objects <Objects.html>`_,
|
|||
more info.
|
||||
|
||||
Things to remember when using TypeClasses
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
-----------------------------------------
|
||||
|
||||
Typeclasses mostly behave like normal Python classes - you can
|
||||
add/overload custom methods and inherit your own classes from them -
|
||||
|
|
@ -132,7 +132,7 @@ object itself. They are covered in a separate entry
|
|||
`here <Attributes.html>`_.
|
||||
|
||||
Why split it like this?
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
-----------------------
|
||||
|
||||
The *Database model* (Django model) allows for saving data to the
|
||||
database and is a great place for storing persistent data an object
|
||||
|
|
@ -219,7 +219,7 @@ Another example:
|
|||
:align: center
|
||||
:alt:
|
||||
Caveats of the typeclass system
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
-------------------------------
|
||||
|
||||
While there are many advantages to the typeclass system over working
|
||||
with Django models directly, there are also some caveats to remember.
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
Using and writing unit tests for Evennia.
|
||||
|
||||
Unit Testing
|
||||
============
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,7 @@
|
|||
Workshop: Default-game whitepage
|
||||
|
||||
<wiki:toc max\_depth
|
||||
|
||||
"3" />
|
||||
======
|
||||
|
||||
Introduction =
|
||||
Introduction
|
||||
============
|
||||
|
||||
This is an initiative to create a "base" game system to be shipped with
|
||||
Evennia in a "contrib" folder. The game is an independent
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
# 3) Retrieve wiki files (*.wiki) from Google code by mercurial. Make sure
|
||||
# to retrieve them into a directory wikiconvert/wiki:
|
||||
#
|
||||
# hg clone https://code.google.com/p/evennia/wiki wiki
|
||||
# hg clone https://code.google.com/p/evennia.wiki wiki
|
||||
#
|
||||
# 4) Check so that you have the following file structure:
|
||||
#
|
||||
|
|
@ -65,6 +65,7 @@ def wiki2rest():
|
|||
"""
|
||||
Convert from wikifile to rst file, going through html
|
||||
"""
|
||||
|
||||
# convert from wikifile to html with wiki2html
|
||||
subprocess.call([RUBY_EXE, "wiki_convertor.rb", WIKI_DIR, HTML_DIR], cwd=WIKI2HTML_DIR)
|
||||
|
||||
|
|
@ -77,9 +78,13 @@ def wiki2rest():
|
|||
htmlfilename = os.path.join(HTML_DIR, filename)
|
||||
|
||||
string = "".join(open(htmlfilename, 'r').readlines())
|
||||
string = re.sub(r'<p class="summary">[A-Za-z0-9 ]*</p>', "", string)
|
||||
string = re.sub(r"<wiki:toc max_depth="[0-9]" />", "", string)
|
||||
string = re.sub(r'<p class="summary">[A-Za-z0-9 .-\:]*</p>', "", string)
|
||||
string = re.sub(r"<wiki:toc max_depth="[0-9]*" />", "", string)
|
||||
string = re.sub(r"<wiki:toc max_depth<h1>"[0-9]*" /></h1>", "", string)
|
||||
string = re.sub(r"<p>#settings Featured</p>", "", string)
|
||||
string = re.sub(r'<p class="labels">Featured</p>', "", string)
|
||||
string = re.sub(r'<wiki:comment>', "", string)
|
||||
string = re.sub(r'</wiki:comment>', "", string)
|
||||
#string = re.sub(r'<wiki:comment>[<>;a-zA\/\n-&Z0-9 ]*</wiki:comment>', "", string)
|
||||
f = open(htmlfilename, 'w')
|
||||
f.write(string)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue