nic0 / tyrs Goto Github PK
View Code? Open in Web Editor NEWTwitter and Identica client using curses
Home Page: http://tyrs.nicosphere.net
Twitter and Identica client using curses
Home Page: http://tyrs.nicosphere.net
It should check for the directory, and ask to create it if it wasn't found.
Message d'erreur renvoyé avec Tyrs v0.1.1.
Installé avec python 2.7.1 ; python-twitter 0.6-1 ; python-oauth2 1.2.0-2
Traceback (most recent call last):
File "./tyrs.py", line 57, in
main()
File "./tyrs.py", line 24, in main
api.authentification(conf)
File "/home/tenshi/tyrs/tyrs/tweets.py", line 12, in authentification
conf.oauth_token_secret)
File "/usr/lib/pymodules/python2.7/twitter.py", line 1299, in init
self._InitializeUserAgent()
File "/usr/lib/pymodules/python2.7/twitter.py", line 1900, in _InitializeUserAgent
self.SetUserAgent(user_agent)
File "/usr/lib/pymodules/python2.7/twitter.py", line 1833, in SetUserAgent
self._request_headers['User-Agent'] = user_agent
TypeError: 'str' object does not support item assignment
zsh: exit 1 ./tyrs.py
Using twitter is open a lot of urls too.
So i think an openurl= o or something like that, should be a great idea.
Cheers.
Traceback (most recent call last):
File "/usr/bin/tyrs", line 12, in
import tyrs.tyrs
File "/usr/lib/python2.7/site-packages/tyrs/tyrs.py", line 14, in
import config
File "/usr/lib/python2.7/site-packages/tyrs/config.py", line 18, in
class Config:
File "/usr/lib/python2.7/site-packages/tyrs/config.py", line 80, in Config
browser = os.environ['BROWSER']
File "/usr/lib/python2.7/UserDict.py", line 23, in getitem
raise KeyError(key)
KeyError: 'BROWSER'
Just after last pull D-:
When you press mention hotkey, you DO get an edit box with the name of the username u want to reply, but when you tweet it, it has no content, only the username...
Bug founded in latest pull
When I hit the clear shortcut, tyrs die with a:
Traceback (most recent call last):
File "/usr/bin/tyrs", line 13, in
tyrs.tyrs.start()
File "/usr/lib/python2.7/site-packages/tyrs/tyrs.py", line 79, in start
curses.wrapper(main)
File "/usr/lib/python2.7/curses/wrapper.py", line 43, in wrapper
return func(stdscr, _args, *_kwds)
File "/usr/lib/python2.7/site-packages/tyrs/tyrs.py", line 51, in main
keybinding.handleKeyBinding()
File "/usr/lib/python2.7/site-packages/tyrs/keyBinding.py", line 203, in handleKeyBinding
self.clear()
File "/usr/lib/python2.7/site-packages/tyrs/keyBinding.py", line 71, in clear
self.ui.clearStatuses()
File "/usr/lib/python2.7/site-packages/tyrs/uiTyrs.py", line 369, in clearStatuses
self.countStatuses()
TypeError: countStatuses() takes exactly 2 arguments (1 given)
Only killing it make it disappear
Just notice that the help screen does not move as you wish, it only open and go down, no matter if you want to move up to read again...
Thanks for the latest features Nicolas, they are awesome!
A warning is raise on empty bold options when the generate file is done, it just should skip this warning.
Traceback (most recent call last):
File "/usr/bin/tyrs", line 13, in
tyrs.tyrs.start()
File "/usr/lib/python2.7/site-packages/tyrs/tyrs.py", line 80, in start
curses.wrapper(main)
File "/usr/lib/python2.7/curses/wrapper.py", line 43, in wrapper
return func(stdscr, _args, *_kwds)
File "/usr/lib/python2.7/site-packages/tyrs/tyrs.py", line 52, in main
keybinding.handleKeyBinding()
File "/usr/lib/python2.7/site-packages/tyrs/keyBinding.py", line 298, in handleKeyBinding
self.userTimeline()
File "/usr/lib/python2.7/site-packages/tyrs/keyBinding.py", line 177, in userTimeline
self.changeBuffer('user')
File "/usr/lib/python2.7/site-packages/tyrs/keyBinding.py", line 209, in changeBuffer
self.ui.displayTimeline()
File "/usr/lib/python2.7/site-packages/tyrs/uiTyrs.py", line 248, in displayTimeline
br = self.displayStatus(self.statuses[self.buffer][i], i)
File "/usr/lib/python2.7/site-packages/tyrs/uiTyrs.py", line 349, in displayStatus
self.displayText(text, panel, status)
File "/usr/lib/python2.7/site-packages/tyrs/uiTyrs.py", line 372, in displayText
if hasattr(status.retweeted_status, 'text')
AttributeError: 'Status' object has no attribute 'retweeted_status'
After last pull... (just about 15 minutes)
Okey, this is kinda bad. Tyrs doesn't update the home TL, but it does update mentions and DM.
Even when pressing 'u' home TL does not get updated. Refresh rate is a 2 minutes and even that stop working...
EDIT: Refresh rate it does work, but when 'u' (or the update keybind) is pressed, the refresh stop working
In Debian I had to also install python-argparse, which you may like to mention in the readme. Thank you.
Ce serait bien que tyrs raccourcisse les urls à la volée lorsqu'on écrit un tweet…
When updating the tweets, it could be nice to let the last selected tweets selected.
Now, when i'm on the last tweet, when I press "u" to update, if there is new tweets, the selected tweets is the last one and we have to remember which tweet we read last.
I update tyrs this morning, and I get an error pressing «?». Plus ^l doesn't seem to work anymore.
Here's the error : (i tried the tyrs and tyrs-git paquet in aur)
[bacardi55@daimadoshi ~]% tyrs (10:53)
Traceback (most recent call last):
File "/usr/bin/tyrs", line 16, in
main()
File "/usr/lib/python2.7/site-packages/tyrs/tyrs.py", line 61, in main
curses.wrapper(init_tyrs)
File "/usr/lib/python2.7/curses/wrapper.py", line 43, in wrapper
return func(stdscr, _args, *_kwds)
File "/usr/lib/python2.7/site-packages/tyrs/tyrs.py", line 69, in init_tyrs
init_thread()
File "/usr/lib/python2.7/site-packages/tyrs/tyrs.py", line 95, in init_thread
init_keys()
File "/usr/lib/python2.7/site-packages/tyrs/tyrs.py", line 100, in init_keys
Keys().handleKeyBinding()
File "/usr/lib/python2.7/site-packages/tyrs/keys.py", line 124, in handleKeyBinding
Help()
File "/usr/lib/python2.7/site-packages/tyrs/help.py", line 28, in init
self.display_help_screen()
File "/usr/lib/python2.7/site-packages/tyrs/help.py", line 37, in display_help_screen
self.display_help_item('up', _('Moves up'))
File "/usr/lib/python2.7/site-packages/tyrs/help.py", line 98, in display_help_item
scr.addstr(self.y, self.col[2], description, color)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 1: ordinal not in range(128)
Could it be possible to implement page up/down ? to scroll more quickly ?
thanks again! :)
When going thought timelines, if a buffer is empty, there is a freeze for a moment.
It might raise an exception on this options.
Enable to go back on top of the tweet list (or botom).
Probably with 'G' and 'g' shortcut to stay with a vim-link style shortcut.
Accents in tweet box get showed, but when you delete one accented character it goes like:
http://img828.imageshack.us/i/tyrs.png/
Also, if you start deleting characters in the tweet box, when there is nothing more you push delete once and this happen:
http://img191.imageshack.us/i/tyrs2.png/
Don't know anything about programming, but guess the second problem is about the tweetbox rutine ending in an unexpected way (must be something with keybindings)
Guess there is only one thing that make tyrs in an almost-done twitter client. A replies manager.
Something that can tell apart a tweet that has a mention and be capable of replying it. Like the DM feature request, a keybindig that shows you your mentions an another one to reply them. Kinda hard to understand, but would be great something like ttytter (http://www.floodgap.com/software/ttytter/) that show you in a different color the mentions.
When writting a tweet, if the timeline is updated on the same time, it will desappeare, but still have the keybord focus.
I'll fixe this as soon as possible.
It could be nice to have some autocompletion for nicks.
When creating an identi.ca account, several strings still refers to twitter :
Which service do you want to use?
Your choice? > 2
Which root url do you want? (leave blank for default value, https://identi.ca/api)
Your choice? >
Requesting temp token from Twitter
Please visit this Twitter page and retrieve the pincode to be used
in the next step to obtaining an Authentication Token:
Take a look, accents aren't supported :-(
http://img12.imageshack.us/i/tyrs.png/ (This is sakura terminal)
I have a little problem with "<" and ">" symbol at this time.
There is a screenshot.
http://upload.socketubs.net/screenshots/2011-06-10-005513_694x48_scrot.png
Thanks !
Since the new version (updated today).
When i update my timeline (u) after cleaing it (c), the old tweet are displayed again
Hi there,
thanks for this great app!
I came across Tyrs today and I liked the idea of microblogging from my linux console.
The problem is I can't read or write in Greek inside Tyrs. I saw that it has UTF-8 support, but something is probably wrong with it. I tested both the github and the OBS version and greek characters appear like this:
ParaskevasB (01:00) ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ M-NQM-NM--M-OGM-ODM-NM--M-ODMM-OFM-NM-/M-M-ODM-ODM-NMM-NM-8M-NM--MM-ODM-NMM-NM-5M-OGM-NM-8MM-NM-#M-NM-1M-NM-OGM-NM-,M-M-ODM-NM-1-OCM-
NMM-NM-3M-NM-5M-NM-M-O[email protected]'M-OAM-M-O~@M-NM-?M-OCM-OM-O~@m-oAM-OIM-NM-8M-OEMM-NM-<M-NM-1M-OBOAM-NM-3M-NM-,M-OAM-NM-1
Any ideas?
Try this:
When an edit box is closed with no content, the background buffer dissapear, it reappear when you press a key.
It only happens when the edit box has no content.
Running tyrs after installation shows a menu to select Twitter/Identi.ca services, but after displaying menu, a UnicodeEncodeError throws. Traceback:
Traceback (most recent call last):
File "./tyrs", line 16, in <module>
main()
File "/usr/lib/python2.7/site-packages/tyrs/tyrs.py", line 61, in main
init_conf()
File "/usr/lib/python2.7/site-packages/tyrs/tyrs.py", line 73, in init_conf
conf = config.Config(arguments())
File "/usr/lib/python2.7/site-packages/tyrs/config.py", line 47, in __init__
self.new_account()
File "/usr/lib/python2.7/site-packages/tyrs/config.py", line 115, in new_account
choice = self.ask_service()
File "/usr/lib/python2.7/site-packages/tyrs/config.py", line 124, in ask_service
choice = raw_input(_('Your choice? > '))
UnicodeEncodeError: 'ascii' codec can't encode character u'\xbf' in position 0: ordinal not in range(128)
If in the bold list configuration we put a wrong params, it should be ignore, and not fail as it does now.
jasonwryan a écrit :
It isn't possible to use other modifiers in the keys map, eg, Ctrl-r,
or am I doing it wrong?
I'll try find something about that soon.
When I'm tweeting, if there is an update, the tweets behind disappear, they should stay.
I get a hard traceback on addstr() when window becomes to small. I use a tiling windowmanager
and like to move around my terminals. One idea would be to temporarily suspend output.
File "/usr/bin/tyrs", line 12, in
import tyrs.tyrs
File "/usr/lib/python2.7/site-packages/tyrs/tyrs.py", line 34, in
conf = config.Config(arguments())
File "/usr/lib/python2.7/site-packages/tyrs/config.py", line 99, in init
self.parseConfig()
File "/usr/lib/python2.7/site-packages/tyrs/config.py", line 219, in parseConfig
elif self.browser != '':
AttributeError: Config instance has no attribute 'browser'
Traceback (most recent call last):
File "/usr/bin/tyrs", line 13, in
tyrs.tyrs.start()
File "/usr/lib/python2.7/site-packages/tyrs/tyrs.py", line 80, in start
curses.wrapper(main)
File "/usr/lib/python2.7/curses/wrapper.py", line 43, in wrapper
return func(stdscr, _args, *_kwds)
File "/usr/lib/python2.7/site-packages/tyrs/tyrs.py", line 52, in main
keybinding.handleKeyBinding()
File "/usr/lib/python2.7/site-packages/tyrs/keyBinding.py", line 246, in handleKeyBinding
self.changeBuffer('direct')
File "/usr/lib/python2.7/site-packages/tyrs/keyBinding.py", line 169, in changeBuffer
self.ui.displayTimeline()
File "/usr/lib/python2.7/site-packages/tyrs/uiTyrs.py", line 202, in displayTimeline
br = self.displayStatus(self.statuses[self.buffer][i], i)
File "/usr/lib/python2.7/site-packages/tyrs/uiTyrs.py", line 252, in displayStatus
header = self.getHeader(status)
File "/usr/lib/python2.7/site-packages/tyrs/uiTyrs.py", line 356, in getHeader
time = self.getTime(status)
File "/usr/lib/python2.7/site-packages/tyrs/uiTyrs.py", line 341, in getTime
hour = status.GetRelativeCreatedAt()
AttributeError: 'DirectMessage' object has no attribute 'GetRelativeCreatedAt'
When trying to get DM's.
Something broke tyrs ins't it?
Suddenly and with no explication:
The idea is to enable a parser to generate a default config file from command line, with most aviable options.
command:
tyrs --generate-config filename
(or with -g shortcut)
It should be a nice way to get started on the config file.
Looking at my TL saw a couple or so of tweets that were great, i RT'd them but then i thought... They deserve to be faved... And then I realize... Tyrs doesn't fav!
What do you think Nicolas?
Recent tyrs from git, using twitter.
Traceback (most recent call last):
File "/usr/bin/tyrs", line 16, in
main()
File "/usr/lib/python2.7/site-packages/tyrs/tyrs.py", line 61, in main
curses.wrapper(init_tyrs)
File "/usr/lib/python2.7/curses/wrapper.py", line 43, in wrapper
return func(stdscr, _args, *_kwds)
File "/usr/lib/python2.7/site-packages/tyrs/tyrs.py", line 69, in init_tyrs
init_thread()
File "/usr/lib/python2.7/site-packages/tyrs/tyrs.py", line 95, in init_thread
init_keys()
File "/usr/lib/python2.7/site-packages/tyrs/tyrs.py", line 100, in init_keys
Keys().handleKeyBinding()
File "/usr/lib/python2.7/site-packages/tyrs/keys.py", line 115, in handleKeyBinding
self.api.find_public_timeline()
File "/usr/lib/python2.7/site-packages/tyrs/tweets.py", line 217, in find_public_timeline
self.change_search_user(nick)
File "/usr/lib/python2.7/site-packages/tyrs/tweets.py", line 222, in change_search_user
self.interface.empty_dict('user')
AttributeError: 'Interface' object has no attribute 'empty_dict'
I guess i am something like a beta tester now, I pull commits when you push them and well, here is a feedback.
Remember the rt idea? Well, it works very well but something is missing:
http://img834.imageshack.us/i/tyrs.png/
Now tyrs is capable of edit a RT, but the @ is missing, and ncurses doesn't allow to move the cursor to the left of the username (to add the @).
Think this could be automatic when editing a RT?
PS: Sorry for the bad english.
PS2: Sorry for being a pain in the ass, but really like this project and want to see it shine among others text-based twitter clients.
Hi.
At first thanks again for the openurl option.
But , there is always a but:
I think the browser choice should be configured in the $HOME/.config/tyrs/$CONFIGFILE, or use the global $BROWSER variable.
Why ? :
-The user have the choice.
-I want to use tyrs with elinks/lynx/w3m/links/etc... when i'm using it in dvtm/tmux/screen , by example.
-I 'm using another browser than firefox : jumanji/luakit/chromium/etc...
Well just a new idea. Tell me what you think.
Just pulled latest commits and:
Traceback (most recent call last):
File "/usr/bin/tyrs", line 13, in
tyrs.tyrs.main()
TypeError: main() takes exactly 1 argument (0 given)
There should be two types of RT
Just a suggestion, it would be nice.
it's impossible to scroll the timeline above the last tweet displayed on screen.
Well, sometimes this happens:
http://img96.imageshack.us/i/tyrs.png/
And other times, words get all messed up (don't have a example image, sorry)
You know, now that tyrs can look at your mentions and all that, guess there could be tabs [one for TL, one for mentions and other for DM (when it get implemented)] that get colored when there is activity in them. I mean, when you got new mentions, the "mentions" tab change it's colors.
A picture it's more valuable that a thousand words, so:
http://img535.imageshack.us/i/tyrs.png/
Thanks for taking time to do all this! Tyrs is getting better and better!
Sometime it does not retrieve tweets properly (confirm by bacardi55)
Was using tyrs and then BAM: I noticed i tagged the wrong person in a RT.
It would be great to delete my own tweets in tyrs, it is a long way into the web to delete a tweet (well no, but i'm a lazy ass)
Don't wanna be such a unpleased bastard but... What about DM?
Guess it would be nice to have some kind of keybind to look at the inbox (just to say, with a red background) and have another keybind to reply them in another DM...
What a great work you have here!
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.