Code Monkey home page Code Monkey logo

rainbowstream's Introduction

Rainbow Stream

http://img.shields.io/pypi/l/rainbowstream.svg?style=flat-square http://img.shields.io/pypi/v/rainbowstream.svg?style=flat-square

Terminal-based full-fledged Twitter client, built upon Python Twitter Tools.

Showcase

gif

Installation

Direct installation

sudo pip3 install rainbowstream

Virtualenv (Recommended)

virtualenv -p /usr/bin/python3 venv
source venv/bin/activate
pip install rainbowstream

Installation Troubleshooting

If you run into dependency issues, you may want to install additional libraries

Debian-based distros:

sudo apt-get install python-dev libjpeg-dev libfreetype6 libfreetype6-dev zlib1g-dev

CentOS:

sudo yum install python-devel libjpeg-devel

Mac OSX Mac has a clang unknown argument problem with the Pillow package—a dependency of this app. Please see the workaround in Issue #10

export ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future

If you still experience issues:

  • sudo pip uninstall rainbowstream
  • Use the virtualenv installation
  • Create an issue and provide:
    • Your OS
    • Your Python version

Usage

The Stream

Simply run rainbowstream to start the application, or enjoy its ASCII images with rainbowstream -iot or set IMAGE_ON_TERM to True in your config.

If your terminal supports 24-bit colors, run rainbowstream -p24 instead to utilize 24 bit ASCII images.

If your terminal supports sixel, ie. wezterm or MLTerm, change the IMAGE_ON_TERM config to sixel and enjoy high-quality images.

You might want to change IMAGE_SHIFT to set the image's margin (relative to your terminal's width), and IMAGE_MAX_HEIGHT to control the max height of every image (see Config Management).

You will be asked for Twitter authorization the first time you run Rainbow Stream. Just click the "Authorize access" button, paste the PIN to the terminal, and the application will start.

You might want to use Rainbow Stream with an HTTP/SOCKS proxy. Proxy settings are specified as follows:

rainbowstream --proxy-host localhost --proxy-port 1337 --proxy-type HTTP
# or the short form:
rainbowstream -ph localhost -pp 1337 -pt HTTP

Both --proxy-port and --proxy-type are optional. The default proxy port is 8080 and the default proxy type is SOCKS5.

Interactive Mode

While your stream is continued, you are also ready to tweet, search, reply, retweet, etc. directly from your console. Simply type h and hit the Enter key to see the help.

Input is in interactive mode. It means that you can use the arrow keys to move up and down through the history, tab-autocomplete, or double-tab to view available suggestions. Input history from the previous run is also available.

Read the docs for available commands.

Theme Customization

Rainbow Stream is shipped with some default themes. You can switch themes with the theme command. You can also customize themes as you please.

Theme screenshots:

  • Monokai
monokai
  • Solarized
solarized
  • Tomorrow Night
tomorrownight
  • Larapaste
larapaste

See Theme Usage and Customization for detailed information.

A Note about Twitter API Change

Since Twitter discontinued supporting Stream API, RainbowStream is now using a [Polling Strategy](#271) that utilizes the home command to poll for your tweets every 90 seconds. This home command is rate limited by 15 times per 15 minutes, so don't run it too frequently to leave space for the polling stream.

Bug and Feature Requests

Found a bug or a feature request? Please create an issue or contact me at @orakaro.

Development

If you want to build a runnable version yourself, follow these simple steps:

  • Create your Twitter Application

  • Get your Twitter application’s API key and secret

  • Create your own Pocket Application (platform: Web)

  • Get your Pocket application’s key

  • Fork this repo and git clone it

  • Create a consumer.py file in the rainbowstream directory containing:

    # Consumer information
    CONSUMER_KEY = 'APIKey' # Your Twitter application's API key
    CONSUMER_SECRET = 'APISecret' # Your Twitter application's API secret
    PCKT_CONSUMER_KEY = 'PocketAPIKey' # Your Pocket application's API key
  • Use pip to install it locally

    # cd to directory which contains setup.py (cloned directory)
    virtualenv venv # Python3 users: use -p to specify python3
    source venv/bin/activate
    pip install -e .
    which rainbowstream # /this-directory/venv/bin/rainbowstream
    # Remove ~/.rainbow_oauth if it exists
    rainbowstream # local version of rainbowstream

Contributing

I appreciate any help and support. Feel free to fork and create a pull request.

License

Rainbow Stream is released under an MIT License. See LICENSE.txt for details.

rainbowstream's People

Contributors

b3yond avatar bartj3 avatar bnrubin avatar bogwonch avatar come-maiz avatar dtvd avatar ellisonleao avatar ericsagnes avatar execjosh avatar frasertweedale avatar greenzapdos avatar jorick avatar koobs avatar lertsenem avatar maxymoos avatar melroy89 avatar motatoes avatar orakaro avatar peterjschroeder avatar polarkac avatar poyynt avatar rc0r avatar richluna avatar roskoff avatar tak-mk avatar tenzer avatar thameera avatar timgates42 avatar ybenjo avatar yhdesai avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rainbowstream's Issues

Multiple accounts support

Hi, there!

First of all, thanks for your work, Rainbowstream looks great and very mature!

But I have one serious question, is there built-in ability to work with multiple twitter accounts for same logged-in user? Like:

  • rainbowstream opens default Twitter account stream
  • rainbowstream -C ~/.rainbow_oauth_additional opens additional Twitter acount stream

Or my only option is to create another user in system and open rainbowstream from it?

Does it work on Windows ?

Win8.1, Python 2.7.8

When running it , i get the following error

Traceback (most recent call last):
File "C:\python2\Scripts\rainbowstream-script.py", line 5, in
from pkg_resources import load_entry_point
File "C:\python2\lib\site-packages\setuptools-0.6c11-py2.7.egg\pkg_resources.py", line 2603, in
File "C:\python2\lib\site-packages\setuptools-0.6c11-py2.7.egg\pkg_resources.py", line 666, in require
File "C:\python2\lib\site-packages\setuptools-0.6c11-py2.7.egg\pkg_resources.py", line 565, in resolve
DistributionNotFound: Pillow

If i try to manually install pillow i get

pip install pillow
Requirement already satisfied (use --upgrade to upgrade): pillow in c:\python2\lib\site-packages
Cleaning up...

Rainbowstream uses 100% CPU

With the release of 0.6.2 of Rainbostream the CPU is now pegged at 100% while running on my machine. Not entirely sure what's going on but it appears there's a lot of polling going on.

RTL Support

Currently right-to-left text (Arabic & Hebrew) does not appear correctly in the stream. Letters are separated and appear in reverse order.

Any possible solution?

Display Issues from Multiplexer

I am currently facing an issue entering and displaying text from the main prompt of rainbowstream, as illustrated in the image I have provided below.

Image

To further explain, in this particular case, I have been utlizing a recently downloaded copy of rainbowstream from version 1.8-5 of tmux, used on version 3.6.2 of the GNOME Terminal Emulator on Ubuntu 14.04.1. When composing a tweet, for example, entering a long string of text will result in typing over a line of text that already exists. In addition, resizing a panel containing rainbowstream will also result in the occurence of the behavior shown in the above embedded image. The resizing issue will also escalate further, if you decide to search through your prompt history, using the arrow keys, which will sometimes leave the cursor in a position where little to no text is being displayed adjacent to it.

If you have any questions in regards to this bug I've been experiencing, please let me know.

Character count

It would be cool to have some kind of character count display and update while using t, rep, mes and q.

I might implement this feature myself though and submit a PR.

IOError: [Errno 2] No such file or directory: '/home/elliot/.rainbow_config.json'

I installed rainbowstream on my (Linux) system using pip, typed "rainbowstream" and got the above error.

Issuing "touch /home/elliot/.rainbow_config.json" to create the (empty) file fixed it, and got me to the oauth token registration page.

After the oauth, I still get "Your ~/.rainbow_config.json is messed up:" but at least it runs. Perhaps there is a template version of the configs that I'm missing? I can't find anything about this in the README.

(Doh. Found docs at https://github.com/DTVD/rainbowstream/blob/master/theme.md, but only after some digging that wasn't related to the config directly.)

Anyway, maybe a default config file and a writeup about it in the readme would help other folks get off on the right foot.

pip3 install is missing dependencies

$ sudo pip3 install rainbowstream
Successfully installed rainbowstream python-dateutil requests pyfiglet SQLAlchemy twitter Pillow six
Cleaning up...

$ rainbowstream
It seems that ~/.rainbow_config.json has wrong format :(
Traceback (most recent call last):
  File "/usr/lib64/python3.3/site-packages/rainbowstream/py3patch.py", line 14, in <module>
    from HTMLParser import HTMLParser
ImportError: No module named 'HTMLParser'

$ sudo pip3 install HTMLParser 
Successfully installed HTMLParser
$ rainbowstream
It seems that ~/.rainbow_config.json has wrong format :(
Traceback (most recent call last):
  File "/usr/lib64/python3.3/site-packages/rainbowstream/py3patch.py", line 14, in <module>
    from HTMLParser import HTMLParser
  File "/usr/lib64/python3.3/site-packages/HTMLParser.py", line 11, in <module>
    import markupbase
ImportError: No module named 'markupbase'

$ fuuuuuuuuuuuuuuuu

Search (without hashtag)

Would it be possible to search on something other than a hashtag? In my experience, when searching WITHOUT a hashtag, hashtag results are also returned, so I tend to search for a string and appreciate that Twitter gives me both 'string' and '#string'.

Also, do you plan on implementing some sort of search/follow of keywords? I'm moving from ttytter to rainbowstream and miss the fact that I could load up ttytter with a list of strings I am interested in finding.

Weird Font-Character Issues

Lots of characters aren't showing up correctly in my terminal font. Screenshot:
bad_fonts_rainbowstream

I'm using powerline, so my current terminal font is the Powerline-patched Ubuntu Mono, but switching my terminal to the normal Ubuntu Mono results in the same issue. I've also tried Liberation Mono and Free Mono with the same results.

My OS is Ubuntu 14.04.

Open command error

Hi,
I installed Python and Pip from command line on Linux Mint 17 Cinnamon. So they should be latest versions. Everything seemed to work ok except opening a link. First it opened two tabs on my browser (Firefox) so I added command "rainbow stream -iot". After that one i got error notice (process:19497): GLib-CRITICAL *: g_slice_set_config: assertion 'sys_page_size == 0' failed but now it opened only one tab like i wanted. I wanted to try do i get picture open in terminal so I added command "rainbowstream --image-on-term" and errors continued. Now when I tried I got following error: (process:21674): GLib-CRITICAL *: g_slice_set_config: assertion 'sys_page_size == 0' failed

Here is image also. Error is around centre of pic.

screenshot from 2014-08-11 09 29 02

I hope these ones help. If you find out I messed up something I will be most happy to get help fixing the problem :)

clang: error: unknown argument: '-mno-fused-madd'

STU600504M01:~ brunopgalvao$ sudo pip install rainbowstream
Password:
sudo: pip: command not found
STU600504M01:~ brunopgalvao$ brew install pip
Error: No available formula for pip
Homebrew provides pip via: brew install python. However you will then
have two Pythons installed on your Mac, so alternatively you can:
sudo easy_install pip
STU600504M01:~ brunopgalvao$ sudo easy_install pip
Searching for pip
Reading http://pypi.python.org/simple/pip/
Best match: pip 1.5.6
Downloading https://pypi.python.org/packages/source/p/pip/pip-1.5.6.tar.gz#md5=01026f87978932060cc86c1dc527903e
Processing pip-1.5.6.tar.gz
Running pip-1.5.6/setup.py -q bdist_egg --dist-dir /tmp/easy_install-Z3kg9w/pip-1.5.6/egg-dist-tmp-ujV2xj
warning: no files found matching 'pip/cacert.pem'
warning: no files found matching '.html' under directory 'docs'
warning: no previously-included files matching '
.rst' found under directory 'docs/_build'
no previously-included directories found matching 'docs/_build/_sources'
Adding pip 1.5.6 to easy-install.pth file
Installing pip script to /usr/local/bin
Installing pip2.7 script to /usr/local/bin
Installing pip2 script to /usr/local/bin

Installed /Library/Python/2.7/site-packages/pip-1.5.6-py2.7.egg
Processing dependencies for pip
Finished processing dependencies for pip
STU600504M01:~ brunopgalvao$ sudo pip install rainbowstream
Downloading/unpacking rainbowstream
Downloading rainbowstream-0.2.5.tar.gz
Running setup.py (path:/private/tmp/pip_build_root/rainbowstream/setup.py) egg_info for package rainbowstream

Downloading/unpacking SQLAlchemy (from rainbowstream)
Downloading SQLAlchemy-0.9.6.tar.gz (4.0MB): 4.0MB downloaded
Running setup.py (path:/private/tmp/pip_build_root/SQLAlchemy/setup.py) egg_info for package SQLAlchemy

warning: no files found matching '*.jpg' under directory 'doc'
warning: no files found matching 'distribute_setup.py'
warning: no files found matching 'sa2to3.py'
warning: no files found matching 'ez_setup.py'
no previously-included directories found matching 'doc/build/output'

Downloading/unpacking pysqlite (from rainbowstream)
Downloading pysqlite-2.6.3.tar.gz (76kB): 76kB downloaded
Running setup.py (path:/private/tmp/pip_build_root/pysqlite/setup.py) egg_info for package pysqlite

Downloading/unpacking colorama (from rainbowstream)
Downloading colorama-0.3.1.tar.gz
Running setup.py (path:/private/tmp/pip_build_root/colorama/setup.py) egg_info for package colorama

Downloading/unpacking pyfiglet (from rainbowstream)
Downloading pyfiglet-0.7.tar.gz (691kB): 691kB downloaded
Running setup.py (path:/private/tmp/pip_build_root/pyfiglet/setup.py) egg_info for package pyfiglet

Requirement already satisfied (use --upgrade to upgrade): python-dateutil in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from rainbowstream)
Downloading/unpacking twitter (from rainbowstream)
Downloading twitter-1.14.3-py2.py3-none-any.whl (50kB): 50kB downloaded
Downloading/unpacking Pillow (from rainbowstream)
Downloading Pillow-2.5.0-cp27-none-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.whl (3.0MB): 3.0MB downloaded
Downloading/unpacking requests (from rainbowstream)
Downloading requests-2.3.0-py2.py3-none-any.whl (452kB): 452kB downloaded
Installing collected packages: rainbowstream, SQLAlchemy, pysqlite, colorama, pyfiglet, twitter, Pillow, requests
Running setup.py install for rainbowstream

Installing rainbowstream script to /usr/local/bin

Running setup.py install for SQLAlchemy
building 'sqlalchemy.cprocessors' extension
cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch x86_64 -arch i386 -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c lib/sqlalchemy/cextension/processors.c -o build/temp.macosx-10.9-intel-2.7/lib/sqlalchemy/cextension/processors.o
clang: error: unknown argument: '-mno-fused-madd' [-Wunused-command-line-argument-hard-error-in-future]
clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
***************************************************************************
command 'cc' failed with exit status 1
WARNING: The C extension could not be compiled, speedups are not enabled.
Failure information, if any, is above.
Retrying the build without the C extension now.
***************************************************************************

warning: no files found matching '*.jpg' under directory 'doc'
warning: no files found matching 'distribute_setup.py'
warning: no files found matching 'sa2to3.py'
warning: no files found matching 'ez_setup.py'
no previously-included directories found matching 'doc/build/output'
***************************************************************************
WARNING: The C extension could not be compiled, speedups are not enabled.
Plain-Python build succeeded.
***************************************************************************

Running setup.py install for pysqlite
building 'pysqlite2._sqlite' extension
cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch x86_64 -arch i386 -pipe -DMODULE_NAME="pysqlite2.dbapi2" -DSQLITE_OMIT_LOAD_EXTENSION=1 -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/module.c -o build/temp.macosx-10.9-intel-2.7/src/module.o
clang: error: unknown argument: '-mno-fused-madd' [-Wunused-command-line-argument-hard-error-in-future]
clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
error: command 'cc' failed with exit status 1
Complete output from command /usr/bin/python -c "import setuptools, tokenize;file='/private/tmp/pip_build_root/pysqlite/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-SjQPKi-record/install-record.txt --single-version-externally-managed --compile:
running install

running build

running build_py

creating build

creating build/lib.macosx-10.9-intel-2.7

creating build/lib.macosx-10.9-intel-2.7/pysqlite2

copying lib/init.py -> build/lib.macosx-10.9-intel-2.7/pysqlite2

copying lib/dbapi2.py -> build/lib.macosx-10.9-intel-2.7/pysqlite2

copying lib/dump.py -> build/lib.macosx-10.9-intel-2.7/pysqlite2

creating build/lib.macosx-10.9-intel-2.7/pysqlite2/test

copying lib/test/init.py -> build/lib.macosx-10.9-intel-2.7/pysqlite2/test

copying lib/test/dbapi.py -> build/lib.macosx-10.9-intel-2.7/pysqlite2/test

copying lib/test/dump.py -> build/lib.macosx-10.9-intel-2.7/pysqlite2/test

copying lib/test/factory.py -> build/lib.macosx-10.9-intel-2.7/pysqlite2/test

copying lib/test/hooks.py -> build/lib.macosx-10.9-intel-2.7/pysqlite2/test

copying lib/test/regression.py -> build/lib.macosx-10.9-intel-2.7/pysqlite2/test

copying lib/test/transactions.py -> build/lib.macosx-10.9-intel-2.7/pysqlite2/test

copying lib/test/types.py -> build/lib.macosx-10.9-intel-2.7/pysqlite2/test

copying lib/test/userfunctions.py -> build/lib.macosx-10.9-intel-2.7/pysqlite2/test

creating build/lib.macosx-10.9-intel-2.7/pysqlite2/test/py25

copying lib/test/py25/init.py -> build/lib.macosx-10.9-intel-2.7/pysqlite2/test/py25

copying lib/test/py25/py25tests.py -> build/lib.macosx-10.9-intel-2.7/pysqlite2/test/py25

running build_ext

building 'pysqlite2._sqlite' extension

creating build/temp.macosx-10.9-intel-2.7

creating build/temp.macosx-10.9-intel-2.7/src

cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch x86_64 -arch i386 -pipe -DMODULE_NAME="pysqlite2.dbapi2" -DSQLITE_OMIT_LOAD_EXTENSION=1 -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/module.c -o build/temp.macosx-10.9-intel-2.7/src/module.o

clang: error: unknown argument: '-mno-fused-madd' [-Wunused-command-line-argument-hard-error-in-future]

clang: note: this will be a hard error (cannot be downgraded to a warning) in the future

error: command 'cc' failed with exit status 1


Cleaning up...
Command /usr/bin/python -c "import setuptools, tokenize;file='/private/tmp/pip_build_root/pysqlite/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-SjQPKi-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /private/tmp/pip_build_root/pysqlite
Storing debug log for failure in /Users/brunopgalvao/Library/Logs/pip.log
STU600504M01:~ brunopgalvao$ rainbowstream
Traceback (most recent call last):
File "/usr/local/bin/rainbowstream", line 5, in
from pkg_resources import load_entry_point
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2603, in
working_set.require(requires)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 666, in require
needed = self.resolve(parse_requirements(requirements))
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 565, in resolve
raise DistributionNotFound(req) # XXX put more info here
pkg_resources.DistributionNotFound: requests

Can't start after installation, missing ~/.rainbow_config.json

I'm running on arch linux. I did

pip install rainbowstream

Then ran it and authorized it by pasting the code into the console. After authorization it gave the following error:

That's it! Your authorization keys have been written to /home/tim/.rainbow_oauth.
Traceback (most recent call last):
  File "/usr/bin/rainbowstream", line 9, in <module>
    load_entry_point('rainbowstream==0.4.7', 'console_scripts', 'rainbowstream')()
  File "/usr/lib/python3.4/site-packages/rainbowstream/rainbow.py", line 1682, in fly
    init(args)
  File "/usr/lib/python3.4/site-packages/rainbowstream/rainbow.py", line 148, in init
    set_config('PREFIX', name)
  File "/usr/lib/python3.4/site-packages/rainbowstream/config.py", line 94, in set_config
    data = load_config(path)
  File "/usr/lib/python3.4/site-packages/rainbowstream/config.py", line 32, in load_config
    with open(filepath) as f:
FileNotFoundError: [Errno 2] No such file or directory: '/home/tim/.rainbow_config.json'

Then whenever I try and open it gives the same errors. I tried doing touch ~/.rainbow_config.json but it then gives a parsing error whenever I load it.

pip uses python3 for me so it could be something to do with that:

tim@tower ~/ » pip --version
pip 1.5.6 from /usr/lib/python3.4/site-packages (python 3.4)

Unable to start (due to missing theme?)

rainbowstream was working for me initially, however it errored out all of a sudden. Now starting rainbowstream throws this traceback

rainbowstream
Traceback (most recent call last):
  File "/home/bilbo/.virtualenvs/rainbow/bin/rainbowstream", line 9, in <module>
    load_entry_point('rainbowstream==0.4.9', 'console_scripts', 'rainbowstream')()
  File "/home/bilbo/.virtualenvs/rainbow/local/lib/python2.7/site-packages/rainbowstream/rainbow.py", line 1682, in fly
    init(args)
  File "/home/bilbo/.virtualenvs/rainbow/local/lib/python2.7/site-packages/rainbowstream/rainbow.py", line 157, in init
    db.theme_store(c['THEME'])
  File "/home/bilbo/.virtualenvs/rainbow/local/lib/python2.7/site-packages/rainbowstream/db.py", line 90, in theme_store
    session.commit()
  File "/home/bilbo/.virtualenvs/rainbow/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 776, in commit
    self.transaction.commit()
  File "/home/bilbo/.virtualenvs/rainbow/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 377, in commit
    self._prepare_impl()
  File "/home/bilbo/.virtualenvs/rainbow/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 357, in _prepare_impl
    self.session.flush()
  File "/home/bilbo/.virtualenvs/rainbow/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 1919, in flush
    self._flush(objects)
  File "/home/bilbo/.virtualenvs/rainbow/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 2037, in _flush
    transaction.rollback(_capture_exception=True)
  File "/home/bilbo/.virtualenvs/rainbow/local/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.py", line 60, in __exit__
    compat.reraise(exc_type, exc_value, exc_tb)
  File "/home/bilbo/.virtualenvs/rainbow/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 2001, in _flush
    flush_context.execute()
  File "/home/bilbo/.virtualenvs/rainbow/local/lib/python2.7/site-packages/sqlalchemy/orm/unitofwork.py", line 372, in execute
    rec.execute(self)
  File "/home/bilbo/.virtualenvs/rainbow/local/lib/python2.7/site-packages/sqlalchemy/orm/unitofwork.py", line 526, in execute
    uow
  File "/home/bilbo/.virtualenvs/rainbow/local/lib/python2.7/site-packages/sqlalchemy/orm/persistence.py", line 65, in save_obj
    mapper, table, insert)
  File "/home/bilbo/.virtualenvs/rainbow/local/lib/python2.7/site-packages/sqlalchemy/orm/persistence.py", line 602, in _emit_insert_statements
    execute(statement, params)
  File "/home/bilbo/.virtualenvs/rainbow/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 729, in execute
    return meth(self, multiparams, params)
  File "/home/bilbo/.virtualenvs/rainbow/local/lib/python2.7/site-packages/sqlalchemy/sql/elements.py", line 321, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "/home/bilbo/.virtualenvs/rainbow/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 826, in _execute_clauseelement
    compiled_sql, distilled_params
  File "/home/bilbo/.virtualenvs/rainbow/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 958, in _execute_context
    context)
  File "/home/bilbo/.virtualenvs/rainbow/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1160, in _handle_dbapi_exception
    exc_info
  File "/home/bilbo/.virtualenvs/rainbow/local/lib/python2.7/site-packages/sqlalchemy/util/compat.py", line 199, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb)
  File "/home/bilbo/.virtualenvs/rainbow/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 951, in _execute_context
    context)
  File "/home/bilbo/.virtualenvs/rainbow/local/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 436, in do_execute
    cursor.execute(statement, parameters)
sqlalchemy.exc.OperationalError: (OperationalError) no such table: theme u'INSERT INTO theme (theme_name) VALUES (?)' (u'monokai',)

install error

Error message:

"Is sphinx installed? If not, try 'sudo easy_install sphinx'."

occurs when trying to install pysqlite.

Persists even after installing sphinx.
Platform: python 3.3 virtualenv

Opening lists in two instances of rainbowstream...

Hi,

I have two private lists in my twitter account. I'd like to open one of them in one rainbowstream instance, and the other in the other one. I use the command "list home" and introduce @myuser/mylist1 and I do the same process with the second one...
I'd like to see two different streams according two my list's tweets, but as a result, both streams turn showing last entered list. Is possible to do that? No error is reported. But I think it can be useful if implemented.

Thanks and congratulations for rs!

Alberto.

:)

Tweet URL

If I want to send URL of a tweet to a friend I have to go to twitter webpage. It would be really cool to have command to do that.

For example url 26 will return URL of a tweet with id 26, or something like that.

ascii decode exception

Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 763, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/home/kura/.local/venvs/rainbowstream/local/lib/python2.7/site-packages/rainbowstream/rainbow.py", line 1838, in stream
    g['decorated_name'](g['PREFIX']) + str2u(current_buffer))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 12: ordinal not in range(128)

The error occurred after this got retweeted on time my timeline - https://twitter.com/coracurrier/status/506817080294141952

image

Using Python 2.7, since I just noticed you have a different method based on Python.

ONLY_LIST config

I was trying to set a stream which will show new tweets from my personal stream and one of my lists. I dont know if it can be done (not quite familier with rainbowstream code yet).

Main problem is that I dont know how ONLY_LIST value should looks like. I tried value @username/list1 and python list ['@username/list1'] which ended up with raising exception.

Exception in thread Thread-1:
Traceback (most recent call last):
    File "/usr/lib64/python2.7/threading.py", line 810, in __bootstrap_inner
    self.run()
    File "/usr/lib64/python2.7/threading.py", line 763, in run
    self.__target(*self.__args, **self.__kwargs)
    File "/home/polarkac/Development/Python_environments/rainbowstream/lib/python2.7/site-packages/rainbowstream/rainbow.py", lin
    e 1978, in stream
    ig=args.ignore,
    File "/home/polarkac/Development/Python_environments/rainbowstream/lib/python2.7/site-packages/rainbowstream/draw.py", line 2
    49, in draw
    fil = list(set((fil or []) + c['ONLY_LIST']))
    TypeError: can only concatenate list (not "unicode") to list

Install requires sqlite3-dev to have been installed

In my Crunchbang Linux box, I had to install sqlite3-dev with apt-get to get the installation working. This might be the case with other distros as well.

It might be a good idea to add this information to installation instructions.

console doesn't handle ^d

Noticed this due to my instinctive need to be bad to software.

Repro steps:
At a prompt with no other text input yet, type ^D
Need tips ? Type "h" and hit Enter key!
[@r4v5]:

(Type ctrl-d)

It dies with the following traceback:
Traceback (most recent call last):
File "/Users/r4v5/.pyenv/versions/2.7.6/bin/rainbowstream", line 9, in
load_entry_point('rainbowstream==0.8.0', 'console_scripts', 'rainbowstream')()
File "/Users/r4v5/.pyenv/versions/2.7.6/lib/python2.7/site-packages/rainbowstream/rainbow.py", line 1789, in fly
listen()
File "/Users/r4v5/.pyenv/versions/2.7.6/lib/python2.7/site-packages/rainbowstream/rainbow.py", line 1642, in listen
line = raw_input(g'decorated_name')
EOFError

I'll be honest, I'm not sure what the expected behavior should be -- you're not quite following readline semantics (^a doesn't do the expected thing, for instance). But "ugly error message" probably isn't it.

Error after install

I've just installed it using sudo pip install rainbowstream and when I tried to run it, this error appeared:

IOError: [Errno 2] No such file or directory: 'rainbowstream/colorset/default.json'

Unsupported locale

I leave my machine on 24/7 including leaving rainbowstream running in a tab all night. Randomly during the night I got the following exception:

Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 763, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/home/kura/.local/venvs/rainbowstream/local/lib/python2.7/site-packages/rainbowstream/rainbow.py", line 1853, in stream
    print_event(tweet)
  File "/home/kura/.local/venvs/rainbowstream/local/lib/python2.7/site-packages/rainbowstream/draw.py", line 863, in print_event
    event_dict[e['event']](e)
  File "/home/kura/.local/venvs/rainbowstream/local/lib/python2.7/site-packages/rainbowstream/draw.py", line 710, in notify_follow
    clock = arrow.get(date).to('local').humanize(locale=lang)
  File "/home/kura/.local/venvs/rainbowstream/local/lib/python2.7/site-packages/arrow/arrow.py", line 576, in humanize
    locale = locales.get_locale(locale)
  File "/home/kura/.local/venvs/rainbowstream/local/lib/python2.7/site-packages/arrow/locales.py", line 21, in get_locale
    raise ValueError('Unsupported locale \'{0}\''.format(name))
ValueError: Unsupported locale 'en_GB'

Apparently this is coming from the Arrow library but I thought I'd post the exception here in case there is anything you might need to do or if it's a bug in Arrow that has now been fixed and requires you to update requirements or anything similar.

Nothing happened over night to mess up my locale, no upgrades or system changes so I'm not sure why it would randomly bomb out after working perfectly fine for over a week.

Color configs

Hi guys! First of all i want to congratulate you guys for this amazing lib!
I hava a question. I am using a black background on my terminal and it seems that some texts are difficult to see like the image below:

Perhaps it will be nice some cmdset for changing colors or adding some default themes 😄

Many commands dont work

Hi
And thanks for this, i have rainbowstream installed on archlinux & freebsd, on both installs commands such as list,home,whois and some others do not work, just outputs OMG something is wrong with twitter. I seen a similar issue on a now closed issue but OP did not say how he fixed it, only hinted towards changing locale setting's in .zshrc mine is set to export LANG=en_GB.UTF-8, i use zsh-powerline,tmux-powerline,rainbarf however i dont think these are a factor as same happens in bash w/o any 'bling'
One more question, is it possible to intergrate libnotify support so we could have notify-send {dunst,growl} type notifications on desktop, maybe a setting 'config SET_LIBNOTIFY = words, to, flag, desktop, notifications'.
Regards
cirrus

Display prompt whenever it is possible to type / compose

Rainbowstream initially displays a prompt. If a tweet displays prior to the user hitting the keyboard the prompt is not displayed. My thinking is if the user is able to type then the prompt should be visible regardless of whether the user hit the keyboard or not.

New tweets disrupt prompt

If I receive a new tweet while trying to type something in the prompt then it makes it difficult to edit or even see where I am in the current session. It would be nice if the prompt were re-displayed somehow after displaying the new tweet.

Installation - error: invalid command 'egg_info'

I am unable to install rainbowstream via pip (pip install rainbowstream nor pip install https://github.com/DTVD/rainbowstream/archive/master.zip)

I have upgraded pip and Distribute.

  • pip 1.5.6 from /usr/local/lib/python2.7/dist-packages (python 2.7)
  • distribute-0.7.3

 

  Downloading/unpacking https://github.com/DTVD/rainbowstream/archive/master.zip
  Downloading master.zip (unknown size): 1.3MB downloaded
  Running setup.py (path:/tmp/pip-mC1JW1-build/setup.py) egg_info for package from https://github.com/DTVD/rainbowstream/archive/master.zip
    /usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'entry_points'
      warnings.warn(msg)
    /usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'include_package_data'
      warnings.warn(msg)
    /usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'zip_safe'
      warnings.warn(msg)
    /usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'install_requires'
      warnings.warn(msg)
    usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
       or: -c --help [cmd1 cmd2 ...]
       or: -c --help-commands
       or: -c cmd --help

    error: invalid command 'egg_info'
    Complete output from command python setup.py egg_info:
    /usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'entry_points'

  warnings.warn(msg)

/usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'include_package_data'

  warnings.warn(msg)

/usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'zip_safe'

  warnings.warn(msg)

/usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'install_requires'

  warnings.warn(msg)

usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]

   or: -c --help [cmd1 cmd2 ...]

   or: -c --help-commands

   or: -c cmd --help



error: invalid command 'egg_info'

----------------------------------------
Cleaning up...

does not exit cleanly on CTRL-C

leaves a 'rainbow.db' file in current directory. (perhaps use tempfile.mktmp?)
throws a stack trace.

expected: should either catch ctrl-c event and clear currently entered text, or should close program cleanly

error connection to twitter

Get this message when trying to running rainbowstream with my own twitter API key.

"I'm afraid we have maximum connection problem with twitter right now :(
Let's try again later."

Theme not saved on quit

Hi,
When I set a theme it is only saved until I exit rainbowstream, there is no persistance. Is it a normal behavior ?
Version : 0.2.5

Error invoking rainbowstream

Traceback (most recent call last):
File "/usr/local/bin/rainbowstream", line 5, in
from pkg_resources import load_entry_point
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2603, in
working_set.require(requires)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 666, in require
needed = self.resolve(parse_requirements(requirements))
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 565, in resolve
raise DistributionNotFound(req) # XXX put more info here
pkg_resources.DistributionNotFound: pysqlite

ImportError: No module named consumer

$ rainbowstream
Traceback (most recent call last):
  File "/usr/local/bin/rainbowstream", line 9, in <module>
    load_entry_point('rainbowstream==0.2.5', 'console_scripts', 'rainbowstream')()
  File "build/bdist.linux-x86_64/egg/pkg_resources.py", line 357, in load_entry_point

  File "build/bdist.linux-x86_64/egg/pkg_resources.py", line 2465, in load_entry_point
    )
  File "build/bdist.linux-x86_64/egg/pkg_resources.py", line 2181, in load
    return s
  File "/usr/local/lib/python2.7/dist-packages/rainbowstream/rainbow.py", line 25, in <module>
    from .consumer import *

Unable to view stream

Greetings,

Thank u for this cool tool. I follow ur instruction. I have a linux and installed w/venv but when i try home or whois I get error. attached is screenshot.

Simba
screenshot-simba

Twitter List

Hi @dtvd
Thank you for making this tool! It is pretty awesome. Just wondering have you plan to make view tweets based on list as part of your future development? I use twitter list a lot to organize information. It would be pretty awesome to see that feature in this awesome tool.

Best

Bo

Cant show image preview

Version : Rainbowstream 0.30

(venv) $ rainbowstream -iot
show image 55
Sorry I can't show this image.

Already trying another ID/image, still cant show the image

"Sorry, image link is broken" on all images attempted

Every time an image is in a tweet, I get a "Sorry, image link is broken" instead of the inline image.

config
HEARTBEAT_TIMEOUT: 120
IMAGE_ON_TERM: True
THEME: monokai
ASCII_ART: True
HIDE_PROMPT: True
PREFIX: @ftw
SEARCH_MAX_RECORD: 5
HOME_TWEET_NUM: 5
RETWEETS_SHOW_NUM: 5
QUOTE_FORMAT: #comment RT #owner: #tweet
MESSAGES_DISPLAY: 5
TREND_MAX: 10
LIST_MAX: 5
HISTORY_FILENAME: completer.hist
IMAGE_SHIFT: 2
IMAGE_MAX_HEIGHT: 90
USER_DOMAIN: userstream.twitter.com
PUBLIC_DOMAIN: stream.twitter.com
SITE_DOMAIN: sitestream.twitter.com

trying to tweet ends in a Exception

big fan of rainbowstream here :) i updated rainbowstream to the latest version yesterday with pip install --upgrade rainbowstream and now if i try to type a tweet with t foo bar i run into this exception. it feels like its caused because of the timeline streaming a new tweet.

Exception in thread Thread-1: Traceback (most recent call last): File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner self.run() File "/usr/lib/python2.7/threading.py", line 763, in run self.__target(*self.__args, **self.__kwargs) File "/usr/local/lib/python2.7/dist-packages/rainbowstream/rainbow.py", line 1745, in stream g['decorated_name'](c['PREFIX']) + current_buffer) UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 10: ordinal not in range(128)

maybe someone has a idea.

Custom timeline formatting

Hi!

Feature request here: I would love a way to format my own timeline. For example a string in the config file with variables such as username, fullname and date (including date formatting).

This way I could make my timeline look like this for example:

id [HH:mm] @username <tweet>
id [HH:mm] @username2 <tweet2>

Which is more convenient for me because it allows me to see more tweets at once.

Thanks!

Prefix for prompt

I had an idea with customizing prefix as I wanted in PR #65 and #64.
If prefix could be formated (mostly the same way as the string format works) it would satisfy everyone.

For example PREFIX = "@myTwitterName%list" will replace %list with Twitter list name (if any).

I just wanted to start discussion, before any implementation, to see if its ok.

ImportError: cannot import name error

Traceback (most recent call last):
File "C:\Python27\Scripts\rainbowstream-script.py", line 9, in
load_entry_point('rainbowstream==1.1.4', 'console_scripts', 'rainbowstream')
()
File "C:\Python27\lib\site-packages\pkg_resources.py", line 339, in load_entry
_point
return get_distribution(dist).load_entry_point(group, name)
File "C:\Python27\lib\site-packages\pkg_resources.py", line 2457, in load_entr
y_point
return ep.load()
File "C:\Python27\lib\site-packages\pkg_resources.py", line 2171, in load
['name'])
File "build\bdist.win-amd64\egg\rainbowstream\rainbow.py", line 21, in <module

ImportError: cannot import name error

First Run Problem on Crunchbang

After installing via pip, with no errors, I run 'rainbowstream' and the following error is raised:

Traceback (most recent call last):
File "/usr/local/bin/rainbowstream", line 5, in
from pkg_resources import load_entry_point
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2707, in
working_set.require(requires)
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 686, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 584, in resolve
raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: twitter

I have tried to install twitter, but it is already installed:

sudo pip install twitter
Requirement already satisfied (use --upgrade to upgrade): twitter in /usr/local/lib/python2.7/dist-packages
Cleaning up...
sudo pip install --upgrade twitter
Requirement already up-to-date: twitter in /usr/local/lib/python2.7/dist-packages

Any help would be most appreciated. I got this application running on Ubuntu and really like it, would love to have it work on my home machine.

Thank you.

Search items other than hashtags

Perhaps I'm missing something but I'd like the ability to search on terms other than hashtags. Is this possible, and if not would it be possible to add in a future release?

Thanks!

Unable to start

OSX 10.9.4.

Successfully installed rainbowstream python-dateutil requests six
Cleaning up...

@main ➜ ~ rainbowstream

Traceback (most recent call last):
  File "/usr/local/bin/rainbowstream", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2603, in <module>
    working_set.require(__requires__)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 666, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 565, in resolve
    raise DistributionNotFound(req)  # XXX put more info here
pkg_resources.DistributionNotFound: Pillow

No support for OS X?

Traceback (most recent call last):
File "/usr/local/bin/rainbowstream", line 5, in from pkg_resources import load_entry_point
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2603, in working_set.require(requires)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 666, in require needed = self.resolve(parse_requirements(requirements))
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 565, in resolve
raise DistributionNotFound(req) # XXX put more info here
pkg_resources.DistributionNotFound: requests

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.