--- a/README Fri Aug 10 13:40:46 2012 +0200
+++ b/README Fri Aug 10 13:58:28 2012 +0200
@@ -1,6 +1,44 @@
-Zum installieren braucht Iro noch:
+Iro is a non blocking server for sending a message to a bunsh of recipients. It can handle different types of message and can be extended easially.
+It was initially written for sms backend of http://castorticker.de. There are different backends are supported by Iro.
+Iro helps you for these kinds of tasks: You want to send a message to some recipient over a different backend, than for other recipients.
+Or you want to define fallback strategies: If one messages can't be send over this backend use another.
+Because Iro also knows users, you can create bills for different clients.
+
+Installation of Iro
+===================
+
+Install the module via ``setup.py install`` und ran ``iro-install``. That will create a sample configuration file named ``iro.conf``.
+Update the configuration file and run ``iro-install install`` afterwards. That will create the Database and Offers for you.
+After that you have to `adding_user`. Now you are ready to start Iro ``twisted iro``.
+
+
+.. _adding_user:
+
+Add User and Userrights
+-----------------------
+
+You'll need user and right to spefific Offers, that a user can send with a specific Offer. Till now, it is the only way to add/modify user/userrights.
-- Diese wird in ./iro.conf, ~/.iro.conf und /etc/iro/iro.conf gesucht.
-Ein Beispiel ist in iro.conf.inst abgelegt.
-- Desweitern muss noch ein Script da sein (Bespiel in MyIro.inst), in dem die Benutzerdatenbank angegeben wird).
-- zuguter letzt muss noch eine Datenbank angelegt werden. Das Schema ist in iro.sql abgelegt.
+
+You can add users and userright via SQL::
+
+ INSERT INTO user (name,apikey,ng_kunde) VALUES("test","a1b2c3");
+ INSERT INTO userrights (user,offer,default) VALUES ("test",OFFERNAME,NULL);
+
+or use python/ipython::
+
+ >>> import iro.model.schema
+ >>> from iro.model.schema import *
+ >>> from sqlalchemy import create_engine
+ >>> from iro.model.utils import WithSession
+ >>> engine = create_engine(DBURL)
+ >>> with WithSession(engine) as session:
+ ... u = User(name="test",apikey="a1a2c3")
+ ... session.add(u)
+ ... o = session.query(Offer).filter_by(name=OFFERNAME).first()
+ ... u.rights.append(Userright(o, default=None))
+ ... session.commit()
+ >>>
+
+.. note::
+ Please make sure that, the apikey only using *hex digest [0-9a-f]*
--- a/doc/install.rst Fri Aug 10 13:40:46 2012 +0200
+++ b/doc/install.rst Fri Aug 10 13:58:28 2012 +0200
@@ -5,7 +5,7 @@
Afterwards install the module via ``setup.py install`` und ran ``iro-install``. That will create a sample configuration file named ``iro.conf``.
Update the configuration file and run ``iro-install install`` afterwards. That will create the Database and Offers for you.
After that you have to :ref:`adding_user`.
-Now you are ready to start Iro ``twisted -ny extras/iro.tac``.
+Now you are ready to start Iro ``twisted iro``.
.. _adding_user:
@@ -24,12 +24,12 @@
or use python/ipython::
>>> import iro.model.schema
- >>> from iro.model import schema
+ >>> from iro.model.schema import *
>>> from sqlalchemy import create_engine
>>> from iro.model.utils import WithSession
>>> engine = create_engine(DBURL)
>>> with WithSession(engine) as session:
- ... u = schema.User(name="test",apikey="a1a2c3")
+ ... u = User(name="test",apikey="a1a2c3")
... session.add(u)
... o = session.query(Offer).filter_by(name=OFFERNAME).first()
... u.rights.append(Userright(o, default=None))