Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
my $profile = {
     name => '            ',
     id    => 'sugyan',
     age   => 26,
};
perl -MText::MeCab -MNet::Twitter -MEncode=encode_utf8 -e '
my $t = '''Net::Twitter'''->new('''username''', ''sugy
an''', ...
TerminalでTwitter
TerminalでTwitter
TerminalでTwitter
TerminalでTwitter
TerminalでTwitter
TerminalでTwitter
TerminalでTwitter
TerminalでTwitter
TerminalでTwitter
TerminalでTwitter
TerminalでTwitter
TerminalでTwitter
TerminalでTwitter
TerminalでTwitter
TerminalでTwitter
TerminalでTwitter
TerminalでTwitter
TerminalでTwitter
TerminalでTwitter
TerminalでTwitter
TerminalでTwitter
TerminalでTwitter
TerminalでTwitter
TerminalでTwitter
TerminalでTwitter
Upcoming SlideShare
Loading in …5
×
Upcoming SlideShare
ドルヲタを支える技術
Next
Download to read offline and view in fullscreen.

0

Share

Download to read offline

TerminalでTwitter

Download to read offline

Perl Casual Talks#1 の発表資料です。
http://perl-casual.org/2009/11/casual-talks1-1.html

Related Books

Free with a 30 day trial from Scribd

See all

Related Audiobooks

Free with a 30 day trial from Scribd

See all
  • Be the first to like this

TerminalでTwitter

  1. 1. my $profile = { name => ' ', id => 'sugyan', age => 26, };
  2. 2. perl -MText::MeCab -MNet::Twitter -MEncode=encode_utf8 -e ' my $t = '''Net::Twitter'''->new('''username''', ''sugy an''', '''password''', '''******''');my $statuses = $t ->friends_timeline;my $status = $$statuses[rand @$statuses] ;my $text = encode_utf8($$status{'''text'''});my $user = $$status{'''user'''}{'''screen_name'''};$text =~ s/ [^ s]+ /z($&);/egmsx;$t->update("@$user 343201214350250 200343201243343201237: $text");sub z {my $text = shif t @_;my $zenra = "345205250350243270343201247";my $mecab = '''Text::MeCab'''->new;my $n = $mecab->parse($te xt);my $output = '''''';$n = $n->next while $n->next;my $ flg = 0;while (($n = $n->prev)->prev) {if ($flg) {my $inser t = 1;if ($n->feature =~ / A (345220215350251236|34 5211257350251236|345213225350251236) /msx) {$ins ert = 0;}elsif ($n->feature =~ / A 345212251(3452132 25)?350251236 /msx and (split(/,/, $n->prev->feature, 0) )[5] =~ / 351200243347224250 /msx) {$insert = 0;}if ( $insert) {$output = $zenra . $output;$flg = 0;}}$output = $ n->surface . $output;if ($n->feature =~ / A 3452132253 50251236 /msx) {$flg = 1;}}if ($flg) {$output = $zenra . $output;}return $output;}'

Perl Casual Talks#1 の発表資料です。 http://perl-casual.org/2009/11/casual-talks1-1.html

Views

Total views

2,198

On Slideshare

0

From embeds

0

Number of embeds

143

Actions

Downloads

4

Shares

0

Comments

0

Likes

0

×