|Version 8 (modified by pferreir, 3 years ago) (diff)|
If for any reason you need direct access to the Indico DB, or to manually run some task, etc... indicoShell may be of your interest. indicoShell is a simple IPython-based environment that automatically sets up some basic structures that will help you in your management tasks.
If for some reason you are using an older version of Indico, you can always download the required files from our Git repo, or simply through our web interface:
indicoShell is part of the Indico distribution for all the v0.97-series releases. It's located inside bin/utils. You should adapt indicoShell.sh (or indicoShell.bat under Windows) to suit your Indico environment (set the INDICOPATH environment variable, or just ignore it if Indico is already installed in your system-wide python package directory).
From 0.98 on, the Indico Shell is available from the binary path of any server that has Indico installed:
jdoe ~$ indico_shell
IPython is required (you can simply easy_install/pip it). Windows users will also need to install PyReadline.
It should be very straightforward to use indicoShell:
In : AvatarHolder().getById(22116) Out: <MaKaC.user.Avatar object at 0xb6f2822c> In : AvatarHolder().getById(22116).getFullName() Out: 'FERREIRA, Jose Pedro' In : a = AvatarHolder().getById(22116) In : a.setSurName('Doe') In : a.getFullName() Out: 'DOE, Jose Pedro'
Erasing an user and commiting changes to DB:
In : AvatarHolder().getById(0) Out: <MaKaC.user.Avatar object at 0xb6f2822c> In : a = AvatarHolder().getById(0) In : AvatarHolder().remove(a) In : dbi.commit()
Erasing the DB:
In : a = dbi.getDBConnection().root() In : a.clear() In : dbi.commit()