Revision: 3414 Author: ksprotte URL: http://bknr.net/trac/changeset/3414
squid-access-log2csv outputs more standard cvs format (always using " and ;)
U trunk/projects/bos/tools/squid-access-log2csv
Modified: trunk/projects/bos/tools/squid-access-log2csv =================================================================== --- trunk/projects/bos/tools/squid-access-log2csv 2008-07-02 15:55:21 UTC (rev 3413) +++ trunk/projects/bos/tools/squid-access-log2csv 2008-07-02 15:59:24 UTC (rev 3414) @@ -47,13 +47,13 @@ *uri-hash*) (setf lists (sort lists #'> :key (lambda (uri) (cdr (assoc :total (cdr uri)))))) - (format t "uri,TOTAL,~{~A~^,~}~%" *action/codes*) + (format t ""uri";"TOTAL";~{"~A"~^;~}~%" *action/codes*) (dolist (list lists) (destructuring-bind (uri . alist) list - (format t ""~A"," uri) - (format t "~A," (cdr (assoc :total alist))) - (format t "~{~D~^,~}~%" + (format t ""~A";" uri) + (format t ""~A";" (cdr (assoc :total alist))) + (format t "~{"~D"~^;~}~%" (mapcar (lambda (action/code) (or (cdr (assoc action/code alist)) 0))