oysttyer / oysttyer Goto Github PK
View Code? Open in Web Editor NEWAn interactive console text-based command-line Twitter client written in Perl
License: Other
An interactive console text-based command-line Twitter client written in Perl
License: Other
Right now, retweets have a leading %
, and replies have a leading @
, prepended to the tweeter's username.
It would be nice if the default handler prepended a character (maybe ↑
?) to quoted tweets, in the same fashion.
Maybe.
As per Twitters announcement that it's now possible to include up to four images with a tweet.
I can't find any mention of this in the API documentation though.
Hello,
I've just cloned oysttyer but I can't run it. I have:
/usr/bin/env: perl -s: No such file or directory
Any hint?
I don't think it is possible to created quoted tweets via the API? If it is that could be handled as a separate issue. Oh, actually, you can, you just include the link at the end of the status, so actually should be able to do that manually at the moment
Creating a new issue for this, distinct from issue #3 because I personally don't care about about supporting multiple images, but the the quoted tweet thing was starting to bug me.
For starters I'll create a new branch and use the gist from @justarobert as a basis. Then it's free if I or anyone else wants to improve on it.
Brain dump of thoughts:
/dump
didn't display them, but I now realise /dump
probably isn't displaying all fields/fulldump
command (or extension that implements this, if possible?)People sometimes RT politicians tweets from years ago (usually when they espoused an opinion that would embarrass them today), but the timestamp oysttyer shows is of when the RT happened. Quoted tweets show the original time. So could you make native RTs show the time of the original tweet?
Examples:
Native RTs:
r5> [2016-02-06 20:42:45] (x887) <%NewtonMark> RT @CeltThulu: User: pls fix abuse\nTwitter: favs are likes now\nUser: k but abuse?\nTwitter: tweets pop out now\nUser: abuse???\nTwitter: ALGORITHMIC TIMELINE
(tweet actually from 10:29am)
r8> [2016-02-06 20:59:27] (x7765) <%NewtonMark> RT @actioncookbook: USERS: you're alienating the people who actually use your product\nTWITTER: likes are now florps\nUSERS: what\nTWITTER: timeline goes sideways
(tweet actually from January 6)
Quoted tweet (that was then natively RTed):
s0> [2016-02-06 21:05:31] (x11) <"%NewtonMark> RT @botandy: new algorithm based timeline https://twitter.com/TheAmyRios/status/694250227209936896
s1> [2016-02-02 4:05:27] (x448) <↑+TheAmyRios> Write the saddest story you can using only 4 words
(tweet shows correct time)
Would be nice to have alternating color, possibly two colors for tracking and two other for regular feed. This would make everything more readable, as one could easily distinguish where tweet start and end at a glance inside block of updates (which are all in one color atm).
Pseudo-Example
[red] g1> <%searched_guy> [/red]
[orange] g2> <%searched_guy> [/orange]
[blue] a1> <%rnd_guy> [/blue]
[cyan] a2> <%rnd_guy> [/cyan]
BUG?
I'm checking all the DM's with below command from script.
~./TTYtter.pl -runcommand="/dmagain +30" -verbose -keyf=key.txt -rc=rc.txt > out.txt
Thought -runcommand implies -script option, but i don't see DM IDs in the output but display codes. So I can't delete the spam DM's automatically.
out.txt:
[DM db5][Mummy/Fri Jul 03 12:21:08 +0000 2015] bla bla bla...
[DM db6][Barack_Obama/Fri Jul 03 12:21:13 +0000 2015] yes we can...
also the timestamp is not good to handle....
better like this:
2015.12.09 16:31:55 {dm,555555555555555555} @Barack_Obama yes we can...
Not sure if i'm doing something wrong, but when i have set newline => 1
and try to tweet sth like blabla \n this should be on a new line
, the tweet contains the \n
string instead of an actual new line character.
Assuming Floodgap give us permission. Move the docs over to her under github-pages (or Wiki, but likely easier under Github pages).
Hi there,
Little feature request:
I've started using the -newline
option to get rid of \n
in my timeline. However, I personally find that using actual newlines in the output kinda breaks the flow of text.
I have noticed the code always replaces \\n
with \n
around here:
if ($newline) {
$x =~ s/\\n/\n/sg;
$x =~ s/\\r//sg;
}
It would be great if there was a configurable way of replacing newlines with some other character or string, e.g. a space. Or a carriage return sign ␍
. Or a space-dash-space -
. Or a paragraph sign ¶
§
. Or whatever. This would allow me to keep the text compact, separate URLs with a newline just after them, and notice where the author intended to put a newline.
I recently switched from ttytter and have noticed the appearance of sponsored tweets in my timeline along with the change.
I am guessing twitter is just delivering these like any other tweet, but I never got them in ttytter -- any way we can undo that, uh .. "feature"?
Running a new installation, when hitting Enter after the Welcome text I get:
Request from https://api.twitter.com/oauth/request_token ...... FAILED!: ""
unable to fetch token. here are some possible reasons:
My clock's OK. What can I do about the other possibilities?
Let's assume you receive a DM longer than 140 characters. Right now it displays in full in streaming mode. So far, so good.
But, it you shut down oysttyer and start it up again, the two (by default) last DMs are shown... and those two are not expanded over 140 chars. They will show a URL to log in to twitter and see the entire message.
See issue #6. Should actually be really straightforward to do this.
Could do with thinking about whether to extend the current thread support to include quoted tweets. As as far as I'm aware quoted tweets don't include the in_reply_to_status_id so won't be threaded currently.
I don't use the Twitter website very often (obviously), but I think that only displays one quoted tweet and you have to click through for the rest.
Might be nice to have the option to loop through nested quotations, etc as part of the thread command.
Related to #6.
And it has always been this way. Not even sure if it is possible to destroy
them, need to look into what info the API actually sends.
The existing destroy_all_tco
sub routine is explicitly set-up for the Tweet
json structure so a fix isn't quite as simple as hooking into that.
Low priority. Can't really assess whether this is easy or hard until I've
checked the API docs.
Somehow, readline is broken when upgrading from floodgap's to 2.2.2.
The old ttytter used to show this during startup:
-- readline using Term::ReadLine::TTYtter
But now:
-- readline using Term::ReadLine::Stub
This is more a question for @classilla than a bug in oysttyer...
I'm slightly annoyed by a lack of functionality in T:RL:T; namely, when pressing the "end" key, the cursor won't jump to the end of the line.
This is weird, because pressing "home" will jump to the beggining of the line, and pressing Ctrl+E
will jump to the end.
So, where should I report a bug in T:RL:T?? Are there any plans to turn T:RL:TTYtter into T:RL:oysttyer?
From this request: https://twitter.com/blion_tec/statuses/672611366826455040
And also, I have thought about adding this functionality for awhile. It's going to be technically feasible, with the curl $baseagent
at least, but I'm not sure how the "UI" will work, i.e. how to pass the path to the image, etc.
Probably a longer-term one to think about.
We've* been given the provisional go-ahead from Cameron Kaiser for becoming the official fork and maintained replacement to TTYtter, but one of the conditions is adopting a new name.
Some ideas we have:
Please add any others you can think of as comments. We'll give it a week or so for ideas and then try to pick one we all agree on. And then I'll be able to change this from a personal repo to a community based one.
* "We" as in anyone who is interested.
Working on this this weekend.
That's bugged me forever. Pull request incoming.
Could be a none issue?
Must be due to these lines of code and according to the linked streaming API docs for public stream messages:
Blank lines
On slow streams, some messages may be blank lines which serve as "keep-alive" signals to prevent clients and other network infrastructure from assuming the stream has stalled and closing the connection.
So perhaps it's just that? Not sure why this is a new thing though?
If it is this, then perhaps TTYtter should hide these keep-alives?
Seeing as how that is now a thing. Although:
See:
also possibly related, see the thread on this tweet:
I typically don't use any form of desktop (framebuffer all the way!) so I might
not be able to check this one out.
Reading #49 reminded me that the default image URLs are resized versions, and the original can be accessed by appending :large to the URL. I often use OS X Terminal's quick look, which means I can't easily append it manually (unlike if I'd right-clicked opened in a browser).
As per this announcement.
So I guess we want some way to say something like /dm a1 @someone Look at this tweet
where a1 is the reference to the tweet.
So I try to RT something this morning and the following error message pops up:
*** warning: server error message received
*** "Application cannot perform write actions. Contact Twitter Platform Operations through https://support.twitter.com/forms/platform"
Has there been any problem with the oysttyer API key?
Hi,
when using the /thread command, any URLs featured in quoted tweets aren't expanded. they show as t.co links. (but the URL to the quoted tweet is shown in full)
how it appears in feed:
p0> [ 2:50:41] <"reportedly> Another look at the bus fire in Yinchuan, China: https://twitter.com/PDChina/status/684187174313586688
p1> [ 2:38:28] (x17) <↑PDChina> #Breaking Moving bus caught fire on road in NW #China's Ningxia on Tue morning, causing 14 de ad & 32 wounded https://pbs.twimg.com/tweet_video_thumb/CX64TSVWAAArYou.png
how it appears when viewing via /thread
oysttyer> /th p0 <007
zz0> [ 2:38:28] (x17) <PDChina> #Breaking Moving bus caught fire on road in NW #China's Ningxia on Tue morning, causing 14 dead & 32 wounded https://t.co/GbdYGfyzvT
zz1> [ 2:50:41] <"reportedly> Another look at the bus fire in Yinchuan, China: https://twitter.com/PDChina/status/684187174313586688
This behavior seen on 2.6.0.
Long shot I know, but occassionaly (I cant seem to find a good repro case) the TTYtter (streaming buffer thread)
thread becomes detached from it's parent so trying to send/fetch new tweets hangs. You have to exit, then kill off the dangling processes and then restart. Running in superverbose didn't yield anything informative that I could tell
Possibly related to #8 ?
Not a lot of info about this. See:
I have NO CLUE about this at the moment, but it's not due to the changes I've made, it's been there since 2.1.0.
As reported here.
Needs investigation. Unconfirmed.
TTYtter should be able to visit https://github.com/atomicules/TTYtter/releases (or use the github API) to check if the running version is the latest version available, in a similar fashion floodgap's TTYtter was doing.
References line 5162
No sure what this one is on about. Not seeing it myself either.
In floodgap's ttytter, $tweet->{'geo'}->{'coordinates'}
used to be a two-dimensional array which contained latitude and longitude (or undef
).
In 2.2.2, $tweet->{'geo'}->{'coordinates'}
is an empty array.
This is making my multigeo extension to fail, and is making me sad.
SUGGESTION:
the code below woks fine for me. Maybe not a big deal for you to build in next revision
$muteurl ||= "${apibase}/mutes/users/create.json";
$unmuteurl ||= "${apibase}/mutes/users/destroy.json";
...
...
if (m#^/(mute|unmute) \@?([^\s/]+)$#) {
my $m = $1;
my $u = lc($2);
if ($m eq 'mute') {
$answer = lc(&linein(
"-- sure you want to mute $u? (only y or Y is affirmative):"));
if ($answer ne 'y') {
print $stdout "-- ok, $u is NOT muted.\n";
return 0;
}
}
&muteuser($u, 1,
(($m eq 'mute') ? $muteurl : $unmuteurl),
(($m eq 'mute') ? 'started' : 'stopped'));
return 0;
}
...
...
...
sub muteuser {
my $uname = shift;
my $interactive = shift;
my $basef = shift;
my $verb = shift;
my ($en, $em) = ¢ral_cd_dispatch("screen_name=$uname",
$interactive, $basef);
print $stdout "-- ok, you have $verb muted user $uname.\n"
if ($interactive && !$en);
return 0;
}
...
...
...
...
So, I'm not even sure this is an issue, it may be just my stupidity (if so, consider this issue a call for help, thanks).
Lately both oysttyer and old ttytter inform me on startup that they're using ReadLine::Stub and the consequence is (I presume) that I can't use the character counter, cannot move in the text while composing a tweet (e.g. "left" key inserts ^[[C
instead) and so on. As my perl-fu is below zero, may I ask what to do with this?
might-be-useful info:
perl --version
This is perl 5, version 18, subversion 2 (v5.18.2) built for x86_64-linux-gnu-thread-multi
(with 41 registered patches, see perl -V for more detail)
Do we want mailing lists, IRC channels, a website, etc?
I've given @funnelfiasco and @IvanSanchez owner access as I've had most communication with them and so "trust" them, so to speak. They will be free to set others as owners of course. This shouldn't just be owned by me.
And then I'm trying to add as members those who have shown interest or written plugins for TTYtter in the past. So far @edison23 @tjharman @colindean @pr4wn.
Currently the behaviour of command /th
is that it'll show all tweets ((preceeding in time) && (in the thread)) of the tweet the command /th
is invoked on. (sorry for such horrible german-ish sentence, I had to use brackets to make sure it's readable only one way xD)
This means that if /th
invoked on the first tweet of the thread, only the tweet itself is shown.
Now, when I open the same tweet on twitter web, I can see the whole thread (obviously). So, my question is - is this an API limitation, or would it be possible to implement showing of the whole thread as web interface does?
(One nicely threaded tweet for reference: https://twitter.com/sinigaidd/status/690252962069921792)
This is a feature idea that has been in my mind for quite a while, but I think it's non-trivial.
Whenever I'm following some real-time event, or whenever I post something exceedingly popular, half my screen fills up with the same RT, duplicated over and over again.
It would be nice if "nearby RTs" could be collapsed. Something like "if I've seen this particular tweet in the last 30 minutes, do not show it more than once every 5 minutes", and maybe put more emphasis on the RT count.
Right now, when a DM is sent to another person, it goes like this:
oysttyer> /dm somebodyelse Foobar
[DM da2][RealIvanSanchez/2015-12-04 13:55:39] Foobar
So it's pretty hard to see who I just sent the DM to. Instead, this would be preferred:
[DM da2][→somebodyelse/2015-12-04 13:55:39] Foobar
Or even
[DM da2][RealIvanSanchez→somebodyelse/2015-12-04 13:55:39] Foobar
Or something like that.
This is a feature request. Could there be an option to allow quoted tweets to be appended after the original tweet?
Before:
e3> [21:10] <(listname)"%tweeter1> Original tweet. https://twitter.com/tweeter2/status/123456789012345678
e4> [20:53] (x2) <↑tweeter2> Quoted tweet
After:
e3> [21:10] <(listname)"%tweeter1> Original tweet. [<↑tweeter2> Quoted tweet]
I just noticed that if a search returns a tweet which quotes another, the quoted tweet will be white and not blue (note the "
and ↑
symbols at both):
It would be nice to have the same colour in both. Same goes for replies. Even for tweets quoted from a DM.
(This falls into the "not really important features" bin, I think, so no hurries)
Is this as simple as /replyall (Once the >140 char #5 is done, of course)?
Is there a way to add blank lines in–between tweets for better readability? As of now oysttyer is pretty cluttered, as far as i'm concerned..
(And perhaps long tweets should that ever become a thing 😨 )
This is split out from #5. Plan is still to look at Texapp and see if they've done anything of use we could use.
I've noticed that tweets with video in them link to the thumbnail. Maybe it would be nice replacing the link with a link to the actual video?
For reference, the thumbnail url looks like: https://pbs.twimg.com/tweet_video_thumb/<id>.png
and the corresponding video is: https://pbs.twimg.com/tweet_video/<id>.mp4
As for downsides, people without mp4 playback support in their browsers won't be able to see the video play, whereas before they'd at least be able to see the thumbnail.
Whereas /dump
of the same tweet's menu code does destroy tco.
Stumbled across this when working on destroy_all_tco
. It has always behaved this way. I'm not sure if this is intended/correct behaviour or not. In someways it is nice to be able to use this behaviour to see what the text was before detco so I'm not necessarily going to "fix" this, but I would like to understand why it behaves this way.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.