30 June 2008

From albahaca

Are we beginning to get the hang of this? I sure do not understand what dependency I'm missing on my remote machine, but at least I can set up g-client quickly with any local installation of emacs. BIG HINT: use emacs-22 at least, or run around looking for time-date.el and other bits of emacs-lisp code.

Think remote, post local

It looks like I cannot post to blogger from a remote account. Posting to Wordpress remotely was easy.

del.icio.us and emacs

Posting directly to del.icio.us from emacs is pretty cool. Some quick changes to dp.pl make it even better:

#!/usr/bin/perl
use strict;
use lib "/path/to/perlmodule/dependencies";
use lib "/path/to/other/dependencies";
use Net::Delicious;
use Log::Dispatch::Screen;
my ($url,$dsc,$notes,$tag) = @ARGV;
my $USER='your_del.icio.us_name';
my $PASSWORD='your_del.icio.us_password';
die "use: dp.pl url title notes tag" unless (defined($tag));
my $del = Net::Delicious->new({'user'=>$USER,'pswd'=>$PASSWORD});
my $result = $del->add_post({'url'=>$url,
                             'description'=>$dsc,
        'extended'=>$notes,
                             'tags'=>$tag,
                             'shared'=>'yes'});
die "post failed\n" unless $result;
1;

Then, slip the following into .emacs:

(defun delicious-post-url ()
  (interactive)
  (if (null (w3m-anchor))
      (message "no anchor at point")
    (let ((url (w3m-anchor))
          (title (buffer-substring-no-properties
                  (previous-single-property-change (1+ (point)) 'w3m-href-anchor)
                  (next-single-property-change (point) 'w3m-href-anchor))))
      (if (w3m-url-valid url)
          (progn
     (setq delicious-notes (read-string "post notes: "))
            (setq delicious-tags (read-string "post tags: "))
            (setq delicious-cmd (concat "~/bin/dp.pl \"" url 
                                        "\" \"" title 
     "\" \"" delicious-notes
                                        "\" \"" delicious-tags "\""))
            (shell-command (concat delicious-cmd)))
        (message "no URL at point!")))))

All code only slightly modified from here.

Labels:

25 June 2008

Yahoo Pipes

Here's an interesting idea: combine several RSS feeds into one, and then subscribe to that one. The interface is strange, and most people interested in doing this could probably figure out how to do it themselves, but after some struggling, it seems like a sensible way to aggregate blogs on different topics for submission to a certain website.

Labels: ,