roadrunnertwice: Weedmaster P. Dialogue: "SON OF A DICK. BALL COCKS. NO. FUCKING." (Shitbox (Overcompensating))
[personal profile] roadrunnertwice
(x-posted from my journal)

So I was just thinking that I missed being able to automatically post the current music to LJ, back when I was using Xjournal. And that got me thinking about whether I could rig something up to just type the current track into the web form for me, right? Answer: Hell yes, I can! It is Applescript, and is predictably barbaric. Check it out:

Paste current iTunes track.scpt:

Some barbaric Applescript )

(I was originally going to just use the keystroke function to actually TYPE the text, instead of blowing away the clipboard, but this turns out to result in comedy for tracks with any non-ASCII characters.)

And then when I was about to post about how cool this was, I ran smack into how annoying it is to turn formatted RTF-ey text into a useful HTML fragment. So I wrote a script to do THAT for me, too. This one requires an external tool called "premailer," so you'll have to install that with gem.

This one SHOULD work with styled text copied from Word, TextEdit, or basically anywhere, but I haven't tested it very thoroughly yet.

Convert RTF clipboard to HTML fragment.scpt:

More barbaric Applescript )

As ever, just paste these into Applescript Editor, save them in ~/Library/scripts, and run them with FastScripts.

Profile

macapps: Apple logo (Default)
Mac Apps

October 2017

S M T W T F S
12 34567
891011121314
15161718192021
22232425262728
293031    

Syndicate

RSS Atom
Powered by Dreamwidth Studios

Style Credit

Expand Cut Tags

No cut tags