NEW: For a prettier blog interface, see the Wordpress version!

Tasks

A1_Trim the footers from mailing list messages (2003.09.15)
B1_Find out how to print in Java (2003.09.11)
C1_Find out how to get single-key hiding/showing in allout (2003.09.11)
C2_Set up margins in Emacs (2003.09.11)
C3_Set up automatic swapon (2003.09.11)
C4_Get software or hardware suspend working (2003.09.11)
C5_LocationMatch thing (2003.09.11)
C6_Integrate SSH tunnel setup into interface up/down (2003.09.15)
C7_Set up linux-wlan-ng (2003.09.15)
C8_Figure out if multi-keymaps are possible (2003.09.15)
C9_Hack time-sensitive completion into erc-pcomplete. (2003.09.15)
C10_Set up categorization of my plans or some kind of search (2003.10.07)
B2XFix my Emacs fonts (2003.09.15)
C11XDownload records mode and take a look at it again (2003.09.15)

Notes

5. Incantation to print the author statistics

lynx -source 'http://lists.q-linux.com/pipermail/plug/2004-July/author.html' |
perl -MXML::LibXML -e 'print $_->findvalue("i") foreach (XML::LibXML->new->parse_html_fh(*STDIN)->findnodes(q!//li[a[@name]]!))' | sort | uniq -c | sort -rn | head -20
E-Mail from [email protected]

4. Revised sacha/perl-training/suck-data-in

(defun sacha/perl-training/suck-data-in ()
  "Insert BBDB records for all the Perl trainees."
  (interactive)
  (goto-char (point-min))
  (while (re-search-forward "^\\([[:digit:]]+\\)" nil t)
    (let ((data (split-string (buffer-substring-no-properties (line-beginning-position) (line-end-position)) "|"))
          record)
      (setq record 
            (bbdb-create-internal (elt data 1) ; Name
                                  "PLDT" ; Company
                                  (elt data 2) ; E-mail
                                  nil
                                  nil
                                  (concat "Perl training 2003.12.17 - 2003.12.19; " (elt data 3))))
      (bbdb-record-set-aka record (list (concat "pldt" (elt data 0))))
      (bbdb-change-record record nil))))

3. Elisp code to insert all

Data is of the form

number|Name|e-mail|Expectations
(defun sacha/perl-training/suck-data-in ()
  "Insert BBDB records for all the Perl trainees."
  (interactive)
  (goto-char (point-min))
  (while (re-search-forward "^\\([[:digit:]]+\\)" nil t)
    (let ((data (split-string (buffer-substring-no-properties (line-beginning-position) (line-end-position)) "|"))
          record)
      (bbdb-record-set-aka 
            (bbdb-create-internal (elt data 1) ; Name
                                  "PLDT" ; Company
                                  (elt data 2) ; E-mail
                                  nil
                                  nil
                                  (concat "Perl training 2003.12.17 - 2003.12.19; " (elt data 3)))
            (list (concat "pldt" (elt data 0)))))))

2. Extracting the trainees' files and packaging them

Shell scripting to the rescue!

# Zip their work up
for DIR in *; do ( cd $DIR; zip perl-day1.zip * ); done       

# Realize that I have to get rid of the archives temporarily because
# I might want to insert all the files into a buffer, so back it up first
tar zcvf archive.tar.gz $(find -name \*.zip)  

# Remove all the zip files
find -name \*.zip -exec rm {} \;

1. Extracting all the mail addresses from the programs




This displays enough context information around the data so that I can
grab it easily.

Previous day | Next day

I'd love to hear about any questions, comments, suggestions or links that you might have. Your comments will not be posted on this website immediately, but will be e-mailed to me first. You can use this form to get in touch with me, or e-mail me at [email protected] .

Page: Linux Convenience
Updated: 2004-11-21
NOTE: ANTI-SPAM MEASURE NOW IN PLACE. Please answer the following question with the right number in order to send me your comment.
What is two minus one? (hint: one ;) )
Name:
E-mail:
URL:
Comments: