Forum: Typo LiveJournal Crossposter written - a gross hack, and some que

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Fa96def0f40a946968db0b48a0c4782a?d=identicon&s=25 Chris Patti (Guest)
on 2007-05-30 18:49
(Received via mailing list)
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' - 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
>   after_create :lj_crosspost
>       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 Patti --- Y!: feoh -- AIM: chrisfeohpatti --- E-Mail:
"The greatest dangers to liberty lurk in insidious encroachment by men
  zeal,well-meaning but without understanding."-- Justice Louis O.
 (Olmstead vs. United States)
This topic is locked and can not be replied to.