On 18/03/13 05:35, Jai Dayal wrote:
> Currently, I'm downloading TWIC archives; I might write a script to
> automatically do this, I suppose...
>
>
I thought Steven was going to implement downloading twic in scidvspc.
But, I've not been following the action recently.
In the past I've used this.
#!/bin/sh
set -xe
# Should work without much change on any
# Linux distro and on any *BSD where lynx and wget are installed.
# Very likely on Windows with cygwin and on OS/2 with bash, lynx (part
of EMX I think)
# That said, to keep things simple for me, I've not allowed for your
preferences on
# where to store stuff. You will need to change the next few lines:
DownloadsDir=~/Downloads/twic
DatabaseDir=~/ChessDatabase
[ -d ${DatabaseDir} ] || mkdir $(DatabaseDir)
tempfile=$(mktemp /tmp/twic.XXXXXX) || exit
lynx -dump -width 99999 http://theweekinchess.com/twic \
| awk '/http:\/\/.*\/zips\/twic[0-9]*g/ {print $2}' \
| sort \
| while read uri
do
f=$(basename ${uri})
[ -f ${DownloadsDir}/twic/${f} ] ||
echo ${uri}
done \
| wget -i - --no-verbose --timestamping
--no-directories --no-host-directories -P ${DownloadsDir}
find ${DownloadsDir} -type f -name \*.zip -exec unzip -p {} \; >
${tempfile}
ls -hl ${tempfile}
pgnscid -f ${tempfile} ${DatabaseDir}/twic
Beware random broken lines
--
Santa
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
Scid-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/scid-users