LiveJournal Crossposter written - a gross hack, and some que

Hello all;

I needed a working cog in far less time than it will take for me to
understand the intricacies of RAILS plugins and how they interact with
Typo. So, for now, here is the solution I implemented. It uses the
command line LJ posting client ‘Clive’ -
A console LiveJournal client download | SourceForge.net to do the actual cross
posting. Eventually I’ll re-implement it to use one of the fully
forged Ruby LiveJournal posting APIs.

Here are the diffs to models/article.rb:

[feoh@mail]/blog/blind_not_dumb/app/models% diff article.rb.1 article.rb
247a248

after_create :lj_crosspost
269a271,285
logger.debug("about to run command: " + “cat #{ljpost_path}|/usr/local/bin/clive -u myljuser -w myljpassword -s "#{self.title}"”);
logger.debug('output of ljpost command is: ’ + cat #{ljpost_path}|/usr/local/bin/clive -u feoh -w d1rtylaundry -s "#{self.title}");
end
end


A few questions:

  • Is there some better place than the article model for me to be
    grafting in this kind of cross posting
    post processing?
  • Where should I start looking if I want to implement this as a plugin?

Thanks for any clues.
-Chris


Chris P. — Y!: feoh – AIM: chrisfeohpatti — E-Mail:
[email protected]
“The greatest dangers to liberty lurk in insidious encroachment by men
of
zeal,well-meaning but without understanding.”-- Justice Louis O.
Brandeis
(Olmstead vs. United States)