Script Library: 1214 scripts
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

Discussion posts for script ngbg.r

1
johnatemps
17-Jan-2004 10:04
Hi! 


I want to update this code, but the header library words 'type and 
'platform are not valid for the submission script...
So, I post here.


REBOL [
    Title: "National Geographic Image of the Day Downloader"
    Date: 17-Jan-2004
    Version: 1.1.0
    File: %ngbg.r
    Library: [
       level: 'intermediate 
       platform: 'all
       type: [demo tool]
       tested-under: win
        ]
    History: [
	21-Sep-2001 "1.0.0 - First script - Ian Monroe"
	17-Jan-2004 "1.1.0 - Url updated - Charles Mougel"
    ]
    Author: "Ian Monroe"

    Purpose: {Downloads the current picture of the day from nationalgeographic.com 
    and
saves it to a location of your choice. Directions: Change the 'filename'
in the source to the location of your choice. 


The agrument -s causes it to be silent and so not print what step 
it is
at. These directions can be seen by adding a -h agrument.  
}
    Email: ul303seyj001@sneakemail.com
    Web: http://mlug.missouri.edu/~eean/projects.php
    library: [
        level: 'intermediate 
        platform: none 
        type: none 
        domain: [markup text-processing web] 
        tested-under: none 
        support: none 
        license: none 
        see-also: none
    ]
]

filename: %ngbg.jpg ; change to wanted location

PrintStuff: true

if system/script/args == "-s"
[ PrintStuff: false ]

if system/script/args == "-h"
[

print "Downloads the current picture of the day from nationalgeographic.com 
and saves it to a location of your choice."

print "Change the 'filename' variable in the source to the location 
of your choice."

print "The agrument -s causes it to be silent and not print what 
step it is at."
quit
]

if PrintStuff

[ prin "Downloading National Geographic wallpaper.cgi web page..." 
]

ngwebsite: http://magma.nationalgeographic.com/cgi-bin/pod/wallpaper.cgi
 page: read ngwebsite 
if PrintStuff
[ print " Done." ]


parse page [thru "/pod/pictures/lg_wallpaper/" copy NameOfJpg to 
"^">"]

	;old code

 ; imageloc: join http://magma.nationalgeographic.com/pod/pictures/lg_wallpaper/ 
 NameOfJpg

	;updated code 17/01/2004

imageloc: join http://lava.nationalgeographic.com/pod/pictures/lg_wallpaper/ 
NameOfJpg
	;end updated code 17/01/2004

if PrintStuff
[ 
prin "Downloading "
prin imageloc
print " ..."
]
image: read/binary imageloc
write/binary filename image
if PrintStuff
[ prin filename 
  print  " saved" ]
2
sunanda
17-Jan-2004 11:11

Hi johnatemps

Looks to me like there are two problems here:

  • There are two library headers -- delete the one you don't want
  • You weren't the owner of this script. So you couldn't update it (but see below).

I'm not entitrely sure what we should do with unowned scripts, so I am about to make up an instant policy:

  • If a script has an owner, I'd prefer you to talk to them about changes to it -- they may accept your suggestions, or make you a joint owner so you can both change the script.
  • But that doesn't apply in this case, as the orginal owner has not come forward to claim the script.
  • Given that it has been orphaned for over six months, it seems reasoanble to me to give ownership to someone who wants to improve or correct it -- like creating a foster parent.

If the original owner does drop by later, we can:

  • give them ownership too -- a sort of shared parenting
  • Revert the script back to them (we archive all contributions so we can roll changes back if they want that.)

I've given you ownership. You should now be able to update this script.

Sorry for the earlier problems,

Sunanda.

3
johnatemps
29-Jan-2004 22:21
Thanks !
And rebol.org is a really good work !
4
ronaldoff
2-Feb-2004 20:49
Hi,


Using this url makes it possible to select the Picture of one specific 
date :


ngwebsite: to-url rejoin ["http://lava.nationalgeographic.com/cgi-bin/pod/wallpaper.cgi?day=" now/day "&month=" now/month "&year=" now/year - 2000]


Bye
5
leke
14-Apr-2004 7:03
HI ALL,
Does Rebol have an equivalent to HTML <hr> ?
Thanks.
6
stefanlober
15-May-2007 23:46
The old url does not work for me. I changed two addresses:

ngwebsite: http://lava.nationalgeographic.com/cgi-bin/pod/PhotoOfTheDay.cgi


imageloc: join http://lava.nationalgeographic.com/pod/pictures/lg_wallpaper/ 
NameOfJpg

and it works again

Stefan