/[webpac]/openisis/current/tcl/doclog
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /openisis/current/tcl/doclog

Parent Directory Parent Directory | Revision Log Revision Log


Revision 237 - (show annotations)
Mon Mar 8 17:43:12 2004 UTC (17 years, 10 months ago) by dpavlin
File size: 1566 byte(s)
initial import of openisis 0.9.0 vendor drop

1 #!/opt/bin/tclsh
2 # create mikidoc from doc's cvs log
3 #
4 # $Revision: 1.2 $
5 #
6
7 proc mikify {in out {since ""}} {
8 set indesc 0
9 while {0 <= [gets $in line]} {
10 # puts stderr $line
11 switch -glob -- $line RCS* {
12 if ![regexp {([^/]*).txt,v} $line - file] { set file "" }
13 } revision* {
14 regexp {revision (.*)} $line - rev
15 } date:* {
16 if {"" != $file} {
17 regexp {date: ([^;]*);\s*author: ([^;]*);} $line - date author
18 set indesc 1
19 set desc ""
20 }
21 } ---* - ===* {
22 if $indesc {
23 set indesc 0
24 set chg($date\t$file\t$rev\t$author) $desc
25 }
26 } default {
27 if $indesc { append desc "\n\t" $line }
28 }
29 }
30 set tim [clock seconds]
31 puts $out "[clock format $tim -format %Y%m%d%H%M%S -gmt 1]"
32 puts $out "(created by doclog on [clock format $tim -format {%a, %d %b %Y %H:%M %Z}])\n\n"
33 puts $out "*\tchanges since $since"
34 foreach n [lsort -decreasing [array names chg]] {
35 foreach {date file rev author} [split $n "\t"] break
36 if {[regexp {^(.*)\.(\d*)$} $rev - foo min]
37 && $min && [set prev [expr $min-1]]
38 } {
39 set diff "\n>\thttp://cvs.sf.net/cgi-bin/viewcvs.cgi/isis/openisis/doc/$file.txt.diff?r1=$foo.$prev&r2=$rev\t(diff)"
40 } else {
41 set diff ""
42 }
43 puts $out "-\t$date\n>\t$file\n\t$rev$diff$chg($n)"
44 }
45 }
46
47 if !$argc {
48 mikify stdin stdout
49 } else {
50 switch -glob -- $argv \
51 m* {
52 set since "1 month ago"
53 set txt MonthlyChanges.txt
54 } default {
55 set since "1 week ago"
56 set txt WeeklyChanges.txt
57 }
58 set in [open "|cvs log {-d>$since} 2>&1"]
59 set out [open $txt w]
60 mikify $in $out $since
61 close $out
62 close $in
63 }

Properties

Name Value
svn:executable

  ViewVC Help
Powered by ViewVC 1.1.26