Skip to content

Instantly share code, notes, and snippets.

@Hopper262
Created January 16, 2017 08:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Hopper262/ba698fee20920486489b6b9688616cf6 to your computer and use it in GitHub Desktop.
Save Hopper262/ba698fee20920486489b6b9688616cf6 to your computer and use it in GitHub Desktop.
#!/usr/bin/env perl
for my $line (<STDIN>)
{
if ($line =~ /^--(.+\S)/)
{
print "[b]" . $1 . "[/b]\n\n";
}
if ($line =~ /gui\.drawText\((?:2,164|\d+,156|\d+,170),"(.+?[^\\])"/)
{
my $text = $1;
$text =~ s/\\[nt]/ /g;
$text =~ s/\\//g;
$text =~ s/ +/ /g;
$text =~ s/^ +//;
$text =~ s/ +$//;
next if $text =~ /^(?:Donald|Dracula|Shere Khan|Viking Ghost|Guardian): /;
print "$text\n";
print "\n" if $text =~ /:/;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment