Develop and Download Open Source Software

Browse CVS Repository

Contents of /pal/site/src/script/create_portlet_repository.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (show annotations) (download) (as text)
Tue Feb 27 23:49:09 2007 UTC (17 years ago) by shinsuke
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +27 -34 lines
File MIME type: text/x-sh
updated format

1 #!/bin/sh
2
3 rm -f /tmp/files.html
4 wget --header="Accept-Language: en" -O /tmp/files.html http://sourceforge.jp/projects/pal/files/
5 LINES=`iconv -f EUC-JP -t UTF-8 /tmp/files.html | grep -n "HTML Table ()" | sed -e "s/\(.*\):.*/\1/" | sed "1,2d"`
6
7 RUN_COMMAND="sed -e 1,"
8 SEPARATOR="d -e "
9 for line_num in `echo $LINES` ; do
10 RUN_COMMAND="$RUN_COMMAND$line_num$SEPARATOR";
11 SEPARATOR="";
12 done
13 RUN_COMMAND="$RUN_COMMAND,\$d /tmp/files.html";
14
15 echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
16 echo "<repository id=\"jp.sf.pal\" version=\"1.0\">"
17 echo " <portlets>"
18 #$RUN_COMMAND | sed -e "s/<a href=\"\([^\"]*\)\">/\1 /g" -e "s/<[^>]*>/ /g" -e "s/&nbsp;/ /g" -e "s/^ *//g"
19 $RUN_COMMAND | perl -pi -e "s/\r//g" | perl -pi -e "s/\n//g" | perl -pi -e "s/\<\/TR\>/\<\/TR\>\n/g"|sed -e "s/&nbsp;/ /g" -e "s/<a href=\"\([^\"]*\)\">/\1 /g" -e "s/<[^>]*>/ /g" -e "s/ */ /g" -e "s/ - \[.*//g" | grep -v zip |grep -v tar.gz | grep -v jar | perl -pi -e "s/\n//g" | perl -pi -e "s/ /\n/g"|grep http|sed -e "s/^ //g" | sed -e "s/prdownloads\.sourceforge\.jp/osdn.dl.sourceforge.jp/g" -e "s/\(20[0-9][0-9]-[0-9][0-9]-[0-9][0-9]\) \([0-9][0-9]:[0-9][0-9]\)/\1T\2+09:00/" -e "s/\([0-9][^ ]*\) \(http[^ ]*\) \([^ ][^ ]*\)\.war .*\(20[0-9][0-9]-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]+[0-9][0-9]:[0-9][0-9]\).*/\n\
20 <portlet id=\"\3\" group=\"jp.sf.pal\" version=\"\1\">\n\
21 <portletSpecVersion>1.0<\/portletSpecVersion>\n\
22 <packaging>war<\/packaging>\n\
23 <name>\3<\/name>\n\
24 <description\/>\n\
25 <binaryURL>\2<\/binaryURL>\n\
26 <sourceURL\/>\n\
27 <imageURL\/>\n\
28 <license>\n\
29 <name>The Apache Software License, Version 2.0<\/name>\n\
30 <url>http:\/\/www.apache.org\/licenses\/LICENSE-2.0.txt<\/url>\n\
31 <\/license>\n\
32 <externalDependencies\/>\n\
33 <tags>\n\
34 <tag>PALab<\/tag>\n\
35 <\/tags>\n\
36 <locales>\n\
37 <locale>en<\/locale>\n\
38 <locale>ja<\/locale>\n\
39 <\/locales>\n\
40 <compiledJDKVersion>1.5<\/compiledJDKVersion>\n\
41 <dateCreated>\4<\/dateCreated>\n\
42 <dateModified>\4<\/dateModified>\n\
43 <publisher>\n\
44 <name>Portal Application Laboratory<\/name>\n\
45 <url>http:\/\/pal.sourceforge.jp\/<\/url>\n\
46 <\/publisher>\n\
47 <\/portlet>\n\
48 /g"
49 echo " </portlets>"
50 echo "</repository>"
51
52

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26