Re: Posting to blogger.com?
- Original Message > From: Egor Shipovalov > Sorry, forgot to mention: you must have a file called something > like .www_blogger in you home directory, containing login credentials. > See perldoc for WWW::Blogger::XML for details. Actually, WWW::Blogger::XML doesn't say anything about this. Rather hostile documentation. The file's called '.www_blogger_rc' and must be in the AppConfig::Std format like so: username = $username password = $password There's also no option to supply this data programatically. Either you have that file or you're sunk. That's not the real problem, though. I would venture that the dependency on Net::Google::GData is where most people are going to get stuck. It's available at http://backpan.perl.org/authors/id/A/AY/AYOUNG/Net-Google-GData-0.01.tar.gz, but the author's deleted it from the CPAN. That was *real* fun. I'll email him to see what's going on. And it fails its own tests. Lovely. After much fighting, I've finally gotten it to authenticate and I'm now at the "400 Bad Request" stage which, all things considered, is much further than I've gotten. I'll post to my blog when I get a more generic solution. Cheers, Ovid -- Buy the book - http://www.oreilly.com/catalog/perlhks/ Tech blog - http://blogs.perl.org/users/ovid/ Twitter - http://twitter.com/OvidPerl Official Perl 6 Wiki - http://www.perlfoundation.org/perl6
Re: Posting to blogger.com?
Maybe i m going to burn in hell for this heresy, but if you're interested, I ve got a python script that does what you'd like. Jerome. On 3 Jun 2010 08:26, "Ovid" wrote: - Original Message > From: Egor Shipovalov > Sorry, forgot to men... Actually, WWW::Blogger::XML doesn't say anything about this. Rather hostile documentation. The file's called '.www_blogger_rc' and must be in the AppConfig::Std format like so: username = $username password = $password There's also no option to supply this data programatically. Either you have that file or you're sunk. That's not the real problem, though. I would venture that the dependency on Net::Google::GData is where most people are going to get stuck. It's available at http://backpan.perl.org/authors/id/A/AY/AYOUNG/Net-Google-GData-0.01.tar.gz, but the author's deleted it from the CPAN. That was *real* fun. I'll email him to see what's going on. And it fails its own tests. Lovely. After much fighting, I've finally gotten it to authenticate and I'm now at the "400 Bad Request" stage which, all things considered, is much further than I've gotten. I'll post to my blog when I get a more generic solution. Cheers, Ovid -- Buy the book - http://www.oreilly.com/catalog/perlhks/ Tech blog - http://blogs.perl.org/users/ovid/ Twitter - http://twitter.com/OvidPerl Official Perl 6 Wiki - http://www.perlfoundation.org/perl6
Re: Posting to blogger.com?
On Mon, May 31, 2010 at 06:29, Ovid wrote: > Does anyone have any *working* code (I've seen plenty of failing examples) > they can share which demonstrates making a successful post to blogger? I've > failed with both Net::Blogger and Atompub > (http://stackoverflow.com/questions/2942998/cant-post-with-perls-netblogger). Yeah, it's written in python. http://code.google.com/apis/blogger/docs/1.0/developers_guide_python.html Tool for the job etc... Paul
[ANNOUNCE] send-a-newbie scheme for YAPC::EU 2010
This is just a reminder to say that anyone contemplating attending the next YAPC::EU on this list who would benefit from extra funds from the send-a-newbie scheme should apply as soon as possible to the address listed at: http://www.send-a-newbie.enlightenedperl.org/applications.html Make sure to answer all the questions. The offer is open to everyone so don't hesitate. Also make sure you re-post to all and every list the two emails I sent out previously, the text and details can be found at: http://mdk.per.ly/2010/05/06/send-a-newbie-2/ I am relying on you all to take notice and do some action on this. Thanks and regards Mark Mark Keating BA (Hons) | Writer, Photographer, Cat-Herder Managing Director | Shadowcat Systems Limited Director/Secretary | Enlightened Perl Organisation co-Leader | North West England Perl Mongers http://www.shadowcat.co.uk | http://www.enlightenedperl.org http://northwestengland.pm.org | http://linkedin.com/in/markkeating
Re: Posting to blogger.com?
On Wed, Jun 02, 2010 at 05:52:40PM +0100, Mark Fowler typed: > On Wed, Jun 2, 2010 at 4:29 PM, Dave Hodgkinson wrote: > > > On 2 Jun 2010, at 21:38, Egor Shipovalov wrote: > >> use File::Slurp; > > > > This is the start of most scripts I've been writing recently. > > I dumped this since I started using Path::Class all the time. > > my $content = file("something")->slurp Does it work with UTF-8? File::Slurp doesn't. -- Steve Mynott
Re: Posting to blogger.com?
Steve Mynott writes: > On Wed, Jun 02, 2010 at 05:52:40PM +0100, Mark Fowler typed: > >> On Wed, Jun 2, 2010 at 4:29 PM, Dave Hodgkinson wrote: >> >> > On 2 Jun 2010, at 21:38, Egor Shipovalov wrote: >> >> use File::Slurp; >> > >> > This is the start of most scripts I've been writing recently. >> >> I dumped this since I started using Path::Class all the time. >> >> my $content = file("something")->slurp > > Does it work with UTF-8? What do you mean "work with"? I would expect it to return an octet string and leave the decoding to you, since it can't possibly know the encoding of an arbitrary. > File::Slurp doesn't. Look buddy, doesn't work is a strong statement. Does it sit on the couch all day? Is it making faces at you? Does it want more money? Is it sleeping with your girlfriend? Please be specific! -- ilmari "A disappointingly low fraction of the human race is, at any given time, on fire." - Stig Sandbeck Mathisen
Re: Posting to blogger.com?
ilm...@ilmari.org (Dagfinn Ilmari Mannsåker) writes: > it can't possibly know the encoding of an arbitrary. Of an arbitrary file, of course. -- ilmari "A disappointingly low fraction of the human race is, at any given time, on fire." - Stig Sandbeck Mathisen
Re: Posting to blogger.com?
On 3 Jun 2010, at 18:41, Dagfinn Ilmari Mannsåker wrote: > ilm...@ilmari.org (Dagfinn Ilmari Mannsåker) writes: > >> it can't possibly know the encoding of an arbitrary. > > Of an arbitrary file, of course. No, I like the word you just nouned. Retribution for all the verbing that's been going on.
Re: Posting to blogger.com?
On 3 Jun 2010, at 00:52, Mark Fowler wrote: > On Wed, Jun 2, 2010 at 4:29 PM, Dave Hodgkinson wrote: > >> On 2 Jun 2010, at 21:38, Egor Shipovalov wrote: >>> use File::Slurp; >> >> This is the start of most scripts I've been writing recently. > > I dumped this since I started using Path::Class all the time. > > my $content = file("something")->slurp Ah, slurp("file") is clearly too obscure and difficult.
Re: Posting to blogger.com?
On Jun 3, 2010, at 5:06 AM, Steve Mynott wrote: > On Wed, Jun 02, 2010 at 05:52:40PM +0100, Mark Fowler typed: > >> On Wed, Jun 2, 2010 at 4:29 PM, Dave Hodgkinson wrote: >> >>> On 2 Jun 2010, at 21:38, Egor Shipovalov wrote: use File::Slurp; >>> >>> This is the start of most scripts I've been writing recently. >> >> I dumped this since I started using Path::Class all the time. >> >> my $content = file("something")->slurp > > Does it work with UTF-8? It does with this patch https://rt.cpan.org/Public/Bug/Display.html?id=58088 my $content = file("something")->slurp(iolayers => ':encoding(utf8)'); Graham.
Re: Posting to blogger.com?
On 03/06/2010, at 8:06 PM, Steve Mynott wrote: > On Wed, Jun 02, 2010 at 05:52:40PM +0100, Mark Fowler typed: > >> On Wed, Jun 2, 2010 at 4:29 PM, Dave Hodgkinson wrote: >> >>> On 2 Jun 2010, at 21:38, Egor Shipovalov wrote: use File::Slurp; >>> >>> This is the start of most scripts I've been writing recently. >> >> I dumped this since I started using Path::Class all the time. >> >> my $content = file("something")->slurp > > Does it work with UTF-8? File::Slurp seems to, or am I missing something: $ cat > utf 김치 k...@fenchurch>/tmp$ perl -MFile::Slurp -e 'read_file('utf')' k...@fenchurch>/tmp$ perl -w -MFile::Slurp -e '$u = read_file("utf"); write_file("u2", $u)' k...@fenchurch>/tmp$ cat u2 김치
Re: Posting to blogger.com?
Kieren Diment wrote: On 03/06/2010, at 8:06 PM, Steve Mynott wrote: On Wed, Jun 02, 2010 at 05:52:40PM +0100, Mark Fowler typed: On Wed, Jun 2, 2010 at 4:29 PM, Dave Hodgkinson wrote: On 2 Jun 2010, at 21:38, Egor Shipovalov wrote: use File::Slurp; This is the start of most scripts I've been writing recently. I dumped this since I started using Path::Class all the time. my $content = file("something")->slurp Does it work with UTF-8? File::Slurp seems to, or am I missing something: $ cat > utf 김치 k...@fenchurch>/tmp$ perl -MFile::Slurp -e 'read_file('utf')' k...@fenchurch>/tmp$ perl -w -MFile::Slurp -e '$u = read_file("utf"); write_file("u2", $u)' k...@fenchurch>/tmp$ cat u2 김치 The real test is whether chr $u > 255. Of course the data is passed through correctly whether or not perl understands that it's unicode data. Matt
Re: Posting to blogger.com?
On 3 Jun 2010, at 20:56, Matt Lawrence wrote: > The real test is whether chr $u > 255. Of course the data is passed through > correctly whether or not perl understands that it's unicode data. And thank you to Ilmari and Zefram for the clue bat on all things UTF8 and indeed utf-8.