Hey, Greymatter wizards…

I figure I might as well ask here, as good a place as any. Forgive the technical neepery:

I’m looking for a way to create a whole lot of blog entries– about 500 at a shot– and then have them upload to Greymatter, one a day, like clockwork, until they all run out or I stop the script. Stuff would go in Subject, Main Entry, and Extended Entry.

Anybody know of an easy way to do it? (And yes, this is to start getting the rest of the But I Digress… columns online.)

9 comments on “Hey, Greymatter wizards…

  1. Sorry, I don’t have a clue, but I thought it would be neat to have first comment.

    I loved Sir Apropos of Nothing!

  2. Not sure about the uploading part, but you can use cron (or wincron) to schedule the job daily. That’s probably the easy part.

  3. not sure what kind of back end you have to work with or what format the entries are in right now. But here is what I would do.

    Dump all 500 into a database table with fields for heading, poster etc. If you want them to be posted in a set ordre it should be made clear here a field like order or just date.

    Next pick a start date and write a script (perl, php, asp etc) that posts article one on that data. Every time the page gets hit check the date if it’s a day after the last date something was updated, then update the next file, mark it updated, and set something saying you’ve done something on this day.

    Now the first time each day that the page is seen a new article is pulled and posted. All hits for the rest of hte day just skip past that section of code since a page has already been added.

    If you post more info on what you have to work with I’d give more detail. as it is I know nothing about Greymatter, I can juts guess it is the blog software and has a defined input format.

  4. Glenn,

    One problem you’re going to encounter if you script the entire HTTP POST operation is that one of the embedded hidden form fields is the newcommententrynumber.

    This field appears to be generated internally by greymatter … so you’d first have to issue an HTTP GET, extract the appropriate hidden fields and rebuild the POST data based on this generated info.

    If you’re using Unix as your client, a cron job driving an Expect script driving Lynx might be the simplest way to do this. ( The windows version of Expect really doesn’t work terribly reliably. )

    If you’re going to use a Windows client to do this, you might use a WSH script ( VBScript / Javascript ) and the MSXML control to drive the GET and POST.

    You could then schedule the script with the Windows “at” scheduler.

    There are a number of other options … TCL, Perl, and many other cross-Platform scripting tools could be used with either cron or the at scheduler.

    Please feel free to e-mail me to discuss further.

Comments are closed.