Skip to content

Commit

Permalink
Initial alpha 0.1.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
arvoelke committed Jul 10, 2020
1 parent b2718f5 commit 266d2e4
Show file tree
Hide file tree
Showing 136 changed files with 124 additions and 36 deletions.
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
static/cards/*
dixit/static/cards/*
*.pyc
*.swp
*.egg-info
build
dist
7 changes: 7 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
graft dixit/static
prune dixit/static/cards
include dixit/static/cards/dixit/README.txt
graft dixit/templates

include LICENSE.txt
include dixit/config.json
17 changes: 0 additions & 17 deletions README.md

This file was deleted.

37 changes: 37 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
.. figure:: http://i.imgur.com/y5Zv9Az.png
:alt: Revealing the correct card

Installation
------------

``pip install dixit``

Starting the Server
-------------------

``dixit``

Then go to http://localhost:8888/.

Configuring the Server
----------------------

Edit ``dixit/config.json`` to specify which port to run on (default
8888), and to point to the location of each card deck that you have
(e.g., see ``dixit/static/cards/dixit/README.txt``).

Notes
-----

This is an alpha release and may therefore undergo significant changes.
Please request features or submit changes to
https://github.com/arvoelke/Dixit/.

Thank you to all the developers who have helped so far!

We do not currently, nor do we plan to, distribute copywritten artwork.
Currently all cards must be supplied by you, the user. This server is
provided for personal use only (there is no license for commercial use).

Please consider supporting the designers and artists behind Dixit by
purchasing the original board game.
1 change: 1 addition & 0 deletions dixit/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from dixit.server import start
2 changes: 1 addition & 1 deletion chat.py → dixit/chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import time

from utils import hash_obj
from dixit.utils import hash_obj


class ChatLog(object):
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions core.py → dixit/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
import random
import time

from codes import APIError, Codes
from deck import Deck
from display import BunnyPalette
from utils import INFINITY
from dixit.codes import APIError, Codes
from dixit.deck import Deck
from dixit.display import BunnyPalette
from dixit.utils import INFINITY


class Limits(object):
Expand Down
2 changes: 1 addition & 1 deletion deck.py → dixit/deck.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Data for all card related objects."""

import random
from utils import hash_obj
from dixit.utils import hash_obj


class Card(object):
Expand Down
2 changes: 1 addition & 1 deletion display.py → dixit/display.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Holds template variables for HTML/JS/CSS."""

from utils import url_join
from dixit.utils import url_join


class Labels(object):
Expand Down
24 changes: 14 additions & 10 deletions server.py → dixit/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@
import sys
import time

from chat import ChatLog
from codes import APIError, Codes
from core import Limits, States, StringClue, Game
from deck import CardSet
from users import Users
from utils import INFINITY, hash_obj, get_sorted_positions, url_join, \
from dixit.chat import ChatLog
from dixit.codes import APIError, Codes
from dixit.core import Limits, States, StringClue, Game
from dixit.deck import CardSet
from dixit.users import Users
from dixit.utils import INFINITY, hash_obj, get_sorted_positions, url_join, \
capture_stdout
import config
import display
import dixit.config as config
import dixit.display as display


class RequestHandler(tornado.web.RequestHandler):
Expand Down Expand Up @@ -371,7 +371,7 @@ def __init__(self, *args, **kwargs):
'debug' : False,
}

configFilename = "config.json"
configFilename = os.path.join(os.path.dirname(__file__), "config.json")
settings.update(config.parse(configFilename))

application = Application([
Expand All @@ -387,7 +387,11 @@ def __init__(self, *args, **kwargs):
(r'/chat', ChatHandler),
], **settings)

if __name__ == "__main__":

def start():
application.listen(settings['port'])
tornado.ioloop.IOLoop.instance().start()


if __name__ == "__main__":
start()
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 0 additions & 1 deletion requirements.txt

This file was deleted.

53 changes: 53 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#!/usr/bin/env python

import io

try:
from setuptools import find_packages, setup
except ImportError:
raise ImportError(
"'setuptools' is required but not installed. To install it, "
"follow the instructions at "
"https://pip.pypa.io/en/stable/installing/#installing-with-get-pip-py"
)


def read(*filenames, **kwargs):
encoding = kwargs.get("encoding", "utf-8")
sep = kwargs.get("sep", "\n")
buf = []
for filename in filenames:
with io.open(filename, encoding=encoding) as f:
buf.append(f.read())
return sep.join(buf)


install_req = [
"tornado",
]


setup(
name="Dixit",
version="0.1.0",
author="Aaron Voelker",
author_email="[email protected]",
packages=find_packages(),
include_package_data=True,
url="https://github.com/arvoelke/Dixit/",
license="Free for personal (non-commercial) use",
description="Online version of the board game Dixit",
long_description=read("README.rst"),
install_requires=install_req,
zip_safe=False,
entry_points={
'console_scripts': [
'dixit = dixit:start',
]
},
python_requires=">=3.5",
classifiers=[ # https://pypi.python.org/pypi?%3Aaction=list_classifiers
"Development Status :: 3 - Alpha",
"Topic :: Games/Entertainment :: Board Games",
],
)

0 comments on commit 266d2e4

Please sign in to comment.