Hatena::ブログ(Diary)

ルイズ!ルイズ!ルイズ!ルイズぅぅうううわぁああああああああああああああああああああああん!!!あぁああああ…ああ…あっあっー!あぁああああああ!!!ルイズルイズルイズぅううぁわぁああああ!!!あぁクンカクンカ!クンカクンカ!スーハースーハー!スーハース

Map

2014-02-09

coLinuxgentooだと捗るなw

ぶっちゃけると 23:41

VB6->VB.NETよりVB6->VC++6のほうが遥に楽。

use strict;
use warnings;
use Win32::API;
use Win32::API::Callback;

$| = 1;
my %WindowTitle = ();
my $EnumWindows = new Win32::API('user32', 'EnumWindows', 'KN', 'N');
my $GetWindowText = new Win32::API('user32', 'GetWindowText', 'NPN', 'N' );

my $Callback = Win32::API::Callback->new(
    sub { 
        my($hwnd, $lparam) = @_;

            my $text = ' ' x 255;
            my $length = $GetWindowText->Call( $hwnd, $text, 255 ) || return 1;
            $text = substr( $text, 0, $length ) || return 1;
            push @{$WindowTitle{$text}}, $hwnd;

        return 1;
    },
    'NN', 'N');

$EnumWindows->Call($Callback, 0);

foreach(keys %WindowTitle)
{
    printf "%-40s : %-s\n", $_,  join ',', @{$WindowTitle{$_}};
}

perl でやるほうがらくかもしれんwww

最近だと 16:42

cpanm File::Spec Compress::Zlib Cache::Cache Config::Simple Crypt::SSLeay Date::Parse DateTime DateTime::Format::Mail DateTime::Format::Strptime DateTime::Format::W3CDTF ExtUtils::CBuilder ExtUtils::ParseXS File::Find::Rule HTML::ResolveLink HTML::Scrubber HTML::TreeBuilder IO::Socket::SSL IPC::Run JSON::Syck MIME::Types Net::DNS Net::SSLeay Template Template::Provider::Encoding Term::Encoding Test::Pod Test::Pod::Coverage Text::Tags URI::Fetch URI::Find Data::Dump XML::Atom XML::FOAF XML::LibXML XML::Liberal XML::Simple XML::SimpleObject XML::XPathEngine XMLRPC::Lite

で済むのか...

ぐぬぬ 00:14

./configure: line 3877: syntax error near unexpected token `PCRE,'

./configure: line 3877: `PKG_CHECK_MODULES(PCRE, libpcre)'

#sudo apt-get install pcre.\*dev.\*

#sudo apt-get install zlib1g-dev

#sudo apt-get install libbz2-dev

#sudo apt-get install liblzma.\*

#sudo apt-get install libreadline-dev

解決...しない

ぐぬぬ

./configure: line 3877: syntax error near unexpected token `PCRE,'

./configure: line 3877: `PKG_CHECK_MODULES(PCRE, libpcre)'

ぐぬぬ

# sudo apt-get install pkg-config

解決...

cygwinにpla 10:51

Cygwinにplaいれた だいぶ楽になったな。

1

cpan -i Bundle::CPAN

2

cpan -i File::Spec

ln -s /usr/bin/gcc /usr/bin/gcc-4

cpan -i File::Spec

pla

3

cpan -i Compress::Zlib

running rebaseall
      2 [main] perl 1888 child_info_fork::abort: unable to remap Zlib.dll to same address as parent (0x1180000) - try running rebaseall
      2 [main] perl 912 child_info_fork::abort: unable to remap IO.dll to same address as parent (0x3F0000) - try running rebaseall
      2 [main] perl 2208 child_info_fork::abort: unable to remap Zlib.dll to same address as parent (0x1180000) - try running rebaseall
      3 [main] perl 1716 child_info_fork::abort: unable to remap IO.dll to same address as parent (0x3F0000) - try running rebaseall

need rebase@cyg dll

rm /etc/rebase.db.i386

rebaseall -p -v

cpan -i Bundle::CPAN

pla

4

cat > Bundle/Original.pm<<'__EOF__'
package  Bundle::Original;
use strict;
use vars qw( $VERSION );
$VERSION = "0.01";
=head1 CONTENTS

Cache::Cache
Config::Simple
Crypt::SSLeay
Date::Parse
DateTime
DateTime::Format::Mail
DateTime::Format::Strptime
DateTime::Format::W3CDTF
ExtUtils::CBuilder
ExtUtils::ParseXS
File::Find::Rule
HTML::ResolveLink<
HTML::Scrubber
HTML::TreeBuilder
IO::Socket::SSL
IPC::Run
JSON::Syck
MIME::Types
Net::DNS
Net::SSLeay
Template
Template::Provider::Encoding
Term::Encoding
Test::Pod
Test::Pod::Coverage
Text::Tags
URI::Fetch
URI::Find Data::Dump
XML::Atom
XML::FOAF
XML::LibXML
XML::Liberal
XML::Simple
XML::SimpleObject
XML::XPathEngine
XMLRPC::Lite

=cut
1;
__EOF__
perl -I./ -MCPAN -e "install  Bundle::Original"

pla

5

XML::Feedはローカルでmake; make install

pla

6

cpan -i Plagger

Installing /usr/local/bin/plagger
Installing /usr/local/bin/plagger-ircbot
Appending installation info to /usr/lib/perl5/5.14/i686-cygwin-threads-64int/perllocal.pod
  MIYAGAWA/Plagger-0.7.17.tar.gz
  /usr/bin/make install  -- OK

pla ^^

とりあえず起動はする

7

後は適当にいれる入んなくても無視

8 yomiuri yamlすると...エラー

9 assetsがない

git clone https://github.com/miyagawa/plagger

cd plagger

rm -rf /usr/share/plagger/assets

mkdir /usr/share/plagger/

cp -Rp assets /usr/share/plagger/

cd ..

rm -rf plagger/

10 Cannot decode string with wide characters at Encode.pm line 174 @ Filter::EntryFullText

plagger 2>&1| tail -2

  • /usr/share/plagger/assets/plugins/Filter-EntryFullText/animate_tv_news.yaml
  • /usr/share/plagger/assets/plugins/Filter-EntryFullText/animate_tv_nf.yaml

Cannot decode string with wide characters at Encode.pm line 174

入れ直すと治る

rm -rf /lib/perl5/site_perl/5.14/Plagger/TT/Plagger/Util.pm

rm -rf /lib/perl5/site_perl/5.14/Plagger/Util.pm

rm -rf /usr/lib/perl5/site_perl/5.14/Plagger/TT/Plagger/Util.pm

rm -rf /usr/lib/perl5/site_perl/5.14/Plagger/Util.pm

rm -rf /lib/perl5/site_perl/5.14/Plagger/TT/Plagger/

rm -rf /lib/perl5/site_perl/5.14/Plagger/

rm -rf /usr/lib/perl5/site_perl/5.14/Plagger/TT/Plagger/

rm -rf /lib/perl5/site_perl/5.14/Plagger/TT/

rm -rf /usr/lib/perl5/site_perl/5.14/Plagger/TT/

rm -rf /usr/lib/perl5/site_perl/5.14/Plagger/*/

rm -rf /usr/lib/perl5/site_perl/5.14/Plagger/

rm -rf /lib/perl5/site_perl/5.14/Plagger/*/

rm -rf /lib/perl5/site_perl/5.14/Plagger/*/*/

rm -rf /lib/perl5/site_perl/5.14/Plagger/*

git clone https://github.com/miyagawa/plagger

cd plagger

rm -rf /usr/share/plagger/assets

mkdir /usr/share/plagger/

cp -Rp assets /usr/share/plagger/

make Makefile.pl make make install

cd ..

rm -rf plagger/

11

いろいろ

perl Makefile.PL&& make && make install

perl Makefile.PL&& make && make install

perl Makefile.PL&& make && make install

perl Makefile.PL&& make && make install

...

12

global:
  assets_path: /usr/share/plagger/assets
  cache:
    base: /cygdrive/r/
  timezone: Asia/Tokyo
  log:
    level: debug

plugins:

  - module: Subscription::Config
    config:
      feed:
       # - url: http://cal.syoboi.jp/rss.php

        - url: http://b.hatena.ne.jp/hotentry?mode=rss
          meta:
            follow_link: .*

        - url: http://labs.ceek.jp/hbnews/rss/index.rdf
  - module: Filter::EntryFullText
    config:
      store_html_on_failure: 1

  - module: Widget::HatenaBookmark
  - module: Filter::HatenaBookmarkUsersCount
  - module: Widget::HatenaBookmarkUsersCount

  - module: Filter::BreakEntriesToFeeds
  - module: Publish::OutlineText
    config:
      filename: sample.txt
      encoding: Shift_JIS

# /usr/share/plagger/assets/plugins/Notify-SSTP/sstp.tt
  - module: Notify::SSTP
    config:
      host: 192.168.0.1

\f[color,lightblue] [% entry.title || '' %] [% IF entry.meta.hatenabookmark_users %] \f[color,red] [% entry.meta.hatenabookmark_users %] users  [% END %]
 \f[color,yellow] [[% entry.permalink %]]
※本文中の各企業名、製品名などは、それぞれの所有者の商標あるいは登録商標です。