source: project/wiki/gazette @ 31126

Last change on this file since 31126 was 31126, checked in by Mario Domenech Goulart, 6 years ago

Properly capitalize CHICKEN on the wiki directory (only first level).

I used the following shell script to change things:

while IFS= read -d $'\0' -r file ; do

sed -i 's/Chicken/CHICKEN/g' "$file"

done < <(find wiki -maxdepth 1 -type f -print0 )

Some files have been manually reverted after that, since some
substitutions don't apply:

  • friedly-chicken (repl banner)
  • survey2011 (Chicken in URI paths)
  • chickenista-guide (Chickenista)

I hope the link canonicalization thing will be on my side.

File size: 9.3 KB
Line 
1== The CHICKEN Gazette
2
3The [[http://gazette.call-cc.org|Gazette]] is produced weekly by a
4volunteer from the CHICKEN community. The latest issue can be found at
5[[http://gazette.call-cc.org]] or you can follow it in your feed
6reader at [[http://gazette.call-cc.org/feed.atom]]. The Gazette Archive is at
7[[http://gazette.call-cc.org/archive.html]]. If you'd like to write an issue,
8[[http://bugs.call-cc.org/browser/gazette/README.txt|check out the instructions]]
9and come and find us in #chicken on Freenode!
10
11== Releases
12
13The gazette will be released weekly on Mondays. The usual distribution
14channel is the chicken-users mailing list and the gazette site.
15
16== Who can be editor for a gazette?
17
18Short answer: You can! You don't have to be an expert on scheme for
19this, indeed summarizing what's going on in chicken land helped me to
20learn a lot of new stuff too. So don't be shy and sign up!
21
22== How long does it take to write an issue?
23
244-7 hours, depending on the week and on your omelette recipe.
25
26== I am lost! Where can I get help?
27
28Write to chicken-users or drop by on IRC in #chicken. We are there to
29help you.
30
31== Authors for upcoming issues
32
33 Issue 18 2010-12-27
34
35== Authors of past issues
36
37 Issue 17 2011-01-10
38    by Moritz Heidkamp, Christian Kellermann and Felix Winkelmann
39 Issue 16 2010-12-13
40    by Christian Kellerman
41 Issue 15 2010-12-06
42    by Alaric Snell-Pym and Moritz Heidkamp
43 Issue 14 2010-11-29 +0000
44    by Felix Winkelmann
45 Issue 13 2010-11-22 +0000
46    by Peter Bex
47 Issue 12 2010-11-15 +0000
48    by Alaric Snell-Pym
49 Issue 11 2010-11-08 +0000
50    by Moritz Heidkamp and Christian Kellermann
51 Issue 10 2010-11-01 +0000
52    by Mario Domenech Goulart
53 Issue 9 2010-10-25 +0000
54    by Jim Ursetto
55 Issue 8 2010-10-18 +0000
56    by Moritz Heidkamp
57 Issue 7 2010-10-11 +0000
58    by Christian Kellermann
59 Issue 6 2010-10-03 +0000
60    by Felix Winkelmann
61 Issue 5 2010-09-27 +0000
62    by Alex Shinn
63 Issue 4 2010-09-17 +0000
64    by Peter Bex
65 Issue 3 2010-09-10 +0000
66    by Alaric Snell-Pym
67 Issue 2 2010-09-04 +0000
68    by Christian Kellermann and Moritz Heidkamp
69 Issue 1 2010-08-27 +0000
70    by Christian Kellermann
71
72== The Crazy Gazette Automation Plan
73
74To reduce the tedious part of writing a gazette, [[user:alaric-snellpym]] has suggested we automate the boring bits.
75
76The original plan was:
77
78<enscript>
791) The users page on the wiki to, in parens or brackets or something,
80after each person's name, list their various identities used in IRC /
81svn usernames / etc. so they can be easily tallied together
82
832) A script that, when run in a local svn checkout, or maybe by talking
84direct to SVN, lists all the eggs that have seen commits in a specified
85time period (with the option of "right up to now" as the end of the time
86period); and then lists the commit messages and revision numbers (for
87deeper investigation, if required) for each. For extra points, make sure
88that tagging a version of an egg is clearly indicated somehow (eg,
89"TAGGED 1.5"). This should all be a relatively simple matter of parsing
90the svn logs.
91
923) A script that, when run in a local git checkout, or maybe by talking
93direct to the core git repo, lists all the commits in a specified time
94period, grouped by branch.
95
964) All scripts should map usernames found in svn/git to displayed names
97via a function that defaults to identity. Somebody else please write a
98function to replace this, that looks in the wiki page and parses it to
99map svn/git identities to Wiki markup for the user's user page with
100their full name as the anchor text, that can be inserted into the above
101scripts to make wonderful magic happen.
102
103For bonus points, the output of scripts (2) and (3) could be actual
104markup for putting straight into the gazette, say as a bulleted list,
105just requiring editing to remove useless commits and to add editorial
106insight.
107
108Super special bonus point:
109
1105) Write a script that, given a date range, parses the mailing list
111archive into wiki markup for a list of links to the posts in the
112archive, along with links to the user's pages as per (4), grouped by thread.
113
114I think that the above are relatively bite-sized chunks that people who
115want to see the Gazette continue should be able to manage between them;
116if the above are done then, if needed, I'd be willing to pioneer alone
117with running them each week (or every other week at worst) and writing
118some content around them!
119</enscript>
120
121When asked for an example of the output of (2), I suggested:
122
123<enscript>
124 * [[egg:ugarit|ugarit]]
125   * [r12345] Added more bugs [[users:alaric-snell-pym|Alaric Snell-Pym]]
126   * [r56789] Tagged 0.9 [[users:alaric-snell-pym|Alaric Snell-Pym]]
127</enscript>
128
129And for (3):
130
131<enscript>
132 * experimental
133   * [deadbeef] Implemented call/pc [[users:felix|Felix Winkelmann]]
134 * master
135   * [cafebabe] Tagged v4.9 [[users:felix|Felix Winkelmann]]
136</enscript>
137
138Andy Bennett produced a shell script for (3):
139
140<enscript highlight="shell">
141for b in `git branch -a --no-color | sed -e 's/^*//' -e 's/^\s*\(\S*\).*/\1/'` ; do echo " * On `echo $b | sed -e 's#^remotes/##'`:"; git log --pretty=format:'   * (%h): %s (%an, %ar)' --since="1 week ago" $b; echo ""; done;
142
143
144I have just tested with NetBSD's sed and the 2nd part seems to cause
145everything to turn blank...
146It seems to be having trouble with the \S character class and the match
147reference. Changing this argument to
148
149-e 's/-> .*//'
150
151produces a correct result.
152</enscript>
153
154And a Scheme script for (5):
155
156<enscript highlight="scheme">
157(use http-client html-parser sxpath srfi-69 srfi-19)
158
159(define base-url "http://lists.nongnu.org/archive/html/chicken-users/")
160
161; Fetch the mail archive's index
162(define tree (with-input-from-request base-url #f html->sxml))
163(define month-list ((sxpath `(// li)) tree))
164
165; The last week might span both this month and last month
166;(define interesting-months `(,(car month-list) ,(cadr month-list)))
167(define interesting-months `(,(car month-list)
168                              ,(cadr month-list)
169                              ))
170
171; Fetch the thread listings for the interesting-months
172(define (get-thread-path snippet)
173  (cadadr ((sxpath `(// a @ href)) snippet)))
174
175; Filter the HTML so that we only have the thread listings. Then convert it to SXML
176(define thread-trees (map (lambda (thread-path)
177                            (with-input-from-string (;apply
178                                                     string-intersperse
179                                                     (with-input-from-request (string-append base-url thread-path) #f
180                                                                              (lambda () (let ((flag #f))
181                                                                                           (map
182                                                                                             (lambda (line)
183
184                                                                                               (cond ((string-match "<hr [^>]*>" line)
185                                                                                                      (begin
186                                                                                                        (set! flag (not flag))
187                                                                                                        line))
188                                                                                                     (flag line)
189                                                                                                     (else ""))
190                                                                                               ;(string-substitute "<input [^>]*>" "" line)
191                                                                                               ;(string-substitute "(<input [^>]*>)|(<p>)" "" line)
192                                                                                               )
193                                                                                             (read-lines))
194                                                                                           )
195                                                                                )))
196                              html->sxml))
197                          (map get-thread-path interesting-months)))
198
199
200; Canonicalise the subject for each message and generate a list of (subject, author, date, link)s
201(define messages ((sxpath `(// li)) thread-trees))
202
203(define message-list
204  (map (lambda (message)
205         (if (> (length message) 4)
206           (let ((link (car ((sxpath `(// a @ href *text*)) (second message))))
207                 (subject (string-substitute "[ \t]+" " " (string-substitute (string-append "(Re: )?" (regexp-escape "[CHICKEN-users] ") "(Re: )?") "" (car ((sxpath `(// *text*)) (second message)))) 'all ))
208                 (author (second (fourth message)))
209                 (date (second (sixth message))))
210             `(,subject ,author ,date ,link)
211             )
212           '()
213           ))
214       messages))
215
216; Filter out everything except messages from the last week
217(define (sent-this-week? date-string)
218  (let ((date (scan-date date-string "~Y~m~d"))
219        (last-week (date-subtract-duration (current-date) (make-duration #:days 8))))
220    (if (>= (date-compare date last-week) 0)
221      #t
222      #f)))
223
224(define filtered-message-list (map (lambda (message)
225                                     (if (= (length message) 4)
226                                       (if (sent-this-week? (third message))
227                                         message
228                                         '())
229                                       '()))
230                                   message-list))
231
232; Regroup the filtered-message-list by subject then author
233(define message-hash
234  (fold
235    (lambda (msg summary)
236      (if (not (eq? msg '()))
237        (begin
238          (hash-table-update! (second summary) (first msg)
239                              (lambda (identity)
240                                (hash-table-update! identity (car (cdr msg))
241                                                    (lambda (identity) (append identity `(,(cddr msg))))
242                                                    (lambda () '())
243                                                    ) identity)
244                              (lambda () (make-hash-table))
245                              )
246          (hash-table-update! (first summary) (first msg)
247                              (lambda (identity) (+ identity 1))
248                              (lambda () 0))
249          ))
250      summary )
251    `(,(make-hash-table) ,(make-hash-table))
252    filtered-message-list))
253
254
255; Render a wikified list of threads and links to messages
256(define url-regex (regexp "(....)/(..)/.."))
257(map
258  (lambda (subj) (
259                  (lambda (subj value)
260                    (format #t "* ~A    (~A messages)" subj (hash-table-ref (first message-hash) subj))
261                    (newline)
262                    (hash-table-walk value (lambda (key value)
263                                             (format #t "** ~A" key )
264                                             (newline)
265                                             (format #t "*** ")
266                                             (map (lambda (value)
267                                                    (format #t "[[~A~A/~A|~A]] " base-url (string-substitute url-regex "\\1-\\2" (first value)) (second value) (first value))) value)
268                                             (newline)
269                                             ))
270                    (newline))
271                  subj (hash-table-ref (second message-hash) subj)))
272  (sort (hash-table-keys (first message-hash)) (lambda (a b) (> (hash-table-ref (first message-hash) a) (hash-table-ref (first message-hash) b)))))
273</enscript>
Note: See TracBrowser for help on using the repository browser.