ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/pdbwiki/trunk/scripts/add_structures.sh
Revision: 66
Committed: Fri Sep 2 10:23:01 2011 UTC (8 years, 10 months ago) by jmduarteg
File size: 1815 byte(s)
Log Message:
Fixed (this time hopefully for good) the beta character problem of entry 1ubp by hard-coding a fix in the python page generation script
Line File contents
1 #!/bin/sh
2
3 if [ -z "$4" ]
4 then
5 echo "Usage: $0 <listfile> <pywikipedia dir> <tmpdir> <pics dir> [<true>]"
6 echo "If true specified as the 5th option then no pics will be generated, they will be directly taken from the specified <pics dir>"
7 exit 1
8 fi
9
10 listfile=$1
11 pywikipediadir=$2
12 tmpdir=$3
13 picsdir=$4
14 nopics=$5
15
16 picsvers="1,2,3"
17 addlogfile=$tmpdir/add.pywikipedia.log
18
19 scriptsdir=`dirname $0` # i.e. same dir as this script
20
21 timestamp=`date +%Y-%m-%d`
22
23
24 pagesfile="$tmpdir/new_pages.$timestamp.wiki"
25 talkfile="$tmpdir/new_talk.$timestamp.wiki"
26
27 echo "###############################################"
28 echo "### ADDING NEW STRUCTURES ###"
29 echo "###############################################"
30 echo `date`
31
32 # generating new pages
33 echo "Generating new pages (entries and talk)..."
34 python $scriptsdir/create_pdbentries.py -l $listfile -o $pagesfile
35 python $scriptsdir/create_talkpages.py -l $listfile -o $talkfile
36 echo "Done generating new entry and talk pages"
37 echo `date`
38
39 # uploading pages
40 echo "Uploading new entry pages..."
41 python $pywikipediadir/pagefromfile.py -force -notitle -start:\<page\> -end:\</page\> -putthrottle:0 -file:$pagesfile > $addlogfile 2>&1
42 # uploading talk pages
43 echo "Uploading new talk pages..."
44 python $pywikipediadir/pagefromfile.py -force -notitle -start:\<page\> -end:\</page\> -putthrottle:0 -file:$talkfile >> $addlogfile 2>&1
45
46 echo "Done uploading new entry and talk pages"
47 echo `date`
48 echo ""
49
50 # generating new images
51 if [ "$nopics" != "true" ]
52 then
53 $scriptsdir/generate_images.sh $listfile $picsdir $tmpdir
54 fi
55
56
57 # uploading images
58 echo "Uploading new images..."
59 echo `date`
60
61 $scriptsdir/upload_images.sh $listfile $pywikipediadir $picsdir $picsvers $addlogfile
62
63 echo "Done uploading new images"
64 echo `date`
65
66 echo "#### Done adding structures"
67 echo `date`

Properties

Name Value
svn:executable