A forum for technical support discussion related to Fogbugz.
Emphasis on "hack"
I copy+pasted a replacement subroutine that replaces the random pictures with a link to the Astronomy Site of the Day.
It's hack since it references the full size picture and crams it into the 197px spot. Eek. But it works well enough for me. I suppose a scheduled task running wget+ImageMagick would be a far more optimal solution, but this was quicker with a small footprint :).
Just replace the MiniReportCuteAnimals subroutine in miniReports.asp with this one:
Ok, so it gnawed at me, so here's a batch file to save and resize the APOD to your server. You can set this as a daily scheduled task. This is assuming the stock miniReports.asp page (though you still might want to add a link to the APOD site).
You'll need to install the Windows binaries of wget and ImageMagick tools and have them in your PATH. Modify the path to your pictures dir if necessary. You'll need to remove all the exisiting pictures first.
cd "C:\Program Files\FogBugz\website\pictures"
wget -O- -q http://antwrp.gsfc.nasa.gov/apod/astropix.html | findstr "IMG" > imgHtml.txt
echo ">" >> imgHtml.txt
wget -r -B "http://antwrp.gsfc.nasa.gov/apod/" -F -i imgHtml.txt -nd -O 1.jpg
convert 1.jpg -resize 196 1.jpg
*nix can use this as well via cron, make sure to fixup the path and use grep instead of findstr.
I got wget binary here:
The offical gnu.org wget site links to this one, so I assume it's fairly kosher. Use at your own risk, etc. The site includes directions for compiling your own Windows wget if you're really paranoid.
This topic is archived. No further replies will be accepted.Other recent topics