File: htdocs_get_sf_stats

package info (click to toggle)
tk-html3 3.0~fossil20110109-8
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 6,656 kB
  • sloc: ansic: 48,994; tcl: 25,966; sh: 1,190; yacc: 161; makefile: 24
file content (34 lines) | stat: -rwxr-xr-x 927 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/sh
# -*-tcl-*-
# the next line restarts using tclsh \
exec tclsh "${0}" "${@}"

####################################

set memchan  34191
set mode     full
set no_table 0
set limit    10
set flat     1
set shows    0

set stat_url http://sourceforge.net/export/projhtml.php?group_id=$memchan&mode=$mode&no_table=$no_table
set news_url http://sourceforge.net/export/projnews.php?group_id=$memchan&limit=$limit&flat=$flat&show_summaries=$shows

set now [clock format [clock seconds]]

foreach {urlvar destination} {
    stat_url state/statistics
    news_url state/news
} {
    puts "Retrieving [set $urlvar] --> $destination"
    exec /usr/bin/wget -q -O $destination [set $urlvar] >/dev/null
}

puts "Remembering time --> state/sn.time"
puts [set fh [open state/sn.time w]] $now; close $fh

### Future ### Edit the delivered HTML to fit them better into our site.
### Done inside of the page generation templates !

exit