This is an old revision of the document!
demo patrons
http://open-ils.org/~phasefx/gen_fake_users.tar
This is a very simple (brain-dead, improvements welcome!) script for generating SQL statements to use with an Evergreen database for creating fake patrons, addresses, and library cards.
You have to modify the gen_fake_users.pl file and change the following variables to suit your installation:
############################################### # examples my @profiles = ( 2, 12, 13, 14 ); my @ident_types = ( 1, 3 ); my @home_ou = ( 4, 5, 6, 7, 8, 9 );
Use the query
select * from permission.grp_tree;
to see possible id values for @profiles.
Use the query
select * from config.identification_type;
to see possible id values for @ident_types.
Use the query
select aou.id, aou.shortname from actor.org_unit as aou, actor.org_unit_type as aout where aou.ou_type = aout.id and aout.can_have_users = 't';
to see possible id values for @home_ou.
This is how you use the script the with included data files:
./gen_fake_users.pl last_names.txt male_names.txt female_names.txt abbr_suffix.txt wordlist.txt zip5.csv
It is my belief that the data files I'm including are either not copyrightable (being a list of facts) or are in the public domain, at least in the United States. But I am not a lawyer. :)
The script itself I'm releasing under the GNU GPL, Version 2.
Demo Volume and Copy Data
This, too, is a very simple script for generating SQL statements. It's purpose is to create volume (asset.call_number) and copy (asset.copy) data for test purpose. The script is documented inline. Four settings are required.
''' ID of the user who is creating the data everdemo=# select id from actor.usr where usrname='admin'; ''' creator_user = 1 ''' How many volumes do we want to create? ''' num_volumes = 5000 ''' How many copies do we want to create? ''' num_copies = 5000 ''' List of orgs to use as volume owning_lib's and copy circ_lib's evergreen=# select aou.id, aou.shortname from actor.org_unit as aou, actor.org_unit_type as aout where aou.ou_type = aout.id and aout.can_have_vols; ''' org_ids = (4, 5, 6, 7, 8, 9)
Here it is: http://open-ils.org/~erickson/create_holdings.py