7 Mar 2003 SyntaxPolice   » (Journeyer)

  • I saw Rilo Kiley last night with my gf and her sister. This is one of her sister's favorite bands.

  • Still really want a laptop linux machine.

  • Brian took some action shots from indoor rock climbing recently. Sorry they're big. I'll resize them eventually. It features my gf trying very hard to get over an edge, me cimbing both freestyle, on a rope, and with ice climbing equipment, lots of silly faces from Brian, and quite a number of random people, some of whom found the camera and created their own art. ;
  • I'm going to attempt to post this buffer as a test of my elisp ; "advogato-post-buffer-as-diary" function. ;
    
    (setq advogato-username "SyntaxPolice")
    (setq advogato-url "http://www.advogato.org/XMLRPC")
    
    (defun advogato-get-most-recent (&optional in-user)
      "Gets the last diary entry" (interactive)
      (let ((user (if in-user in-user advogato-username)))
    	(let ((lastIndex (- (xml-rpc-method-call advogato-url 'diary.len user) 1)))
    	  (xml-rpc-method-call advogato-url 'diary.get user lastIndex))))
    
    (defun advogato-insert-most-recent (&optional in-user)
      "Inserts the most recent diary entry." (interactive)
      (let ((user (if in-user in-user advogato-username)))
        (insert-string (advogato-get-most-recent user))))
    
    (defun advogato-post-string-as-diary (diary-str cookie &optional in-index)
      "Post the given string as the diary entry.  Use -1 as an index for a new entry."
      (let ((index (if in-index in-index -1)))
        (xml-rpc-method-call advogato-url 'diary.set cookie index diary-str)))
    
    (defun advogato-post-buffer-as-diary (cookie &optional in-index)
      "Post the current buffer as your diary entry"
      (advogato-post-string-as-diary (buffer-string) cookie in-index))
    
    (defun advogato-get-cookie (ad-username ad-password)
    ;    (setq advogato-username username)
        (xml-rpc-method-call advogato-url 'authenticate ad-username ad-password))
    
    ; ------------------------------------------------------------
    ; Below is for testing:
    (setq foo (advogato-insert-most-recent "SyntaxPolice"))
    (advogato-post-buffer-as-diary cookie)
    
    (defun advogato-get-most-recent2 (user)
      "Gets the last diary entry" (interactive)
      (let ((lastIndex (- (xml-rpc-method-call advogato-url 'diary.len user) 1))
    	)
        (xml-rpc-method-call advogato-url 'diary.get user lastIndex)))
    
    (advogato-get-most-recent2 "SyntaxPolice")
    
    
    (setq advogato-password "asdf")
    
    
    
    ;
  • Latest blog entries     Older blog entries

    New Advogato Features

    New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

    Keep up with the latest Advogato features by reading the Advogato status blog.

    If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!