Posts Tagged ‘blog’

Updated Yet Another Daily del.icio.us hack

Sunday, January 30th, 2005

I’ve updated my Yet Another Daily del.icio.us (yadd.php) so it can be called once a week. I suppose it should be called Yet Another Weekly del.icio.us… (yawd-1.0.php).

Found through my ping-backs that zman has a patch to yadd.php so it doesn’t create empty entries on days where there are no new bookmarks.

Enjoy.

Sigh, trackback spam is starting…

Tuesday, January 4th, 2005

Two random string trackbacks from http://uunviuvwx.com/ this morning.

And I was so happy with the little WP hack that stopped all the comment spam.

comment spam

Friday, November 26th, 2004

The daily comment spam is getting worse and worse — easily 100+ per day. It never makes it to the website because WordPress is setup so I need to approve all postings, but it is a PITA to weed
through the spam to find the occasionally real comments.

I’ve seen on Jeremy Zawodny’s blog that in order to post, you need to type *his* first name in one of the forms. Not rocket science if a human is making the posting, but perhaps just difficult enough for the spammer’s script to fail. The other nice thing is you can always change the question to something equally as trival. Say, “what the the color of the sky?” or “3141592 is my favorite number, what is my favorite number?”

Jeff Barr posted an entry on exactly how to do that in Wordpress. The only thing that was a little tricky was the change to wp-comments-post.php was on line 22 in my copy of the file. The difference because the file is a DOS format and emacs displayed it with ^M^M at the end of each line (essentially halving the
number of line Jeff saw.

The changes work for me…

Claiming my feedster profile…

Wednesday, October 13th, 2004

No Need to Click Here - I’m just claiming my feed at Feedster

Yet Another DailyDelicious hack for WordPress

Friday, September 17th, 2004

I wanted a nice simple way to mirror my daily bookmarks that I’ve added to [del.icio.us](http://del.icio.us) into [WordPress](http://www.wordpress.org)

Stephen Eyre’s [dailydelicious](http://www.dot-totally.co.uk/dailydelicious.txt) was close, but
not exactly they way I wanted it. He used the RSS feed, but that doesn’t give a good daily cutoff.

So, I present Yet Another Daily Delicious php script: [yadd.php](http://www.nozell.com/marc/blog/data/yadd-1.0.TXT).

It asks for just today’s bookmarks using the published api, parses the XML, generates nicely formatted HTML and creates a WordPress entry.

Here is the writeup from the code:
- - -

This is yadd.php V1.0 by Marc Nozell (marc@nozell.com) based on
Stephen Eyre's dailydelicious
(http://www.dot-totally.co.uk/dailydelicious.txt)

See http://www.nozell.com/blog/ for the latest version of
'yet another daily delicious' (yadd.php)

USAGE:

1) Edit the section below. At the very least use your del.icio.us
username and password ($del_user/$del_password)

2) Put there file somewhere on the server where you run WordPress.

3) Arrange for this page to be hit once a day, say 11:30ish your
local time. del.icio.us seems to track UTC so depending on which
timezone you live in, some bookmarks from your yesterday may show
up. Consider using a simple cronjob that looks like this:

30 23 * * * $HOME/bin/yadd.sh

where yadd.sh looks like this:

#!/bin/bash
curl http://www.yoursite.com/yadd.php

4) In the morning edit the entry if you wish. I've tried to generate
pretty HTML so it will be simple to edit the entry.

THINGS TO KEEP IN MIND

Anyone that hits the URL for this script will cause your current
bookmarks to be dumped into WordPress. Clearly this is not
desirable.

You have some options. The easiest is to keep this URL 'secret'.
Name it something unusual and put it in a non-obvious place.
Remember that if you display your web hit stats, the url will be
exposed. A better solution to use .htaccess to limit access. If
you do that remember to update the url wget uses to include the
username/password, something like this:
curl http://someuser:somepassword@www.yoursite.com/yadd.php

Enjoy,

-marc

HOWTO migrate from blosxom to wordpress

Tuesday, July 13th, 2004

For my piece of mind, please backup your wordpress database before proceeding. I don’t want my instructions to cause you to lose data.

  • Grab my mt blosxom flavor files and add to your $datadir. Right-click to save these files:
    content_type.mt date.mt, foot.mt , head.mt, story.mt
  • Edit story.mt and change the line “AUTHOR: marc” to whatever
    username you will be using.
  • If you are using the blosxom clicktrack plugin (00clicktrack),
    disable it.
  • Visit your blosxom site using the mt flavor:
    http://yoursite.local/cgi-bin/blosxom?flav=mt and save it into a
    file named import in your wp-admin directory. You may want to try
    this: lynx -dump http://yoursite.local/cgi-bin/blosxom?flav=mt >
    wp-admin/import.txt
  • Take a look at the import.txt file you just created. There are some
    things you may want to fix now rather than after the import.

    • Lines are wrapped at 79 characters, so long URLs or entry titles may be broken.
    • If you have a habit of using a bunch of dashes to separate text, the importer
      may get confused and think it is the beginning of a new entry. Consider replacing
      - with =
    • All the categories will be something like /nh (based on the pathname). You may want
      to remove the leading slash. You can fix this after import and well as build up
      a category hierarchy, so it isn’t a big deal.
  • Follow the standard WordPress instructions for import-mt.php.
  • If you don’t like your categories named with a leading slash (eg:
    /nh), then edit your new WordPress categories.
  • Start going through your posts and clean up any messes…

I’m migrating from blosxom to wordpress

Tuesday, July 13th, 2004

My webhoster just setup MySQL access for my site so tonight I’m migrating.

Rael has done a great job with Blosxom, but I wanted blogging engine was web-based (del.icio.us shows how nice such interface can be) and that had a large active development community.

The fact that my webhoster doesn’t charge extra for MySQL is a plus too.

Once I’ve migrated I’ll post the blosxom flavor I wrote to help the migration. It basically generates a Movable Type export format that WordPress can import using import-mt.php.

Take a look and then bookmark this new location: http://www.nozell.com/blog

Bill Moyers talks about blogs

Friday, May 14th, 2004

Last night I caught the very end of NPR’s FreshAir which was an interview with Bill Moyers. In response to a question about what sort of tv/print/web media he reads/listens to he said blogs ‘is the closest we have come to, in a long time, to the history of the American media in the beginning’ and then talks about the parallels of blogs and the early American press of the 1700s.

Skip ahead to about 36 minutes into the show and hear for yourself.

I’m quoted in the paper today, but the interesting bit is how they found me

Thursday, January 29th, 2004

The day after the NH primary I got an email from a local reporter looking for a
quote
to flesh out the article he was working on about undeclared voters. He knew from reading my blog entry(!) that I was an undeclared voter who was briefly a Democrat (long enough to vote) and then immediately returned to undeclared status.

I asked him know he came to my blog and he said he has been using geourl.com to see what people in the area are writing about. Cool.

BTW, here is the article.

Working on more complete ’share your opml’ perl example

Friday, January 23rd, 2004

I’ve been hacking on a perl script that will 1) get the list of shared
opmls from feeds.scripting 2) put it in a table using a sqlite
database 3) iterate over all of them and grab the users blogroll and
also put them in an sql table.

Unfortunately when I turn it loose on all 600+ users, it dies on the 20th one o
r so with a strange message about trying to modify a read
only variable. The line is in an XML::Parser callback and looks
pretty innocuous:

        my ($j1, $feedname, $j2, $type, $j3, $xmlurl) = @_;

I then tried iterating from the ‘bottom’ of the list of users (SELECT
userid, person, url FROM users ORDER BY userid DESC) and that cranks
through a few hundred users and then dies deep in the guts of
XML::Parser complaining about invalid string or other.

Bah.

I’ll do some more thinking out loud later.