close dialogue

Hello smile

I'm Siobhan Curran/Kisa Naumova, and this is my weblog. I tend to write about stuff like crossdressing, Macs, code, cats, wine and Second Life, but in general it's just an ongoing conversation about all sorts of stuff. If you'd like to know a little bit more about what this all is, I recommend starting on this page which has a little bit of info on who I am, and what I'm trying to do — or you could dive into my five years worth of archives if you like.

Otherwise, feel free to close this box and explore...

Monday, 3rd April, 2006

del.icio.us Links

tagdel.icio.us code tranniefesto

I noticed Tom Coates mentioning the 'auto daily linklog' thing in del.icio.us this morning. I, being a casual user of such things (and not an über follower of what's going on on the web at the moment) hadn't noticed this before. I am, however, a firm believer in the idea that I should be able to use a whole bunch of web-apps to generate various bits of content, and squirt them into my blog, so for a while now I've been running a script that takes my del.icio.us RSS feed, formats them however I like, and pulls them into the daily flow. I thought, maybe, you'd like to see it...

(Usual caveaets of "I am not a professional, or actually GOOD, progammer" apply)

<?php
require_once('magpierss/rss_fetch.inc');

I believe PHP has some XML parsing functions, but they're very much in beta at the moment, so I like to use Magpie RSS instead. It's a quick and easy way to parse an RSS feed, and it handles caching for you, so you don't have to worry about putting too much load on a server.

$y = date("Y") ;
$m = date("m") ;
$d = date("d") ;

$today = "/path/to/my/stuff/$y/$m/$d" ;
$do_update = "no" ;

These are just some variables (I should probably make them constants or something) that'll come in handy later.

if(file_exists($today)) {
    $addition = "\n\n" ;
    } else {
    $addition = "" ;
    }

OK, so what I'm doing here is checking to see if there's already existing stuff for today, and starting to build the post. If there's nothing there already, then we start off with a blank sheet, if there is then we start off with two blank lines to keep things nice and formatted.

$delicious_cache = "delicious_cache.txt" ;
$cache_source = file_get_contents($delicious_cache) ;
$sources = array("si08han" => "http://del.icio.us/rss/si08han") ;

The cache is a text file that I use to see whether or not each RSS item is new or not — otherwise I'd be posting things over and over again. The $sources array means that I could — if I wanted to — add more RSS feeds to this script.

(Extendability Is Good™)

foreach($sources as $poster => $url) {

    $rss = fetch_rss( $url );

        foreach ($rss->items as $item) {

OK, so now we can go through each item in the feed, and process it...

        $id_bundle = $item['title'].$item['link'].$item['description'] ;
        $id = md5($id_bundle)."_".$item['date_timestamp'] ;

        if (stristr($cache_source, $id) === FALSE) {

This is my cache-checking bit. I take the title, link, and description of each item, and wrap them together in an md5 hash and append a timestamp to it. Then I check to see if that exists in my cache-file. If it doesn't then this is a new item, and we can add it to the post...

            $do_update = "yes" ;

            $addition = $addition.$item['title']
                        ."\n=======================\n\n"
                        ."<p><a href=\""
                        .$item['link']
                        ."\" title=\""
                        .$item['title']."\">"
                        .$item['description']
                        ."</a></p>\n\n" ;

This is the actual post itself. What I'll end up with, is the title of the RSS item as an <h1> (yay Markdown!), followed by the decription I've put into del.icio.us as the text of the link itself. I could do other things, I guess — like include the tags in there somewhere — but I'm on a Keep It Simple mission at the moment.

            $cache = "$id\n" ;
            $handle = fopen($delicious_cache, 'a') ;
            fwrite ($handle, $cache) ;
            fclose($handle) ;

This just appends the cache-checking string to the end of the cache-file, so I know that the link's been posted next time I run the script.

            unset($id) ;

(I always forget to do stuff like this. The first time I ran this, I ended up with links all over the place.)

            } 

        }

    if($do_update == "yes") {

So basically, what I've got now, is a string called $addition that contains all the new posts, and one called $do_update that is only "yes" when there's stuff to post. If it is "yes", then I open up the text-file for today, and append $addition to it...

        $handle = fopen($today, 'a') ;
        fwrite ($handle, $addition) ;
        fclose($handle) ;
        }
    }

?>

(This is the advantage, I guess, of using flat-files to run your blog — it's easy to work with them. In the old days, I'd have to start making all sorts of MySQL queries and stuff — stuff I've never realy been good at. If I had a Blogger.com blog, I'd have to make an XML-RPC request thingy.)

So yeah, um, sorry for being boring Codey-Girl this morning. I just thought I'd share — not that it's particularly useful or anything.

I use a very similar script, by the way, to pull my Flickr photos in (with slight additions and cunningness and complications)

To give you an idea of just how codey my head is this morning, whilst sitting on the loo earlier (as you do), it occurred to me that I could use my new-found grep, sed and awk confidence to write something that returned an RSS feed for any particular search query you might throw at it.

That'd be fun :unsure:

A Missed Opportunity

tagwine blogs

Even though I'm probably one of the "rabid Apple fangirls/boys" that he laments about time and time again, I do love reading Ian's work. Insightful, reasoned, and above all calmly stated (often in the face of the aforementioned rabidness).

His current post — The Smartest Comment on the Whole Amazon Vs Microsoft Blogging Shizzle — is another example of why I enjoy reading him so much, but one quote he refers to jumed out at me:

"South African producer Stormhoek has doubled sales of its wine with a campaign directed at the blogging community."

[...] Stormhoek didn't double its sales through blogging: it increased them by marketing to bloggers [...] The only actual indication of how many bottles that were sold via blogging is the 100 bottles sent out via Hugh — of 100,000 sold.

You know what Stormhoek? I think you missed a trick. I think you could have tripled your sales just by adding one more blogger to your list...

And there was me saying to Becky only this weekend. "You know Siobhan hasn't screeds of code recently"

blogged screeds of code.

Come back preview all is forgiven!

Indeed :wink: I'm going to have to rewrite that at some point soon...

MSN Search: Siobhan Curran

taglink funny

My vanity-searches are getting more and more peculiar

Do you have any code to handle feed errors from delicious? MagpieRSS handles timeouts ok, but I occasionally get ERROR — WARNING — CONTENTCONSTRUCTS popping up (I've spotted them in the cache when I've gone to find out whats broken) which obviously cant be parsed so the feed processor returns null. Not a major thing for me, as delicious is not too important in my scheme. I did write an extension to MagpieRSS to handle Last.fm feed issues where the feed would return "no items played recently" after a while, if this happened I just made it skip the cache update and still return the old cache (even though its out of date it will still have data items). I should apply this for the error situation from delicious, but cant be bothered right now.

Anyway, just wondered if you have experienced the same issues (I think you may have)

For reference heres a sample cache file with the error...

O:9:"magpierss":20:{s:12:"currentitem";a:0:{}s:5:"items";a:0:{}s:7:" channel";a:0:{}s:9:"textinput";a:0:{}s:5:"image";a:0:{}s:8:"encoding";s: 10:"ISO-8859-1";s:16:"sourceencoding";s:0:"";s:5:"ERROR";s:0:"";s:7:" WARNING";s:0:"";s:19:"CONTENTCONSTRUCTS";a:6:{i:0;s:7:"content";i:1;s: 7:"summary";i:2;s:4:"info";i:3;s:5:"title";i:4;s:7:"tagline";i:5;s:9:" copyright";}s:16:"KNOWNENCODINGS";a:3:{i:0;s:5:"UTF-8";i:1;s:8:"US- ASCII";i:2;s:10:"ISO-8859-1";}s:5:"stack";a:0:{}s:9:"inchannel";b:0;s:6: "initem";b:0;s:9:"incontent";b:0;s:11:"intextinput";b:0;s:7:"inimage";b: 0;s:13:"currentfield";s:0:"";s:17:"current_namespace";b:0;s:6:"parser";i:0;}

Anyway, just wondered if you have experienced the same issues (I think you may have)

Not that I'm aware of, but it might explain the growing-shrinking blogroll problem I was having a month or two back.

Actually, in all honestly I don't actually use the cache part of MagpieRSS in this case. The script is called via a cron job once every fifteen minutes, and since (AFAIK) the main purpose in this case of using a cache would be to reduce the number of unneccessary request to del.icio.us's servers, I figure four times an hour isn't too bad.

Also, there would be no point in me calling the script every fifteen minutes if I cached the feed for an hour. To turn it off, BTW, I used a rather ugly hack of making the cache folder unwritable by www.

wg:About visual noise on blogs

taglink

I couldn't agree more... [via Jon]

Mistargeted Marketing

tagrandom clothes

A while back, Becky favicon pointed me towards asos.com as a rather good place to buy clothes online. I bought a couple of things from them — including this shirt that I was wearing on my birthday, if you recall.

Whether it was a conscious decision, or a slip of the mouse, I'm not sure — but I'm now subscribed to their mailing list. And every now and again, they pop up in my inbox.

The thing is though, all I've ever bought from them is women's clothing (natch — what with me being a transvestite and wotnot), so how come they send me men's clothing adverts?

*pah*

Never mind eh? I'm quite liking this...

Ah thats a much neater solution, I cant setup cron jobs on the space I rent, so I'm calling it inline...

BTW, you shouldnt really poll the RSS feed from delicious more than once every 30 minutes tut tut :tongue:

Hmm, could you not use the "Poor Man's Cron" approach — where you create an empty text file, check the modification date of it in your script and if it's over an hour ago then do stuff and touch() the file?

And yes, you're right — there's no real reason why I do other than impatience (she says, altering her crontab)

MagpieRss handles all that with the cache expiry timestamps (though I had to customise it to use different timeout values for different feeds). The point is that I have no way of calling a timed process, it all has to happen on the basis of a page request — not a biggie, the code is pretty fast anyway, and even if it gets a new version for the cache it does a HTTP Conditional Get so it only takes a hit if there is something new (these are all MagpieRss features, not me being clever)...

This is starting to go waaaaaaaay over my head :wink: Let's talk about transvestism for a change...

Twenty First Century Tranniedom

tagtranny militant

(Tranniedom — not what it might at first appear)

One of the things that I'm noticing, as I infiltrate my way further and further into the Secret World Of Crossdressers™, is how much things are changing as the years go by. I'm convinced, for example, that the general movement of things is away from the shy, embarassed, 'pathetic' nature of public perception of what we're all about, to a more open, upbeat, proud expression of ourselves.

If you compare the furtivity of the old caricature of a transvestite to the sight of twenty gazillion happy trannies in Canal Street last June, I think you'll have to agree that we've come a long way.

What I'm wondering though, is where exactly we're heading?

I was reading through the article I linked to a few days ago again recently, and it struck me that the most logical 'destination' for an extension of our quest to get the world to take us seriously and break down the barriers of a binary-approach to gender, is a situation where gender is completely fluid — and you can't define or predict someone by what they've got dangling (or not) between their legs.

I'm never quite sure how I feel about that, to be honest. On the one hand, it's quite obviously a Good Thing™ — the assumption of gender-specific behaviours/abilities is an outdated, outmoded, outrageous practice, and the chance to express myself in whatever shape or form I feel more resembles how I perceive myself has to be a positive thing.

But on the other, I worry that the grey-soup of gender-blending would irradicate any sense of specialness from what it is that I do. I worry that somehow my lifestyle relies on social constraints of what men and women are.

And I worry, most of all perhaps, that the grrl/boi movement rolls its eyes in despair at the likes of me, in just the same way that I roll my eyes at the Floral Dress Brigade™ whose image, I feel, we're just starting to move away from.

Holy bashscript Batman, it's code day!

"I worry that the grey-soup of gender-blending would irradicate any sense of specialness from what it is that I do."

Firstly, grey can be a nice colour to be...

Secondly, from what I've seen first hand, when the genders mix, they don't go grey. They don't mix like one would think, and the personallity of the individual emerges, rather than the bi-gendered uniforms society dresses us in. A sea of suits is a grey-soup. When you dress yourself, the world is a deli-platter!

and oh, I absolutely love that msn search spoof! :smile:

MSN Search...

Arf, arf! :biggrin:

gravatar

Alli' Cat'

That Can't Be Very Tasty

tagphoto

That Can't Be Very Tasty

But the ducks seemed to like it

"ohiodepartmentoftransportation.trannydirect.info"

WTF? :blink:

Of course, I'm still rather proud of this :wink:

NSFW (And Other Things)

taggenitalia

Someone remind me never to check out what are quite obviously bogus domain names just because they turn up in a search that you'd think would take you to stuff about me in future, OK?

I made the mistake of following that link that I found sound amusing above — and got swiftly redirected (through countless other domains) to a dating website, promising me hundreds of women in my area who wanted to meet with me.

There were even some photographs of these women.

I say "photographs of them", but more accurately, I suppose, I should say "photos of their genetalia". Seriously — most of them were just cropped photos of slightly damp vaginas.

And it made me wonder ... do people really find that sort of thing erotic? :unsure:

I mean, I know I've got a rather *ahem*, specialist kind of version of "erotica" going on in my head — but really, absolute graphic shots of vadges can't be sexy can it?

I found them rather offputting, to be honest.

...

Anyway, that got me thinking about the discussions about the old 'Flashr' thingie — when people add you as a contact just so they can show you their knob...

(As an aside, am I the only person in the world that doesn't really mind?)

...and it reminded me of a Flickr mail that I got this morning, from a student here at Lancaster who'd spotted my profile via some of the pictures I put up relating to Lancaster Pride, and was asking me if she could add me as a contact.

"Refreshing" is not a word that comes even close :smile:

...

So yeah, just some vague oddness this evening — I had a kip this afternoon, and haven't felt quite right since. Hot flushes, cold flushes — not that it's flu or anything, I just feel a little odd.

I went out earlier to get some fags, and there was a strange atmosphere going on — it was all too quite. It was just after six, and everywhere should have been really busy — but even Sainsburys was deathly silent.

Walking along the cycle path though, I heard a strange "chuff chuff chuff" noise in the distance, getting steadily louder. Closer and closer it came, getting chuffing louder (:biggrin:) all the time.

Then suddenly, a steam train flew past.

...

On the way back from Sainsburys, I suddenly became overtly aware of the imminent aproach of Spring. Most of the trees just had little buds at the end of their branches, but quite a few of the smaller bushes were already pushing leaves out into the open.

Foolish things — it's still bloody freezing :unsure:

At the bottom of the Priory graveyard, as well, one of the trees is about to blossom :smile:

I'm always in two minds about this time of year. The promise of the not-too distant arrival of Summer (and the joy that entails) is so tantalisingly close — but just out of reach.

I can't wait (for several obvious reasons) until June :wink:

...

Just going back to what Emily said (so eloquently) above, I do think it's the case that "the personallity of the individual emerges" — but that still doesnt stop me worrying that the Thing That I Do™ is destined to become an outdated oddity in the history of gender expression.

That might, or might not (and this is my internal debate, really) be a good thing.

The Simpsons Movie Trailer

taglink

"Excellent"

Tired of male domination, 5 Saudi women change sex — Yahoo! News

taglink

Yes, well, I suppose that's one set of motives. Call me naive here, but wouldn't some kind of feminist agenda/campaign/rally be less drastic?

maybe that is their campaign

And maybe I'm too quick to judge

i'm actually getting a bit of a complex about this now, but I think I'm the only person on the planet NOT to like the Simpsons :o

So you can imagine how the thought of a big screen, 2 hour version, makes me feel!!!

I was just thinking the same thing Steph... Thanks for giving me some peace.

I'd just like to say that I'm a Simpsons baby. Been watching it since before I can even remember. So :tongue: to you two.

logo