Changeset 31 for trunk/mailtousernemo.sh


Ignore:
Timestamp:
11/15/07 15:31:47 (16 years ago)
Author:
pinsard
Message:

remove nemo in elements names and filenames

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/mailtousernemo.sh

    r23 r31  
    22# 
    33# module : 
    4 # convert email text in xml form folloowing usernemo.dtd 
     4# convert email text in xml form folloowing user.dtd 
    55# 
    66# see also bibopa.sh 
    77# 
    8 # original location : 
    9 # /usr/home/fplod/incas/bibnemo/src/bibnemomaf/mailtousernemo.sh sur aedon.locean-ipsl.upmc.fr 
    10 # 
    118# example : 
    12 # $ ./mailtousernemo.sh -m data/mail2007-04-25T08:58:16Z.txt -x ginette.xml 
     9# $ ./mailtouser.sh -m data/mail2007-04-25T08:58:16Z.txt -x ginette.xml 
    1310# 
    1411# see also bibopa.sh 
     
    4340fi 
    4441# 
    45 # check for usernemo.dtd 
    46 if [ ! -f usernemo.dtd ] 
    47 then 
    48   echo "eee : usernemo.dtd not found" 
     42# check for user.dtd 
     43if [ ! -f user.dtd ] 
     44then 
     45  echo "eee : user.dtd not found" 
    4946  exit 1 
    5047fi 
     
    8178#++ err si exist 
    8279# 
    83 echo "<usernemo>" > ${xmloutput} 
     80echo "<user>" > ${xmloutput} 
    8481echo "<!-- mailbodyfile : ${mailbodyfile} " >> ${xmloutput} 
    8582cat ${mailbodyfile} >> ${xmloutput} 
     
    116113elements=components 
    117114element=component 
    118 #++ récupérer les usersnemo/usernemo[child::userid='template']/components/component/name 
     115#++ récupérer les users/user[child::userid='template']/components/component/name 
    119116unset jlist 
    120117unset jlist_name 
     
    170167element=platform 
    171168elements=platforms 
    172 #++ récupérer les usersnemo/usernemo[child::userid='template']/platforms/platform/name 
     169#++ récupérer les users/user[child::userid='template']/platforms/platform/name 
    173170unset jlist 
    174171unset jlist_name 
     
    301298echo "</${elements}>" >> ${xmloutput} 
    302299# 
    303 echo "</usernemo>" >> ${xmloutput} 
     300echo "</user>" >> ${xmloutput} 
    304301# 
    305302xmloutputfull=/tmp/${xmloutput} # ++ 
    306303echo '<?xml version="1.0" encoding="iso-8859-1"?>' > ${xmloutputfull} 
    307 echo '<!DOCTYPE usersnemo SYSTEM "usernemo.dtd">' >> ${xmloutputfull} 
    308 echo '<usersnemo>' >> ${xmloutputfull} 
     304echo '<!DOCTYPE users SYSTEM "user.dtd">' >> ${xmloutputfull} 
     305echo '<users>' >> ${xmloutputfull} 
    309306echo '<date>bidon</date>' >> ${xmloutputfull} 
    310307cat ${xmloutput} >> ${xmloutputfull} 
    311 echo '</usersnemo>' >> ${xmloutputfull} 
     308echo '</users>' >> ${xmloutputfull} 
    312309# 
    313310# ++ parce que je ne sais pas dire où est la dtd dans la commande xmllint 
    314 cp usernemo.dtd /tmp/ 
     311cp user.dtd /tmp/ 
    315312xmllint --noout --valid ${xmloutputfull} 1>> ${log} 2>> ${log} 
    316313status=${?} 
     
    321318 exit 1 
    322319else 
    323  echo " iii : you can include ${xmloutput} in usernemo.xml" #++ filename path 
    324  echo " iii : modify date in usernemo.xml" #++ filename path 
     320 echo " iii : you can include ${xmloutput} in user.xml" #++ filename path 
     321 echo " iii : modify date in user.xml" #++ filename path 
    325322fi 
    326323# 
Note: See TracChangeset for help on using the changeset viewer.