1 | 1 |
# TODO: Eventually we should use Getopt::Long and go back to #!/usr/bin/env perl
|
2 | 2 |
#########################################################################
|
3 | 3 |
#
|
4 | |
# oysttyer v2.9 (c)2016- oysttyer organisation
|
|
4 |
# oysttyer v2.10 (c)2016- oysttyer organisation
|
5 | 5 |
# (c)2007-2012 cameron kaiser (and contributors).
|
6 | 6 |
# all rights reserved.
|
7 | 7 |
#
|
|
32 | 32 |
}
|
33 | 33 |
|
34 | 34 |
$command_line = $0; $0 = "oysttyer";
|
35 | |
$oysttyer_VERSION = "2.9";
|
36 | |
$oysttyer_PATCH_VERSION = 1;
|
|
35 |
$oysttyer_VERSION = "2.10";
|
|
36 |
$oysttyer_PATCH_VERSION = 0;
|
37 | 37 |
$oysttyer_RC_NUMBER = 0; # non-zero for release candidate
|
38 | 38 |
# this is kludgy, yes.
|
39 | 39 |
$LANG = $ENV{'LANG'} || $ENV{'GDM_LANG'} || $ENV{'LC_CTYPE'} ||
|
|
108 | 108 |
statusliurl followliurl leaveliurl dmidurl nostreamreplies
|
109 | 109 |
frupdurl filterusers filterats filterrts filterflags
|
110 | 110 |
filteratonly nofilter rtsofmeurl largeimages origimages extended
|
111 | |
video_bitrate
|
|
111 |
video_bitrate separator
|
112 | 112 |
); %opts_others = map { $_ => 1 } qw(
|
113 | 113 |
lynx curl seven silent maxhist noansi hold status
|
114 | 114 |
daemon timestamp twarg user anonymous script readline
|
|
588 | 588 |
# set up track tags
|
589 | 589 |
if (length($tquery) && $tquery ne '0') {
|
590 | 590 |
my $xtquery = &tracktags_tqueryurlify($tquery);
|
591 | |
die("** custom tquery is over 140 length: $xtquery\n")
|
592 | |
if (length($xtquery) > 139);
|
|
591 |
die("** custom tquery is over $linelength length: $xtquery\n")
|
|
592 |
if (length($xtquery) >= $linelength);
|
593 | 593 |
@trackstrings = ($xtquery);
|
594 | 594 |
} else {
|
595 | 595 |
&tracktags_makearray;
|
|
656 | 656 |
$lat ||= undef;
|
657 | 657 |
$long ||= undef;
|
658 | 658 |
$location ||= 0;
|
659 | |
$linelength ||= 140;
|
660 | |
$quotelinelength ||= 116;
|
|
659 |
$linelength ||= 280;
|
|
660 |
$quotelinelength ||= 256;
|
661 | 661 |
$tco_length ||= 23; # The number of characters that t.co links require
|
662 | 662 |
$dm_text_character_limit ||= 10000;
|
663 | 663 |
$oauthbase ||= $apibase || "${http_proto}://api.twitter.com";
|
|
770 | 770 |
$largeimages ||= 0;
|
771 | 771 |
$origimages ||= 0;
|
772 | 772 |
$doublespace ||= 0;
|
773 | |
$extended ||= 0;
|
|
773 |
$extended ||= 1;
|
774 | 774 |
$video_bitrate ||= 'highest';
|
775 | 775 |
if ($extended) {
|
776 | 776 |
$tweet_mode = "extended";
|
|
779 | 779 |
$tweet_mode = "compatibility";
|
780 | 780 |
$display_mode = "text";
|
781 | 781 |
}
|
|
782 |
$separator ||= 0;
|
782 | 783 |
|
783 | 784 |
# synch overrides these options.
|
784 | 785 |
if ($synch) {
|
|
6291 | 6292 |
print $stdout "-- (filtered $filtered tweets)\n";
|
6292 | 6293 |
$filtered = 0;
|
6293 | 6294 |
}
|
|
6295 |
print $separator . "\n" if ( $separator );
|
6294 | 6296 |
}
|
6295 | 6297 |
|
6296 | 6298 |
sub defaultdmhandle {
|
|
6772 | 6774 |
# virtual keys
|
6773 | 6775 |
} elsif ($key eq 'tquery') {
|
6774 | 6776 |
my $ivalue = &tracktags_tqueryurlify($value);
|
6775 | |
if (length($ivalue) > 139) {
|
|
6777 |
if (length($ivalue) >= $linelength) {
|
6776 | 6778 |
print $stdout
|
6777 | 6779 |
"*** custom query is too long (encoded: $ivalue)\n";
|
6778 | 6780 |
return 1;
|