Permalink
Browse files

README markdown formatting

  • Loading branch information...
1 parent 36fcf8b commit 7f12ea58a1378652116df6f75608bd1e79d2c043 @mapleoin committed Mar 10, 2012
Showing with 35 additions and 21 deletions.
  1. +3 −1 README.markdown
  2. +32 −20 README.server.markdown
View
@@ -1,7 +1,7 @@
POPCORN - Popularity Contest (for RPM)
======================================
-MIT License
+**MIT License**
Copyright (c) 2009-2011 Pavol Rusnak <stick@gk2.sk>
@@ -39,10 +39,12 @@ Packages
--------
popcorn-client
+
* client-side written in Python
* gathers info about packages and sends to server (via HTTP POST)
popcorn-server
+
* server which receives, processes, stores and displays submissions
* see README.server for more information
View
@@ -7,12 +7,15 @@ To install the server in a virtualenv do the following:
Clone the repository
- git clone git://github.com/mapleoin/popcorn.git
+```git clone git://github.com/mapleoin/popcorn.git
+```
Create the virtualenv and activate it
- $ virtualenv vpopcorn
- $ source vpopcorn/bin/activate
+```
+$ virtualenv vpopcorn
+$ source vpopcorn/bin/activate
+```
You will need the postgresql development files to install psycopg2 which
is a required dependency for popcorn you should install this using your
@@ -23,38 +26,45 @@ to your python path, but will not install it anywhere else. You can now
edit the files in the git clone directory and the changes will be
immediately visible to the server.
- $ cd popcorn
- $ ./setup.py develop
+```
+$ cd popcorn
+$ ./setup.py develop
+```
You can check that the unittests run fine
- $ ./setup.py test
+```$ ./setup.py test```
Install and setup postgresql-server for your distribution, then turn it
on. Create the popcorn user and database.
- $ su - postgres
- $ createuser popcorn -P
- Enter password for new role: <enter popcorn as the password>
- Enter it again: <popcorn again>
- Shall the new role be a superuser? (y/n) n
- Shall the new role be allowed to create databases? (y/n) n
- Shall the new role be allowed to create more new roles? (y/n) n
- $ createdb popcorn --owner=popcorn
+```
+$ su - postgres
+$ createuser popcorn -P
+Enter password for new role: <enter popcorn as the password>
+Enter it again: <popcorn again>
+Shall the new role be a superuser? (y/n) n
+Shall the new role be allowed to create databases? (y/n) n
+Shall the new role be allowed to create more new roles? (y/n) n
+$ createdb popcorn --owner=popcorn
+```
If you've set different values here than the default, edit `DB_ENGINE` in
`popcorn/configs.py` and set them there as well
Initialize the database (installs tables and initial data).
- $ ./server/popcorn-server init_db
+```$ ./server/popcorn-server init_db
+```
Start the server with the `--debug` flag (changes to files will cause
the server to reload them immediately + nice traceback pages)
- $ ./server/popcorn-server --debug
- * Running on http://127.0.0.1:5000/
- * Restarting with reloader
+```
+$ ./server/popcorn-server --debug
+ * Running on http://127.0.0.1:5000/
+ * Restarting with reloader
+```
You can now point your browser to http://127.0.0.1:5000/ (there won't be
much to see).
@@ -68,8 +78,10 @@ package installed. It's easier to do this from outside the virtualenv,
because virtualenv will hide your system's site-packages by default (and
this is also how `popcorn-client` will run *in the wild*).
- $ POPCORN_ENABLED=1 ./popcorn-client
- Submission received. Thanks!
+```
+$ POPCORN_ENABLED=1 ./popcorn-client
+Submission received. Thanks!
+```
If you now look on the popcorn webUI, you should see a lot of data about
your currently installed packages.

0 comments on commit 7f12ea5

Please sign in to comment.