No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

create_datas_simpleem.sh 37KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474
  1. #!/bin/bash
  2. usage() {
  3. echo -e "Usage : $0 host_of_server instance_name host_of_db number_of_iterations >&2"
  4. echo -e "Example : create_datas locahost instance_00001 localhost:28015 1000"
  5. echo -e "Example : create_datas locahost instance_00001 localhost 1000"
  6. exit 1
  7. }
  8. if [ $# -lt 3 ]
  9. then
  10. echo "Not enough arguments" >&2
  11. usage
  12. fi
  13. host=$1
  14. instance=$2
  15. N=$4
  16. HOSTDB=$3
  17. dbname=lodel2_$instance
  18. dbuser=admin
  19. dbpwd=pass
  20. curl_options='--silent -o /dev/null -s -w %{url_effective};%{http_code};%{time_connect};%{time_starttransfer};%{time_total}\n'
  21. M=$(($N*20))
  22. for i in `eval echo {1..$M}`;
  23. do
  24. # Classe Person
  25. LN=$(lenmax=20;wcount=1; rlenmax=$(expr $lenmax - 1); echo $(shuf /usr/share/dict/words | head -n $wcount | tr -s "\n" " ") | sed -E "s/^(.{$rlenmax}).*$/\1/")
  26. FN=$(lenmax=20;wcount=1; rlenmax=$(expr $lenmax - 1); echo $(shuf /usr/share/dict/words | head -n $wcount | tr -s "\n" " ") | sed -E "s/^(.{$rlenmax}).*$/\1/")
  27. LC=''
  28. curl -o /dev/null -s -d "field_input_lastname=$LN&field_input_firstname=$FN&field_input_linked_containers=$LC&classname=Person" http://$host/$instance/admin/create?classname=Person
  29. # Classe User
  30. PWD='pwgen 10'
  31. LOGIN="${FN,,}$(printf "%d" $RANDOM)"
  32. curl -o /dev/null -s -d "field_input_lastname=$LN&field_input_firstname=$FN&field_input_password=$PWD&field_input_login=$LOGIN&classname=User" http://$host/$instance/admin/create?classname=User
  33. # Classe Entry, champs à remplir : name, description, role, linked_texts
  34. ENLT='' #$(printf "use $dbname\nDBQuery.shellBatchSize = 30000\n db.Article.find({}, {lodel_id:1, _id:0})" | mongo $HOSTDB/admin -u $dbuser -p $dbpwd | sed "1,3d" | sed -e "s/{ \"lodel_id\" : //g" | sed -e "s/ }//g" | shuf | head -n 3; )
  35. ENROLE=$(shuf -e 'geography' 'subject' 'keywords' | head -n 1)
  36. ENTNM=$(lenmax=100;wcount=20; rlenmax=$(expr $lenmax - 1); echo $(shuf /usr/share/dict/words | head -n $wcount | tr -s "\n" " ") | sed -E "s/^(.{$rlenmax}).*$/\1/")
  37. ENTDESC=$(lenmax=500;wcount=100; rlenmax=$(expr $lenmax - 1); echo $(shuf /usr/share/dict/words | head -n $wcount | tr -s "\n" " ") | sed -E "s/^(.{$rlenmax}).*$/\1/")
  38. curl $curl_options -d "field_input_linked_texts=$ENLT&field_input_name=$ENTNM&field_input_role=$ENROLE&field_input_description=$ENTDESC&classname=Entry" http://$host/$instance/admin/create?classname=Entry
  39. done
  40. M=$N #$(shuf -e '2' '3' '4' | head -n 1)
  41. for col in `eval echo {1..$M}`;
  42. do
  43. # Classe Collection, champs à remplir : title, subtitle, language, linked_director, description, publisher_note, issn
  44. NBLD=$(shuf -e '1' '2' '3' '4' | head -n 1)
  45. directors=$(printf "use $dbname\n DBQuery.shellBatchSize = 30000\n db.Person.find({}, {lodel_id:1, _id:0})" | mongo $HOSTDB/admin -u $dbuser -p $dbpwd | sed "1,4d" | sed -e "s/{ \"lodel_id\" : //g" | sed -e "s/ }//g" | sed "\$d" | shuf | head -n $NBLD;)
  46. tmp=''
  47. for j in $directors
  48. do
  49. if [[ ! -z $tmp ]]
  50. then
  51. tmp=$(printf "$tmp, $j")
  52. else
  53. tmp=$j
  54. fi
  55. done
  56. COLLD=$tmp
  57. COLT=$(lenmax=100;wcount=20; rlenmax=$(expr $lenmax - 1); echo $(shuf /usr/share/dict/words | head -n $wcount | tr -s "\n" " ") | sed -E "s/^(.{$rlenmax}).*$/\1/")
  58. COLST=$(lenmax=100;wcount=20; rlenmax=$(expr $lenmax - 1); echo $(shuf /usr/share/dict/words | head -n $wcount | tr -s "\n" " ") | sed -E "s/^(.{$rlenmax}).*$/\1/")
  59. LG=$(shuf -e 'fr' 'en' 'es' 'ger' 'it'| head -n 1)
  60. DESC=$(lenmax=500;wcount=100; rlenmax=$(expr $lenmax - 1); echo $(shuf /usr/share/dict/words | head -n $wcount | tr -s "\n" " ") | sed -E "s/^(.{$rlenmax}).*$/\1/")
  61. PBN=$(lenmax=500;wcount=100; rlenmax=$(expr $lenmax - 1); echo $(shuf /usr/share/dict/words | head -n $wcount | tr -s "\n" " ") | sed -E "s/^(.{$rlenmax}).*$/\1/")
  62. ISSN=$(</dev/urandom tr -dc 0-9 | head -c8;echo;)
  63. curl $curl_options -d "field_input_title=$COLT&field_input_subtitle=$COLST&field_input_language=$LG&field_input_linked_directors=$COLLD&field_input_description=$DESC&field_input_publisher_note=$PBN&field_input_issn=$ISSN&classname=Collection" http://$host/$instance/admin/create?classname=Collection
  64. collection=$(printf "use $dbname\n db.Collection.find({}, {lodel_id:1, _id:0}).sort({_id:-1}).limit(1)" | mongo $HOSTDB/admin -u $dbuser -p $dbpwd | sed "1,3d" | sed -e "s/{ \"lodel_id\" : //g" | sed -e "s/ }//g" | sed "\$d";)
  65. NBNUM=$(shuf -e '30' '35' '40' | head -n 1 ) # Nombre de numéros pour cette collection
  66. for i in `eval echo {1..$NBNUM}`; # On remplit les numéros
  67. do
  68. NB=$(shuf -e '25' '30' '35' '40' '45' '50' '55' '60' '65' | head -n 1) # Nombre de textes pour le numéro
  69. NBR=$(($NB/3)) # Nombre de reviews
  70. NBA=$(($NBR*2)) # Nombre d'articles
  71. # Classe Issue, champs à remplir : title, subtitle, language, linked_directors, description, publisher_note, isbn, print_isbn, number, cover, print_pub_date, e_pub_date, abstract, collection, linked_parts, linked_texts
  72. NBLD=$(shuf -e '1' '2' '3' '4' | head -n 1)
  73. directors=$(printf "use $dbname\n DBQuery.shellBatchSize = 30000\n db.Person.find({}, {lodel_id:1, _id:0})" | mongo $HOSTDB/admin -u $dbuser -p $dbpwd | sed "1,4d" | sed -e "s/{ \"lodel_id\" : //g" | sed -e "s/ }//g" | sed "\$d" | shuf | head -n $NBLD;)
  74. tmp=''
  75. for j in $directors
  76. do
  77. if [[ ! -z $tmp ]]
  78. then
  79. tmp=$(printf "$tmp, $j")
  80. else
  81. tmp=$j
  82. fi
  83. done
  84. ISSLD=$tmp
  85. ISST=$(lenmax=100;wcount=20; rlenmax=$(expr $lenmax - 1); echo $(shuf /usr/share/dict/words | head -n $wcount | tr -s "\n" " ") | sed -E "s/^(.{$rlenmax}).*$/\1/")
  86. ISSST=$(lenmax=100;wcount=20; rlenmax=$(expr $lenmax - 1); echo $(shuf /usr/share/dict/words | head -n $wcount | tr -s "\n" " ") | sed -E "s/^(.{$rlenmax}).*$/\1/")
  87. LG=$(shuf -e 'fr' 'en' 'es' 'ger' 'it'| head -n 1)
  88. DESC=$(lenmax=500;wcount=100; rlenmax=$(expr $lenmax - 1); echo $(shuf /usr/share/dict/words | head -n $wcount | tr -s "\n" " ") | sed -E "s/^(.{$rlenmax}).*$/\1/")
  89. PBN=$(lenmax=500;wcount=100; rlenmax=$(expr $lenmax - 1); echo $(shuf /usr/share/dict/words | head -n $wcount | tr -s "\n" " ") | sed -E "s/^(.{$rlenmax}).*$/\1/")
  90. ISBN=$(</dev/urandom tr -dc 0-9 | head -c10;echo;)
  91. PISBN=$(</dev/urandom tr -dc 0-9 | head -c10;echo;)
  92. ISSNU=$(lenmax=30;wcount=10; rlenmax=$(expr $lenmax - 1); echo $(shuf /usr/share/dict/words | head -n $wcount | tr -s "\n" " ") | sed -E "s/^(.{$rlenmax}).*$/\1/")
  93. ISSCOV=$(lenmax=100;wcount=15; rlenmax=$(expr $lenmax - 1); echo $(shuf /usr/share/dict/words | head -n $wcount | tr -s "\n" " ") | sed -E "s/^(.{$rlenmax}).*$/\1/")
  94. M=$(shuf -e '01' '02' '03' '04' '05' '06' '07' '08' '09' '10' '11' '12' | head -n 1)
  95. JJ=$(shuf -e '01' '02' '03' '04' '05' '06' '07' '08' '09' '10' '11' '12' '13' '14' '15' '16' '17' '18' '19' '20' '21' '22' '23' '24' '25' '26' '27' '28' | head -n 1)
  96. AA=$(shuf -e '2012' '2005' '2010' '2015' '2016'| head -n 1)
  97. PPDATE=$AA'-'$M'-'$JJ
  98. M=$(shuf -e '01' '02' '03' '04' '05' '06' '07' '08' '09' '10' '11' '12' | head -n 1)
  99. JJ=$(shuf -e '01' '02' '03' '04' '05' '06' '07' '08' '09' '10' '11' '12' '13' '14' '15' '16' '17' '18' '19' '20' '21' '22' '23' '24' '25' '26' '27' '28' | head -n 1)
  100. AA=$(shuf -e '2012' '2005' '2010' '2015' '2016'| head -n 1)
  101. EPDATE=$AA'-'$M'-'$JJ
  102. LNG=$(</dev/urandom tr -dc 0-9 | head -c3;echo;)
  103. ISSAB=$(lenmax=$LNG;wcount=200; rlenmax=$(expr $lenmax - 1); echo $(shuf /usr/share/dict/words | head -n $wcount | tr -s "\n" " ") | sed -E "s/^(.{$rlenmax}).*$/\1/")
  104. ISSLPA=''
  105. ISSLTXT=''
  106. curl $curl_options -d "field_input_title=$ISST&field_input_subtitle=$ISSST&field_input_language=$LG&field_input_linked_directors=$ISSLD&field_input_description=$DESC&field_input_publisher_note=$PBN&field_input_isbn=$ISBN&field_input_print_isbn=$PISBN&field_input_number=$ISSNU&field_input_cover=$ISSCOV&field_input_print_pub_date=$PPDATE&field_input_e_pub_date=$EPDATE&field_input_abstract=$ISSAB&field_input_collection=$collection&field_input_linked_parts=$ISSLPA&field_input_linked_texts=$ISSLTXT&classname=Issue" http://$host/$instance/admin/create?classname=Issue
  107. issue=$(printf "use $dbname\n db.Issue.find({}, {lodel_id:1, _id:0}).sort({_id:-1}).limit(1)" | mongo $HOSTDB/admin -u $dbuser -p $dbpwd | sed "1,3d" | sed -e "s/{ \"lodel_id\" : //g" | sed -e "s/ }//g" | sed "\$d" )
  108. # On entre les textes correspondants aux numéros indépendemment des parts
  109. NBT=$(shuf -e '2' '3' '4' '5' '6' '8' | head -n 1)
  110. for i in `eval echo {1..$NBT}`;
  111. do
  112. # Classe Article, champs à remplir : title, subtitle, language, text, pub_date, footnotes, linked_entries, linked_persons, linked_container, abstract, appendix, bibliography, author_note
  113. ATCT=$(lenmax=100;wcount=20; rlenmax=$(expr $lenmax - 1); echo $(shuf /usr/share/dict/words | head -n $wcount | tr -s "\n" " ") | sed -E "s/^(.{$rlenmax}).*$/\1/")
  114. ATCST=$(lenmax=100;wcount=20; rlenmax=$(expr $lenmax - 1); echo $(shuf /usr/share/dict/words | head -n $wcount | tr -s "\n" " ") | sed -E "s/^(.{$rlenmax}).*$/\1/")
  115. LG=$(shuf -e 'fr' 'en' 'es' 'ger' 'it'| head -n 1)
  116. LNG=32000; #$(</dev/urandom tr -dc 0-9 | head -c5;echo;)
  117. ATCTXT=$(lenmax=$LNG;wcount=12000; rlenmax=$(expr $lenmax - 1); echo $(shuf /usr/share/dict/words | head -n $wcount | tr -s "\n" " ") | sed -E "s/^(.{$rlenmax}).*$/\1/")
  118. M=$(shuf -e '01' '02' '03' '04' '05' '06' '07' '08' '09' '10' '11' '12' | head -n 1)
  119. JJ=$(shuf -e '01' '02' '03' '04' '05' '06' '07' '08' '09' '10' '11' '12' '13' '14' '15' '16' '17' '18' '19' '20' '21' '22' '23' '24' '25' '26' '27' '28' | head -n 1)
  120. AA=$(shuf -e '2012' '2005' '2010' '2015' '2016'| head -n 1)
  121. ATCDATE=$AA'-'$M'-'$JJ
  122. LNG=$(</dev/urandom tr -dc 0-9 | head -c4;echo;)
  123. ATCFN=$(lenmax=$LNG;wcount=2000; rlenmax=$(expr $lenmax - 1); echo $(shuf /usr/share/dict/words | head -n $wcount | tr -s "\n" " ") | sed -E "s/^(.{$rlenmax}).*$/\1/")
  124. nb=$(( ( $RANDOM % 10 ) + 1 ))
  125. entries=$(printf "use $dbname\nDBQuery.shellBatchSize = 30000\n db.Entry.find({}, {lodel_id:1, _id:0})" | mongo $HOSTDB/admin -u $dbuser -p $dbpwd | sed "1,4d" | sed -e "s/{ \"lodel_id\" : //g" | sed -e "s/ }//g" | sed "\$d" | shuf | head -n $nb;)
  126. tmp=""
  127. for i in $entries
  128. do
  129. if [[ ! -z $tmp ]]
  130. then
  131. tmp=$(printf "$tmp, $i")
  132. else
  133. tmp=$i
  134. fi
  135. done
  136. ATCLE=$tmp
  137. nb=$(( ( $RANDOM % 10 ) + 1 ))
  138. persons=$(printf "use $dbname\nDBQuery.shellBatchSize = 30000\n db.Person.find({}, {lodel_id:1, _id:0})" | mongo $HOSTDB/admin -u $dbuser -p $dbpwd | sed "1,4d" | sed -e "s/{ \"lodel_id\" : //g" | sed -e "s/ }//g" | sed "\$d" | shuf | head -n $nb;)
  139. tmp=""
  140. for i in $persons
  141. do
  142. if [[ ! -z $tmp ]]
  143. then
  144. tmp=$(printf "$tmp, $i")
  145. else
  146. tmp=$i
  147. fi
  148. done
  149. ATCLP=$tmp
  150. ATCLC=$issue
  151. LNG=$(</dev/urandom tr -dc 0-9 | head -c3;echo;)
  152. ATCAB=$(lenmax=$LNG;wcount=200; rlenmax=$(expr $lenmax - 1); echo $(shuf /usr/share/dict/words | head -n $wcount | tr -s "\n" " ") | sed -E "s/^(.{$rlenmax}).*$/\1/")
  153. LNG=$(</dev/urandom tr -dc 0-9 | head -c4;echo;)
  154. ATCAP=$(lenmax=$LNG;wcount=2000; rlenmax=$(expr $lenmax - 1); echo $(shuf /usr/share/dict/words | head -n $wcount | tr -s "\n" " ") | sed -E "s/^(.{$rlenmax}).*$/\1/")
  155. LNG=$(</dev/urandom tr -dc 0-9 | head -c4;echo;)
  156. ATCBI=$(lenmax=$LNG;wcount=2000; rlenmax=$(expr $lenmax - 1); echo $(shuf /usr/share/dict/words | head -n $wcount | tr -s "\n" " ") | sed -E "s/^(.{$rlenmax}).*$/\1/")
  157. LNG=$(</dev/urandom tr -dc 0-9 | head -c3;echo;)
  158. ATCAN=$(lenmax=$LNG;wcount=200; rlenmax=$(expr $lenmax - 1); echo $(shuf /usr/share/dict/words | head -n $wcount | tr -s "\n" " ") | sed -E "s/^(.{$rlenmax}).*$/\1/")
  159. curl $curl_options -d "field_input_title=$ATCT&field_input_subtitle=$ATCST&field_input_language=$LG&field_input_text=$ATCTXT&field_input_pub_date=$ATCDATE&field_input_footnotes=$ATCFN&field_input_linked_entries=$ATCLE&field_input_linked_persons=$ATCLP&field_input_linked_container=$ATCLC&field_input_abstract=$ATCAB&field_input_appendix=$ATCAP&field_input_bibliography=$ATCBI&field_input_author_note=$ATCAN&classname=Article" http://$host/$instance/admin/create?classname=Article
  160. done
  161. NBR=$(shuf -e '0' '2' '1' | head -n 1)
  162. for i in `eval echo {1..$NBR}`;
  163. do
  164. # Classe Review, champs à remplir : title, subtitle, language, text, pub_date, footnotes, linked_entries, linked_persons, linked_container,reference
  165. RET=$(lenmax=100;wcount=20; rlenmax=$(expr $lenmax - 1); echo $(shuf /usr/share/dict/words | head -n $wcount | tr -s "\n" " ") | sed -E "s/^(.{$rlenmax}).*$/\1/")
  166. REST=$(lenmax=100;wcount=20; rlenmax=$(expr $lenmax - 1); echo $(shuf /usr/share/dict/words | head -n $wcount | tr -s "\n" " ") | sed -E "s/^(.{$rlenmax}).*$/\1/")
  167. LG=$(shuf -e 'fr' 'en' 'es' 'ger' 'it'| head -n 1)
  168. LNG=32000 #$(</dev/urandom tr -dc 0-9 | head -c5;echo;)
  169. RETXT=$(lenmax=$LNG;wcount=12000; rlenmax=$(expr $lenmax - 1); echo $(shuf /usr/share/dict/words | head -n $wcount | tr -s "\n" " ") | sed -E "s/^(.{$rlenmax}).*$/\1/")
  170. M=$(shuf -e '01' '02' '03' '04' '05' '06' '07' '08' '09' '10' '11' '12' | head -n 1)
  171. JJ=$(shuf -e '01' '02' '03' '04' '05' '06' '07' '08' '09' '10' '11' '12' '13' '14' '15' '16' '17' '18' '19' '20' '21' '22' '23' '24' '25' '26' '27' '28' | head -n 1)
  172. AA=$(shuf -e '2012' '2005' '2010' '2015' '2016'| head -n 1)
  173. REDATE=$AA'-'$M'-'$JJ
  174. LNG=$(</dev/urandom tr -dc 0-9 | head -c4;echo;)
  175. REFN=$(lenmax=$LNG;wcount=2000; rlenmax=$(expr $lenmax - 1); echo $(shuf /usr/share/dict/words | head -n $wcount | tr -s "\n" " ") | sed -E "s/^(.{$rlenmax}).*$/\1/")
  176. nb=$(( ( RANDOM % 10 ) + 1 ))
  177. entries=$(printf "use $dbname\nDBQuery.shellBatchSize = 30000\n db.Entry.find({}, {lodel_id:1, _id:0})" | mongo $HOSTDB/admin -u $dbuser -p $dbpwd | sed "1,4d" | sed -e "s/{ \"lodel_id\" : //g" | sed -e "s/ }//g" | sed "\$d" | shuf | head -n $nb;)
  178. tmp=""
  179. for i in $entries
  180. do
  181. if [[ ! -z $tmp ]]
  182. then
  183. tmp=$(printf "$tmp, $i")
  184. else
  185. tmp=$i
  186. fi
  187. done
  188. RELE=$tmp
  189. nb=$(( ( RANDOM % 10 ) + 1 ))
  190. persons=$(printf "use $dbname\nDBQuery.shellBatchSize = 30000\n db.Person.find({}, {lodel_id:1, _id:0})" | mongo $HOSTDB/admin -u $dbuser -p $dbpwd | sed "1,4d" | sed -e "s/{ \"lodel_id\" : //g" | sed -e "s/ }//g" | sed "\$d" | shuf | head -n $nb; )
  191. tmp=""
  192. for i in $persons
  193. do
  194. if [[ ! -z $tmp ]]
  195. then
  196. tmp=$(printf "$tmp, $i")
  197. else
  198. tmp=$i
  199. fi
  200. done
  201. RELP=$tmp
  202. RELC=$issue
  203. REREF=$(lenmax=300;wcount=90; rlenmax=$(expr $lenmax - 1); echo $(shuf /usr/share/dict/words | head -n $wcount | tr -s "\n" " ") | sed -E "s/^(.{$rlenmax}).*$/\1/")
  204. curl $curl_options -d "field_input_title=$RET&field_input_subtitle=$REST&field_input_language=$LG&field_input_text=$RETXT&field_input_pub_date=$REDATE&field_input_footnotes=$REFN&field_input_linked_entries=$RELE&field_input_linked_persons=$RELP&field_input_linked_container=$RELC&field_input_reference=$REREF&classname=Review" http://$host/$instance/admin/create?classname=Review
  205. done
  206. NBP=$(shuf -e '2' '3' | head -n 1) # Nombre de parts en relation directe avec des issues
  207. for i in `eval echo {1..$NBP}`;
  208. do
  209. # Classe Part, champs à remplir : title, subtitle, language, linked_directors, description, publisher_note, isbn, print_isbn, number, cover, print_pub_date, e_pub_date, abstract, publication
  210. NBLD=$(shuf -e '1' '2' '3' '4' | head -n 1)
  211. directors=$(printf "use $dbname\n DBQuery.shellBatchSize = 30000\n db.Person.find({}, {lodel_id:1, _id:0})" | mongo $HOSTDB/admin -u $dbuser -p $dbpwd | sed "1,4d" | sed -e "s/{ \"lodel_id\" : //g" | sed -e "s/ }//g" | sed "\$d" | shuf | head -n $NBLD;)
  212. tmp=''
  213. for j in $directors
  214. do
  215. if [[ ! -z $tmp ]]
  216. then
  217. tmp=$(printf "$tmp, $j")
  218. else
  219. tmp=$j
  220. fi
  221. done
  222. PALD=$tmp
  223. PAT=$(lenmax=100;wcount=20; rlenmax=$(expr $lenmax - 1); echo $(shuf /usr/share/dict/words | head -n $wcount | tr -s "\n" " ") | sed -E "s/^(.{$rlenmax}).*$/\1/")
  224. PAST=$(lenmax=100;wcount=20; rlenmax=$(expr $lenmax - 1); echo $(shuf /usr/share/dict/words | head -n $wcount | tr -s "\n" " ") | sed -E "s/^(.{$rlenmax}).*$/\1/")
  225. LG=$(shuf -e 'fr' 'en' 'es' 'ger' 'it'| head -n 1)
  226. DESC=$(lenmax=500;wcount=100; rlenmax=$(expr $lenmax - 1); echo $(shuf /usr/share/dict/words | head -n $wcount | tr -s "\n" " ") | sed -E "s/^(.{$rlenmax}).*$/\1/")
  227. PBN=$(lenmax=500;wcount=100; rlenmax=$(expr $lenmax - 1); echo $(shuf /usr/share/dict/words | head -n $wcount | tr -s "\n" " ") | sed -E "s/^(.{$rlenmax}).*$/\1/")
  228. issue=$(printf "use $dbname\nDBQuery.shellBatchSize = 1000\n db.Issue.find({collection:$collection}, {lodel_id:1, _id:0})" | mongo $HOSTDB/admin -u $dbuser -p $dbpwd | sed "1,4d" | sed -e "s/{ \"lodel_id\" : //g" | sed -e "s/ }//g" | sed "\$d" | shuf | head -n 1;)
  229. PALTXT=''
  230. PALP=''
  231. curl $curl_options -d "field_input_title=$PAT&field_input_subtitle=$PAST&field_input_language=$LG&field_input_linked_directors=$PALD&field_input_description=$DESC&field_input_publisher_note=$PBN&field_input_publication=$issue&field_input_linked_parts=$PALP&field_input_linked_texts=$PALTXT&classname=Part" http://$host/$instance/admin/create?classname=Part
  232. part=$(printf "use $dbname\n db.Part.find({}, {lodel_id:1, _id:0}).sort({_id:-1}).limit(1)" | mongo $HOSTDB/admin -u $dbuser -p $dbpwd | sed "1,3d" | sed -e "s/{ \"lodel_id\" : //g" | sed -e "s/ }//g" | sed "\$d" )
  233. # On entre les textes correspondants aux parts
  234. NBPANBT=$(shuf -e '2' '3' '4' | head -n 1)
  235. for i in `eval echo {1..$NBPANBT}`;
  236. do
  237. # Classe Article, champs à remplir : title, subtitle, language, text, pub_date, footnotes, linked_entries, linked_persons, linked_container, abstract, appendix, bibliography, author_note
  238. ATCT=$(lenmax=100;wcount=20; rlenmax=$(expr $lenmax - 1); echo $(shuf /usr/share/dict/words | head -n $wcount | tr -s "\n" " ") | sed -E "s/^(.{$rlenmax}).*$/\1/")
  239. ATCST=$(lenmax=100;wcount=20; rlenmax=$(expr $lenmax - 1); echo $(shuf /usr/share/dict/words | head -n $wcount | tr -s "\n" " ") | sed -E "s/^(.{$rlenmax}).*$/\1/")
  240. LG=$(shuf -e 'fr' 'en' 'es' 'ger' 'it'| head -n 1)
  241. LNG=32000 #$(</dev/urandom tr -dc 0-9 | head -c5;echo;)
  242. ATCTXT=$(lenmax=$LNG;wcount=12000; rlenmax=$(expr $lenmax - 1); echo $(shuf /usr/share/dict/words | head -n $wcount | tr -s "\n" " ") | sed -E "s/^(.{$rlenmax}).*$/\1/")
  243. M=$(shuf -e '01' '02' '03' '04' '05' '06' '07' '08' '09' '10' '11' '12' | head -n 1)
  244. JJ=$(shuf -e '01' '02' '03' '04' '05' '06' '07' '08' '09' '10' '11' '12' '13' '14' '15' '16' '17' '18' '19' '20' '21' '22' '23' '24' '25' '26' '27' '28' | head -n 1)
  245. AA=$(shuf -e '2012' '2005' '2010' '2015' '2016'| head -n 1)
  246. ATCDATE=$AA'-'$M'-'$JJ
  247. LNG=$(</dev/urandom tr -dc 0-9 | head -c4;echo;)
  248. ATCFN=$(lenmax=$LNG;wcount=2000; rlenmax=$(expr $lenmax - 1); echo $(shuf /usr/share/dict/words | head -n $wcount | tr -s "\n" " ") | sed -E "s/^(.{$rlenmax}).*$/\1/")
  249. nb=$(( ( RANDOM % 10 ) + 1 ))
  250. entries=$(printf "use $dbname\nDBQuery.shellBatchSize = 30000\n db.Entry.find({}, {lodel_id:1, _id:0})" | mongo $HOSTDB/admin -u $dbuser -p $dbpwd | sed "1,4d" | sed -e "s/{ \"lodel_id\" : //g" | sed -e "s/ }//g" | sed "\$d" | shuf | head -n $nb;)
  251. tmp=""
  252. for i in $entries
  253. do
  254. if [[ ! -z $tmp ]]
  255. then
  256. tmp=$(printf "$tmp, $i")
  257. else
  258. tmp=$i
  259. fi
  260. done
  261. ATCLE=$tmp
  262. nb=$(( ( RANDOM % 10 ) + 1 ))
  263. persons=$(printf "use $dbname\nDBQuery.shellBatchSize = 30000\n db.Person.find({}, {lodel_id:1, _id:0})" | mongo $HOSTDB/admin -u $dbuser -p $dbpwd | sed "1,4d" | sed -e "s/{ \"lodel_id\" : //g" | sed -e "s/ }//g" | sed "\$d" | shuf | head -n $nb;)
  264. tmp=""
  265. for i in $persons
  266. do
  267. if [[ ! -z $tmp ]]
  268. then
  269. tmp=$(printf "$tmp, $i")
  270. else
  271. tmp=$i
  272. fi
  273. done
  274. ATCLP=$tmp
  275. ATCLC=$part
  276. LNG=$(</dev/urandom tr -dc 0-9 | head -c3;echo;)
  277. ATCAB=$(lenmax=$LNG;wcount=200; rlenmax=$(expr $lenmax - 1); echo $(shuf /usr/share/dict/words | head -n $wcount | tr -s "\n" " ") | sed -E "s/^(.{$rlenmax}).*$/\1/")
  278. LNG=$(</dev/urandom tr -dc 0-9 | head -c4;echo;)
  279. ATCAP=$(lenmax=$LNG;wcount=2000; rlenmax=$(expr $lenmax - 1); echo $(shuf /usr/share/dict/words | head -n $wcount | tr -s "\n" " ") | sed -E "s/^(.{$rlenmax}).*$/\1/")
  280. LNG=$(</dev/urandom tr -dc 0-9 | head -c4;echo;)
  281. ATCBI=$(lenmax=$LNG;wcount=2000; rlenmax=$(expr $lenmax - 1); echo $(shuf /usr/share/dict/words | head -n $wcount | tr -s "\n" " ") | sed -E "s/^(.{$rlenmax}).*$/\1/")
  282. LNG=$(</dev/urandom tr -dc 0-9 | head -c3;echo;)
  283. ATCAN=$(lenmax=$LNG;wcount=200; rlenmax=$(expr $lenmax - 1); echo $(shuf /usr/share/dict/words | head -n $wcount | tr -s "\n" " ") | sed -E "s/^(.{$rlenmax}).*$/\1/")
  284. curl $curl_options -d "field_input_title=$ATCT&field_input_subtitle=$ATCST&field_input_language=$LG&field_input_text=$ATCTXT&field_input_pub_date=$ATCDATE&field_input_footnotes=$ATCFN&field_input_linked_entries=$ATCLE&field_input_linked_persons=$ATCLP&field_input_linked_container=$ATCLC&field_input_abstract=$ATCAB&field_input_appendix=$ATCAP&field_input_bibliography=$ATCBI&field_input_author_note=$ATCAN&classname=Article" http://$host/$instance/admin/create?classname=Article
  285. done
  286. NBPANBR=$(shuf -e '0' '1' '2' | head -n 1)
  287. for i in `eval echo {1..$NBPANBR}`;
  288. do
  289. # Classe Review, champs à remplir : title, subtitle, language, text, pub_date, footnotes, linked_entries, linked_persons, linked_container,reference
  290. RET=$(lenmax=100;wcount=20; rlenmax=$(expr $lenmax - 1); echo $(shuf /usr/share/dict/words | head -n $wcount | tr -s "\n" " ") | sed -E "s/^(.{$rlenmax}).*$/\1/")
  291. REST=$(lenmax=100;wcount=20; rlenmax=$(expr $lenmax - 1); echo $(shuf /usr/share/dict/words | head -n $wcount | tr -s "\n" " ") | sed -E "s/^(.{$rlenmax}).*$/\1/")
  292. LG=$(shuf -e 'fr' 'en' 'es' 'ger' 'it'| head -n 1)
  293. LNG=32000 #$(</dev/urandom tr -dc 0-9 | head -c5;echo;)
  294. RETXT=$(lenmax=$LNG;wcount=12000; rlenmax=$(expr $lenmax - 1); echo $(shuf /usr/share/dict/words | head -n $wcount | tr -s "\n" " ") | sed -E "s/^(.{$rlenmax}).*$/\1/")
  295. M=$(shuf -e '01' '02' '03' '04' '05' '06' '07' '08' '09' '10' '11' '12' | head -n 1)
  296. JJ=$(shuf -e '01' '02' '03' '04' '05' '06' '07' '08' '09' '10' '11' '12' '13' '14' '15' '16' '17' '18' '19' '20' '21' '22' '23' '24' '25' '26' '27' '28' | head -n 1)
  297. AA=$(shuf -e '2012' '2005' '2010' '2015' '2016'| head -n 1)
  298. REDATE=$AA'-'$M'-'$JJ
  299. LNG=$(</dev/urandom tr -dc 0-9 | head -c4;echo;)
  300. REFN=$(lenmax=$LNG;wcount=2000; rlenmax=$(expr $lenmax - 1); echo $(shuf /usr/share/dict/words | head -n $wcount | tr -s "\n" " ") | sed -E "s/^(.{$rlenmax}).*$/\1/")
  301. nb=$(( ( RANDOM % 10 ) + 1 ))
  302. entries=$(printf "use $dbname\nDBQuery.shellBatchSize = 30000\n db.Entry.find({}, {lodel_id:1, _id:0})" | mongo $HOSTDB/admin -u $dbuser -p $dbpwd | sed "1,4d" | sed -e "s/{ \"lodel_id\" : //g" | sed -e "s/ }//g" | sed "\$d" | shuf | head -n $nb;)
  303. tmp=""
  304. for i in $entries
  305. do
  306. if [[ ! -z $tmp ]]
  307. then
  308. tmp=$(printf "$tmp, $i")
  309. else
  310. tmp=$i
  311. fi
  312. done
  313. RELE=$tmp
  314. nb=$(( ( RANDOM % 10 ) + 1 ))
  315. persons=$(printf "use $dbname\nDBQuery.shellBatchSize = 30000\n db.Person.find({}, {lodel_id:1, _id:0})" | mongo $HOSTDB/admin -u $dbuser -p $dbpwd | sed "1,4d" | sed -e "s/{ \"lodel_id\" : //g" | sed -e "s/ }//g" | sed "\$d" | shuf | head -n $nb; )
  316. tmp=""
  317. for i in $persons
  318. do
  319. if [[ ! -z $tmp ]]
  320. then
  321. tmp=$(printf "$tmp, $i")
  322. else
  323. tmp=$i
  324. fi
  325. done
  326. RELP=$tmp
  327. RELC=$part
  328. REREF=$(lenmax=300;wcount=90; rlenmax=$(expr $lenmax - 1); echo $(shuf /usr/share/dict/words | head -n $wcount | tr -s "\n" " ") | sed -E "s/^(.{$rlenmax}).*$/\1/")
  329. curl $curl_options -d "field_input_title=$RET&field_input_subtitle=$REST&field_input_language=$LG&field_input_text=$RETXT&field_input_pub_date=$REDATE&field_input_footnotes=$REFN&field_input_linked_entries=$RELE&field_input_linked_persons=$RELP&field_input_linked_container=$RELC&field_input_reference=$REREF&classname=Review" http://$host/$instance/admin/create?classname=Review
  330. done
  331. NBSP=$(shuf -e '0' '1' '2' '3' | head -n 1) # Nombre de parts en relation avec d'autres parts
  332. for i in `eval echo {1..$NBSP}`;
  333. do
  334. # Classe Part, champs à remplir : title, subtitle, language, linked_director, description, publisher_note, isbn, print_isbn, number, cover, print_pub_date, e_pub_date, abstract, publication
  335. NBLD=$(shuf -e '1' '2' '3' '4' | head -n 1)
  336. directors=$(printf "use $dbname\n DBQuery.shellBatchSize = 30000\n db.Person.find({}, {lodel_id:1, _id:0})" | mongo $HOSTDB/admin -u $dbuser -p $dbpwd | sed "1,4d" | sed -e "s/{ \"lodel_id\" : //g" | sed -e "s/ }//g" | sed "\$d" | shuf | head -n $NBLD;)
  337. tmp=''
  338. for j in $directors
  339. do
  340. if [[ ! -z $tmp ]]
  341. then
  342. tmp=$(printf "$tmp, $j")
  343. else
  344. tmp=$j
  345. fi
  346. done
  347. PALD=$tmp
  348. PAT=$(lenmax=100;wcount=20; rlenmax=$(expr $lenmax - 1); echo $(shuf /usr/share/dict/words | head -n $wcount | tr -s "\n" " ") | sed -E "s/^(.{$rlenmax}).*$/\1/")
  349. PAST=$(lenmax=100;wcount=20; rlenmax=$(expr $lenmax - 1); echo $(shuf /usr/share/dict/words | head -n $wcount | tr -s "\n" " ") | sed -E "s/^(.{$rlenmax}).*$/\1/")
  350. LG=$(shuf -e 'fr' 'en' 'es' 'ger' 'it'| head -n 1)
  351. DESC=$(lenmax=500;wcount=100; rlenmax=$(expr $lenmax - 1); echo $(shuf /usr/share/dict/words | head -n $wcount | tr -s "\n" " ") | sed -E "s/^(.{$rlenmax}).*$/\1/")
  352. PBN=$(lenmax=500;wcount=100; rlenmax=$(expr $lenmax - 1); echo $(shuf /usr/share/dict/words | head -n $wcount | tr -s "\n" " ") | sed -E "s/^(.{$rlenmax}).*$/\1/")
  353. PALTXT=''
  354. PALP=''
  355. curl $curl_options -d "field_input_title=$PAT
  356. &field_input_subtitle=$PAST
  357. &field_input_language=$LG
  358. &field_input_linked_directors=$PALD
  359. &field_input_description=$DESC&field_input_publisher_note=$PBN&field_input_publication=$part
  360. &field_input_linked_parts=$PALP&field_input_linked_texts=$PALTXT&classname=Part" http://$host/$instance/admin/create?classname=Part
  361. part=$(printf "use $dbname\n db.Part.find({}, {lodel_id:1, _id:0}).sort({_id:-1}).limit(1)" | mongo $HOSTDB/admin -u $dbuser -p $dbpwd | sed "1,3d" | sed -e "s/{ \"lodel_id\" : //g" | sed -e "s/ }//g" | sed "\$d" )
  362. # On entre les textes correspondants aux numéros indépendemment des parts
  363. for i in `eval echo {1..$NBA}`;
  364. do
  365. # Classe Article, champs à remplir : title, subtitle, language, text, pub_date, footnotes, linked_entries, linked_persons, linked_container, abstract, appendix, bibliography, author_note
  366. ATCT=$(lenmax=100;wcount=20; rlenmax=$(expr $lenmax - 1); echo $(shuf /usr/share/dict/words | head -n $wcount | tr -s "\n" " ") | sed -E "s/^(.{$rlenmax}).*$/\1/")
  367. ATCST=$(lenmax=100;wcount=20; rlenmax=$(expr $lenmax - 1); echo $(shuf /usr/share/dict/words | head -n $wcount | tr -s "\n" " ") | sed -E "s/^(.{$rlenmax}).*$/\1/")
  368. LG=$(shuf -e 'fr' 'en' 'es' 'ger' 'it'| head -n 1)
  369. LNG=32000 #$(</dev/urandom tr -dc 0-9 | head -c5;echo;)
  370. ATCTXT=$(lenmax=$LNG;wcount=12000; rlenmax=$(expr $lenmax - 1); echo $(shuf /usr/share/dict/words | head -n $wcount | tr -s "\n" " ") | sed -E "s/^(.{$rlenmax}).*$/\1/")
  371. M=$(shuf -e '01' '02' '03' '04' '05' '06' '07' '08' '09' '10' '11' '12' | head -n 1)
  372. JJ=$(shuf -e '01' '02' '03' '04' '05' '06' '07' '08' '09' '10' '11' '12' '13' '14' '15' '16' '17' '18' '19' '20' '21' '22' '23' '24' '25' '26' '27' '28' | head -n 1)
  373. AA=$(shuf -e '2012' '2005' '2010' '2015' '2016'| head -n 1)
  374. ATCDATE=$AA'-'$M'-'$JJ
  375. LNG=$(</dev/urandom tr -dc 0-9 | head -c4;echo;)
  376. ATCFN=$(lenmax=$LNG;wcount=2000; rlenmax=$(expr $lenmax - 1); echo $(shuf /usr/share/dict/words | head -n $wcount | tr -s "\n" " ") | sed -E "s/^(.{$rlenmax}).*$/\1/")
  377. nb=$(( ( RANDOM % 10 ) + 1 ))
  378. entries=$(printf "use $dbname\nDBQuery.shellBatchSize = 30000\n db.Entry.find({}, {lodel_id:1, _id:0})" | mongo $HOSTDB/admin -u $dbuser -p $dbpwd | sed "1,4d" | sed -e "s/{ \"lodel_id\" : //g" | sed -e "s/ }//g" | sed "\$d" | shuf | head -n $nb;)
  379. tmp=""
  380. for i in $entries
  381. do
  382. if [[ ! -z $tmp ]]
  383. then
  384. tmp=$(printf "$tmp, $i")
  385. else
  386. tmp=$i
  387. fi
  388. done
  389. ATCLE=$tmp
  390. nb=$(( ( RANDOM % 10 ) + 1 ))
  391. persons=$(printf "use $dbname\nDBQuery.shellBatchSize = 30000\n db.Person.find({}, {lodel_id:1, _id:0})" | mongo $HOSTDB/admin -u $dbuser -p $dbpwd | sed "1,4d" | sed -e "s/{ \"lodel_id\" : //g" | sed -e "s/ }//g" | sed "\$d" | shuf | head -n $nb;)
  392. tmp=""
  393. for i in $persons
  394. do
  395. if [[ ! -z $tmp ]]
  396. then
  397. tmp=$(printf "$tmp, $i")
  398. else
  399. tmp=$i
  400. fi
  401. done
  402. ATCLP=$tmp
  403. ATCLC=$part
  404. LNG=$(</dev/urandom tr -dc 0-9 | head -c3;echo;)
  405. ATCAB=$(lenmax=$LNG;wcount=200; rlenmax=$(expr $lenmax - 1); echo $(shuf /usr/share/dict/words | head -n $wcount | tr -s "\n" " ") | sed -E "s/^(.{$rlenmax}).*$/\1/")
  406. LNG=$(</dev/urandom tr -dc 0-9 | head -c4;echo;)
  407. ATCAP=$(lenmax=$LNG;wcount=2000; rlenmax=$(expr $lenmax - 1); echo $(shuf /usr/share/dict/words | head -n $wcount | tr -s "\n" " ") | sed -E "s/^(.{$rlenmax}).*$/\1/")
  408. LNG=$(</dev/urandom tr -dc 0-9 | head -c4;echo;)
  409. ATCBI=$(lenmax=$LNG;wcount=2000; rlenmax=$(expr $lenmax - 1); echo $(shuf /usr/share/dict/words | head -n $wcount | tr -s "\n" " ") | sed -E "s/^(.{$rlenmax}).*$/\1/")
  410. LNG=$(</dev/urandom tr -dc 0-9 | head -c3;echo;)
  411. ATCAN=$(lenmax=$LNG;wcount=200; rlenmax=$(expr $lenmax - 1); echo $(shuf /usr/share/dict/words | head -n $wcount | tr -s "\n" " ") | sed -E "s/^(.{$rlenmax}).*$/\1/")
  412. curl $curl_options -s -d "field_input_title=$ATCT&field_input_subtitle=$ATCST&field_input_language=$LG&field_input_text=$ATCTXT&field_input_pub_date=$ATCDATE&field_input_footnotes=$ATCFN&field_input_linked_entries=$ATCLE&field_input_linked_persons=$ATCLP&field_input_linked_container=$ATCLC&field_input_abstract=$ATCAB&field_input_appendix=$ATCAP&field_input_bibliography=$ATCBI&field_input_author_note=$ATCAN&classname=Article" http://$host/$instance/admin/create?classname=Article
  413. done
  414. for i in `eval echo {1..$NBR}`;
  415. do
  416. # Classe Review, champs à remplir : title, subtitle, language, text, pub_date, footnotes, linked_entries, linked_persons, linked_container,reference
  417. RET=$(lenmax=100;wcount=20; rlenmax=$(expr $lenmax - 1); echo $(shuf /usr/share/dict/words | head -n $wcount | tr -s "\n" " ") | sed -E "s/^(.{$rlenmax}).*$/\1/")
  418. REST=$(lenmax=100;wcount=20; rlenmax=$(expr $lenmax - 1); echo $(shuf /usr/share/dict/words | head -n $wcount | tr -s "\n" " ") | sed -E "s/^(.{$rlenmax}).*$/\1/")
  419. LG=$(shuf -e 'fr' 'en' 'es' 'ger' 'it'| head -n 1)
  420. LNG=32000 #$(</dev/urandom tr -dc 0-9 | head -c5;echo;)
  421. RETXT=$(lenmax=$LNG;wcount=12000; rlenmax=$(expr $lenmax - 1); echo $(shuf /usr/share/dict/words | head -n $wcount | tr -s "\n" " ") | sed -E "s/^(.{$rlenmax}).*$/\1/")
  422. M=$(shuf -e '01' '02' '03' '04' '05' '06' '07' '08' '09' '10' '11' '12' | head -n 1)
  423. JJ=$(shuf -e '01' '02' '03' '04' '05' '06' '07' '08' '09' '10' '11' '12' '13' '14' '15' '16' '17' '18' '19' '20' '21' '22' '23' '24' '25' '26' '27' '28' | head -n 1)
  424. AA=$(shuf -e '2012' '2005' '2010' '2015' '2016'| head -n 1)
  425. REDATE=$AA'-'$M'-'$JJ
  426. LNG=$(</dev/urandom tr -dc 0-9 | head -c4;echo;)
  427. REFN=$(lenmax=$LNG;wcount=2000; rlenmax=$(expr $lenmax - 1); echo $(shuf /usr/share/dict/words | head -n $wcount | tr -s "\n" " ") | sed -E "s/^(.{$rlenmax}).*$/\1/")
  428. nb=$(( ( RANDOM % 10 ) + 1 ))
  429. entries=$(printf "use $dbname\nDBQuery.shellBatchSize = 30000\n db.Entry.find({}, {lodel_id:1, _id:0})" | mongo $HOSTDB/admin -u $dbuser -p $dbpwd | sed "1,4d" | sed -e "s/{ \"lodel_id\" : //g" | sed -e "s/ }//g" | sed "\$d" | shuf | head -n $nb;)
  430. tmp=""
  431. for i in $entries
  432. do
  433. if [[ ! -z $tmp ]]
  434. then
  435. tmp=$(printf "$tmp, $i")
  436. else
  437. tmp=$i
  438. fi
  439. done
  440. RELE=$tmp
  441. nb=$(( ( RANDOM % 10 ) + 1 ))
  442. persons=$(printf "use $dbname\nDBQuery.shellBatchSize = 30000\n db.Person.find({}, {lodel_id:1, _id:0})" | mongo $HOSTDB/admin -u $dbuser -p $dbpwd | sed "1,4d" | sed -e "s/{ \"lodel_id\" : //g" | sed -e "s/ }//g" | sed "\$d" | shuf | head -n $nb; )
  443. tmp=""
  444. for i in $persons
  445. do
  446. if [[ ! -z $tmp ]]
  447. then
  448. tmp=$(printf "$tmp, $i")
  449. else
  450. tmp=$i
  451. fi
  452. done
  453. RELP=$tmp
  454. RELC=$issue
  455. REREF=$(lenmax=300;wcount=90; rlenmax=$(expr $lenmax - 1); echo $(shuf /usr/share/dict/words | head -n $wcount | tr -s "\n" " ") | sed -E "s/^(.{$rlenmax}).*$/\1/")
  456. curl $curl_options -d "field_input_title=$RET&field_input_subtitle=$REST&field_input_language=$LG&field_input_text=$RETXT&field_input_pub_date=$REDATE&field_input_footnotes=$REFN&field_input_linked_entries=$RELE&field_input_linked_persons=$RELP&field_input_linked_container=$RELC&field_input_reference=$REREF&classname=Review" http://$host/$instance/admin/create?classname=Review
  457. done
  458. done
  459. done
  460. done
  461. done