?

Log in

No account? Create an account
Oh dear, I've just had a silly idea for how to make an off-site… - 'Twas brillig, and the slithy toves did gyre and gimble in the wabe [entries|archive|friends|userinfo]
Thomas

[ website | Beware the Jabberwock... ]
[ deviantArt | the-boggyb ]
[ FanFiction | Torkell ]
[ Tumblr | torkellr ]

Links
[Random links| BBC news | Vulture Central | Slashdot | Dangerous Prototypes | LWN | Raspberry Pi]
[Fellow blogs| a Half Empty Glass | the Broken Cube | The Music Jungle | Please remove your feet | A letter from home]
[Other haunts| Un4seen Developments | Jazz 2 Online | EmuTalk.net | Feng's shui]

[Thursday 20th December 2012 at 11:12 pm]
Thomas

boggyb
[Tags|]
[Feeling |sillysilly]
[Playing |Scandalous ~ Faithless/The Dance]

Oh dear, I've just had a silly idea for how to make an off-site friends page equivalent that actually has the full metadata (the RSS feed lacks some of it) and LJ-tags available:

Write a custom S2 style to display a journal or a single entry in a nicely parseable format. You could use the Lynx theme for this with a little effort, but having your own S2 style means you don't have to fix your parser every time LJ update their site. On the flip side, you do have to update your S2 style every time LJ adds some new feature... but that's only if you actually care about their changes.

Ping the checkfriends API to determine when someone's made a post. When that claims there're new posts, grab the friends page RSS feed using the auth parameter to log in as yourself (so your scripts or whatever can see any friends-only posts that are on your friends page). Parse that to work out which posts are new. Then grab those posts, but add the s2id parameter to the URL to make them appear using your new S2 style. Parse those into whatever style you want.

Wrap all this up in a suitably shiny bunch of PHP or whatever, and hey presto - you now have a friends page that looks exactly how you want it to.
Link | Previous Entry | Share | Next Entry[ Penny for your thoughts? ]