Dec. 14th, 2007

afuna_archive: (Default)
I forgot that certain characters under certain conditions will cause parts of a word to be expanded as a variable in Perl. (In other words, my password was wrong because a portion of it was being recognized as a variable "$xyz", which was blank ;))

*whistles innocently*

The original script is barely recognizable, as I had to redo the feed fetching, parsing, authentication, time(zone) handling, and posting to LJ. However! The HTML format of the output remains (mostly) the same.

Had to rework the feed-fetching-related stuff because the RSS feed has too few items (only 20). The archives XML file, which gives 80 items at a time, is in XML, but not RSS. They require different approaches to authentication as well. I feel a bit guilty about fetching directly from the archives instead of from latest items, but I only do it once a day, so it seems reasonable enough.

Given the problem with the password, the authentication for my RSS feed probably never worked. I just didn't notice it, because authenticating on that feed had no effect, given my settings!

For some reason, @lj_tags = ["tweets"]; was parsed as "array(0xblah)" when posted $lj->Setprop_taglist (in LJ::Simple). However, using @lj_tags = qw(tweets); works. As does using LJ::Simple::QuickPost. It's likely I've misunderstood something about the way lists work in Perl.
ETA: Ciaran has explained it to me :)
( [] indicates an array reference. I got that first line from the original code, which uses QuickPost, which expects an array reference, so it worked for that, but not when I switched to Setprop_taglist. Refreshing my memory about scalars vs lists vs references now *g*)

Now that it works, I have to resist the urge to redo it to optionally use JSON instead of XML (for the sake of those who had trouble installing the XML::Parser, since that would only affect a few people, and of those few people, I'm probably the only one who wants to do Twitter->LJ via this script). I also have to resist the urge to add options to grab other things available via the Twitter API.

So yay, my Twitter stuff archived here: (backdated so that it doesn't double-spam, forchrissake).

<3 [ profile] aveleh, [ profile] murklins, [ profile] ciaran_h for bearing with my babbling over IM (while I tried to figure out how to best tweak certain things *g*)
afuna_archive: (Default)
00:16:27 — @ciaran_h patience :-) I realized it wasn't doing timezones correctly, so I've been rerunning it
01:35:22 — tweaked twitter2lj works :-) Fixed tags "array(0xblah)", added total&DOOO, and used proper timezone when selecting feed date/entry date.
03:19:35 — did my own script which parsed the archives instead of just last 20, so now I have even the old ones on LJ. sorryifispammedwhiletesting
10:18:51 — @youlovetam what is a tweeterboard?
10:19:39 — @aveleh it's all in the timing, m'dear ;-)
10:24:25 — Yay, someone's birthday today, so he brought a gigantic sapin-sapin! (colorful rice-based sweet normally topped by toasted coconut)
10:43:31 — @youlovetam oh interesting. That is cute! I'll look at it later
10:51:43 — I am such a good taskmaster for aveleh *smug*
11:45:20 — @exor674 I am trying to keep it to no more than 20 a day so twitter2lj will work properly
11:45:38 — @aveleh unfortunately, I find restraint to be a dirty word ;-)
11:56:11 — @exor674 hm. are you getting anything at all IM'd to you? I had some trouble receiving IMs to GTalk before; not sure what you use
12:49:46 — figured out what was wrong with auth. Now considering rewriting to use xml or json, as not all of the API is offered via RSS
13:11:21 — didn't get enough sleep last night, so I'm susceptible to the cold right now. Wrapped in 3 layers of clothes, and still chilly *brr*
13:17:31 — @exor674 <33! Warm and cozy now (albeit a bit smooshed)
15:36:37 — the kids are here! :)
17:54:16 — aww and now the kids are gone. Christmas gets so *hectic* when you factor in all the outreach programs going on
17:58:11 — @ciaran_h was an outreach thing. We were supposed to go there during the weekend, but bec. they're so busy, they came here instead
18:06:43 — @ciaran_h outreach = social welfare/social service program. I had no idea it had any other meaning (no wonder you were confused *g*)
18:18:10 — we have some candy left over. Was supposed to give them all, but got left extra. *chocolate* (it's like taking candy from a baby ^__^)
18:33:20 — @youlovetam yup, something like that, though these were orphaned and abandoned kids (no families :/)
19:59:00 — oooh yes today is payday. I just earned my first month's worth of! ($$$$, er I mean PhpPhpPhpPhp)
21:34:54 — @ciaran_h inconsistent how?
21:38:39 — @ciaran_h ahh. Yeah, had that same problem, so I eventually just set private true. It works for me given I have so few people I talk to :)
21:47:04 — @ciaran_h I don't know what you're talking about :-)
21:51:00 — @ciaran_h yup. It's like it never happened :)
21:54:55 — @ciaran_h Exactly! I'm glad we understand each other so well <3
23:22:40 — meteor shower! Only saw two go by though. Then I hung around outside and looked at the stars for a bit

Total: 27 tweets

You can find me as afuna on Twitter.


afuna_archive: (Default)

June 2009

  1 2 3 4 5 6
7 8 9 10 11 1213

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Oct. 20th, 2017 02:30 pm
Powered by Dreamwidth Studios