Changeset 31 for trunk/mailtousernemo.sh
- Timestamp:
- 11/15/07 15:31:47 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/mailtousernemo.sh
r23 r31 2 2 # 3 3 # module : 4 # convert email text in xml form folloowing user nemo.dtd4 # convert email text in xml form folloowing user.dtd 5 5 # 6 6 # see also bibopa.sh 7 7 # 8 # original location :9 # /usr/home/fplod/incas/bibnemo/src/bibnemomaf/mailtousernemo.sh sur aedon.locean-ipsl.upmc.fr10 #11 8 # example : 12 # $ ./mailtouser nemo.sh -m data/mail2007-04-25T08:58:16Z.txt -x ginette.xml9 # $ ./mailtouser.sh -m data/mail2007-04-25T08:58:16Z.txt -x ginette.xml 13 10 # 14 11 # see also bibopa.sh … … 43 40 fi 44 41 # 45 # check for user nemo.dtd46 if [ ! -f user nemo.dtd ]47 then 48 echo "eee : user nemo.dtd not found"42 # check for user.dtd 43 if [ ! -f user.dtd ] 44 then 45 echo "eee : user.dtd not found" 49 46 exit 1 50 47 fi … … 81 78 #++ err si exist 82 79 # 83 echo "<user nemo>" > ${xmloutput}80 echo "<user>" > ${xmloutput} 84 81 echo "<!-- mailbodyfile : ${mailbodyfile} " >> ${xmloutput} 85 82 cat ${mailbodyfile} >> ${xmloutput} … … 116 113 elements=components 117 114 element=component 118 #++ récupérer les users nemo/usernemo[child::userid='template']/components/component/name115 #++ récupérer les users/user[child::userid='template']/components/component/name 119 116 unset jlist 120 117 unset jlist_name … … 170 167 element=platform 171 168 elements=platforms 172 #++ récupérer les users nemo/usernemo[child::userid='template']/platforms/platform/name169 #++ récupérer les users/user[child::userid='template']/platforms/platform/name 173 170 unset jlist 174 171 unset jlist_name … … 301 298 echo "</${elements}>" >> ${xmloutput} 302 299 # 303 echo "</user nemo>" >> ${xmloutput}300 echo "</user>" >> ${xmloutput} 304 301 # 305 302 xmloutputfull=/tmp/${xmloutput} # ++ 306 303 echo '<?xml version="1.0" encoding="iso-8859-1"?>' > ${xmloutputfull} 307 echo '<!DOCTYPE users nemo SYSTEM "usernemo.dtd">' >> ${xmloutputfull}308 echo '<users nemo>' >> ${xmloutputfull}304 echo '<!DOCTYPE users SYSTEM "user.dtd">' >> ${xmloutputfull} 305 echo '<users>' >> ${xmloutputfull} 309 306 echo '<date>bidon</date>' >> ${xmloutputfull} 310 307 cat ${xmloutput} >> ${xmloutputfull} 311 echo '</users nemo>' >> ${xmloutputfull}308 echo '</users>' >> ${xmloutputfull} 312 309 # 313 310 # ++ parce que je ne sais pas dire où est la dtd dans la commande xmllint 314 cp user nemo.dtd /tmp/311 cp user.dtd /tmp/ 315 312 xmllint --noout --valid ${xmloutputfull} 1>> ${log} 2>> ${log} 316 313 status=${?} … … 321 318 exit 1 322 319 else 323 echo " iii : you can include ${xmloutput} in user nemo.xml" #++ filename path324 echo " iii : modify date in user nemo.xml" #++ filename path320 echo " iii : you can include ${xmloutput} in user.xml" #++ filename path 321 echo " iii : modify date in user.xml" #++ filename path 325 322 fi 326 323 #
Note: See TracChangeset
for help on using the changeset viewer.