Script Library: 1238 scripts


REBOL [ Title: "Library history - console version" Date: 12-Jul-2001/15:02:59+2:00 Version: 0.1.1 File: %lib-history.r Author: "Oldes" Usage: { ^-^-lib-history/by-day/update^-;to see todays scripts ^-^-lib-history/by-day/days 7 ^-;scripts in last 7 days (without reloading the log) ^-} Purpose: "To display recent Rebol library uploads" Comment: {to Carl: It would be better if we had the possibility to download only the info about the new scripts (specified by since-date and not to download all the scripts again - even the old one, if we want only todays changes (or new scripts in last hour):(} Email: %oldes--bigfoot--com mail: %oldes--bigfoot--com library: [ level: 'advanced platform: none type: 'tool domain: none tested-under: none support: none license: none see-also: none ] ] lib-history: make object! [ log-file: history: [] update-data: does [ history: copy [] if error? try [ foreach line read/lines log-file [ if not find/match line "%" [insert line "%"] if all [not error? try [line: load line] file? line/1 date? line/2] [ if not tuple? last line [append line] insert history line ] ] ][print "Error while reading log-file!"] ] by-day: func[/days d [integer!] /update /local since scripts][ if update [update-data] since: now - either days [d][0] scripts: copy [] foreach [file date ip] history [ if (date >= since/date) and (not found? find scripts file) [repend scripts [file date ip]] ] either empty? scripts [ print reduce ["No new scripts since" since/date] ][ print reduce [(length? scripts) / 3 "scripts since" since/date] print "=========================================" foreach [file day ip] scripts [ print reduce [file "^/^-^-\_uploaded from:" ip day] ] ] ] ]
halt ;; to terminate script if DO'ne from webpage
  • email address(es) have been munged to protect them from spam harvesters. If you are a Library member, you can log on and view this script without the munging.
  • (oldes:bigfoot:com)