ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/pdbwiki/trunk/scripts/update_structures.sh
Revision: 66
Committed: Fri Sep 2 10:23:01 2011 UTC (8 years, 8 months ago) by jmduarteg
File size: 1578 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> <picsdir>"
6 exit 1
7 fi
8
9 listfile=$1
10 pywikipediadir=$2
11 tmpdir=$3
12 picsdir=$4
13
14 picsvers="1,2,3"
15 updatelogfile=$tmpdir/update.pywikipedia.log
16
17 scriptsdir=`dirname $0` # i.e. same dir as this script
18
19 timestamp=`date +%Y-%m-%d`
20
21
22 pagesfile="$tmpdir/updated_pages.$timestamp.wiki"
23
24 echo "###############################################"
25 echo "### UPDATING STRUCTURES ###"
26 echo "###############################################"
27
28 # we are not deleting pages anymore as we don't care about resetting timestamps
29 # (because now we use last_revision_date of entries as timestamps)
30
31 echo "" > $updatelogfile # resetting the updatelogfile so we can start appending to it
32
33 # generating new pages
34 echo "Generating new pages (entries)..."
35 python $scriptsdir/create_pdbentries.py -l $listfile -o $pagesfile -u
36 echo "Done generation of new pages"
37 echo `date`
38
39 # uploading pages
40 echo "Uploading new pages..."
41 python $pywikipediadir/pagefromfile.py -force -notitle -start:\<page\> -end:\</page\> -putthrottle:0 -file:$pagesfile >> $updatelogfile 2>&1
42 echo "Done uploading new pages"
43 echo `date`
44
45 # generating new images
46 echo "Generating new images..."
47 $scriptsdir/generate_images.sh $listfile $picsdir $tmpdir
48 echo "Done generating new images"
49 echo `date`
50
51 # uploading images
52 echo "Uploading new images..."
53 echo `date`
54
55 $scriptsdir/upload_images.sh $listfile $pywikipediadir $picsdir $picsvers $updatelogfile
56
57 echo "Done uploading new images"
58 echo `date`
59
60 echo "#### Done updating structures"

Properties

Name Value
svn:executable