Skip to content

Commit

Permalink
Updates readme, docstrings with the live version of the site.
Browse files Browse the repository at this point in the history
Adds in an option to run as a server.
  • Loading branch information
zejacobi committed Jan 14, 2018
1 parent accd893 commit 97cdfb3
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 6 deletions.
8 changes: 4 additions & 4 deletions Docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,17 +54,17 @@

# General information about the project.
project = 'Delta Green Character Generator'
copyright = '2016-2017, Zachary Jacobi (GPL Licensed)'
copyright = '2016-2018, Zachary Jacobi (GPL Licensed)'
author = 'Zachary Jacobi'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = '0.5'
version = '1.0'
# The full version, including alpha/beta/rc tags.
release = '0.5'
release = '1.0b'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down Expand Up @@ -322,7 +322,7 @@
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'DeltaGreenCharacterGenerator', 'Delta Green Character Generator Documentation',
author, 'DeltaGreenCharacterGenerator', 'One line description of project.',
author, 'DeltaGreenCharacterGenerator', 'Open Source Character Generator for Delta Green.',
'Miscellaneous'),
]

Expand Down
2 changes: 1 addition & 1 deletion Lib/Character.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""
Contains classes that represent characters, the transformations that can be applied to
characters,and functions for displaying created characters.
characters and functions for displaying created characters.
"""

import random
Expand Down
9 changes: 9 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
# Delta Green Character Generator
Open Source [Delta Green](http://www.delta-green.com/) random character generator.

It's now finished to the point where it can be used online!
See it in action [here](http://deltagreen.zachjacobi.com)!

## Features
* Generates a complete Delta Green character (all skills, stats, derived attributes, bonds, one
third of characters are damaged veterans)
Expand All @@ -21,11 +24,17 @@ globals `DATABASE` (the name of the mongo database you plan to use) and `MONGO_S
* Add the open gaming content to your Mongo database with `python SeedDB.py OpenGamingJSON/`
* Whenever you open this in a new terminal/powershell window, you'll have to activate the VENV again
with `source venv/bin/activate`
* Install Ruby
* Run `gem install sass`
* Run (from the project directory) `sass ./static/style.sass ./static/style.css`

## Using (Web)
* With venv activated, run `python server.py` in the top level folder
* Go to `localhost:8080` to see the landing page. There will be a link to character
generation from there.
* The argument `mobile` runs in the server on `0.0.0.0`, so other devices on your
wifi network can use it
* The argument `server` runs the server on port 80 and `0.0.0.0`.

## Using (Command Line)
* From the top level directory: `python Test.py`
Expand Down
7 changes: 6 additions & 1 deletion server.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,14 @@
app.jinja_env.add_extension('pypugjs.ext.jinja.PyPugJSExtension')

host = 'localhost'
port = 8080

if argv and len(argv) > 1 and argv[1] == 'mobile':
host = '0.0.0.0'

if argv and len(argv) > 1 and argv[1] == 'server':
host = '0.0.0.0'
port = 80

if __name__ == "__main__":
app.run(host, port=8080, debug=False)
app.run(host, port=port, debug=False)

0 comments on commit 97cdfb3

Please sign in to comment.