I have imported and dumped the MUX2 help files into a fixture in game/docs/help_files.json. These are now loaded on the first game's run. As we update help files and dumpdata/commit them, game admins may use the new 'update_help' manage.py command to update their copy of help files. For example: python manage.py update_helpfiles. Those with a current checkout of the source may want to do this now.

It is important to note that these are currently un-modified MUX2 help files. There are a lot of things that are not applicable, incorrect, or only partially correct. It will be an ongoing project to clean these up.
This commit is contained in:
Greg Taylor 2009-01-24 03:06:18 +00:00
parent b646aa5093
commit f2d4b3aba4
8 changed files with 24 additions and 5 deletions

File diff suppressed because one or more lines are too long

View file

@ -470,5 +470,4 @@ def cmd_help(command):
session.msg("You may type 'help <#>' to see any of these topics.")
else:
topic = topics[0]
session.msg("\r\n%s%s%s" % (ansi.ansi["hilite"], topic.get_topicname(), ansi.ansi["normal"]))
session.msg(topic.get_entrytext_ingame())
session.msg("\n\r"+ topic.get_entrytext_ingame())

View file

@ -1 +1 @@
[{"pk": 3, "model": "helpsys.helpentry", "fields": {"entrytext": "Commands in Evennia are generally organized into one of two categories: %cgPublic%cn or %cyPrivileged%cn commands.\n\n%cgPublic%cn commands are more or less available to everyone. None of these commands are prefixed with anything, they are typical, every-day commands like %chlook%cn, %chsay%cn, and %chget%cn.\n\n%cyPrivileged%cn command availability is largely dependent on the privileges and powers bestowed on you by the staff. Privileged commands are generally building\/administration related and aren't of general interest to players. These commands are all pre-fixed by a '%ch@%cn' character.\n\nTo see a list of all commands, use %ch@list commands%cn. If you'd like to learn more about any individual command, you may do so by typing %chhelp <topic>%cn, where <topic> is the name of the command (without the <>'s).", "topicname": "Commands", "staff_only": false}}, {"pk": 2, "model": "helpsys.helpentry", "fields": {"entrytext": "Evennia is a product of a small community of developers, all working towards the continual improvement of the codebase. The following people have made major contributions with the end result being what you are now playing.\n\n\"Kelvin\" (Greg Taylor) - Lead developer and original author.", "topicname": "Credits", "staff_only": false}}, {"pk": 1, "model": "helpsys.helpentry", "fields": {"entrytext": "This game has yet to customize its help index, so for now you may browse the generic codebase help files.\n\nTopics\nNEWBIE %t%t Getting started (for new players).\nCOMMANDS %t How to get help with commands.\nCREDITS %t Codebase credits.", "topicname": "Help Index", "staff_only": false}}]
[{"pk": 1, "model": "helpsys.helpentry", "fields": {"entrytext": "This is to prevent a weird encoding error with SQLite3.", "topicname": "Z19kD", "staff_only": false}}]

View file

View file

@ -0,0 +1,15 @@
from django.core.management.base import NoArgsCommand
from django.core.management.color import no_style
from django.core import management
class Command(NoArgsCommand):
"""
Updates the database's copy of the help files from the fixtures located
under evennia/game/docs/help_files.json.
"""
option_list = NoArgsCommand.option_list
help = "Updates (over-writes) your game's help files from the docs dir."
def handle_noargs(self, **options):
self.style = no_style()
management.call_command('loaddata', 'docs/help_files.json', verbosity=1)
print "Help files updated."

View file

@ -13,7 +13,11 @@ class HelpEntryManager(models.Manager):
if topicstr.isdigit():
t_query = self.filter(id=topicstr)
else:
t_query = self.filter(topicname__istartswith=topicstr)
exact_match = self.filter(topicname__iexact=topicstr)
if exact_match:
t_query = exact_match
else:
t_query = self.filter(topicname__istartswith=topicstr)
if not is_staff:
return t_query.exclude(staff_only=1)

View file

@ -107,7 +107,7 @@ def import_help_files():
"""
Imports the help files.
"""
management.call_command('loaddata', '../docs/help_files.json', verbosity=0)
management.call_command('loaddata', 'docs/help_files.json', verbosity=0)
def handle_setup():
"""