wmorgan / turnsole Goto Github PK
View Code? Open in Web Editor NEWCurses client for Heliotrope
Curses client for Heliotrope
Turnsole is a curses client for Heliotrope, the personal email server. Turnsole is still under development. As such, there is no gem yet. You will have to run it the hard way: 0. Install Heliotrope. See the README at http://github.com/wmorgan/heliotrope. 1. Start Heliotrope. 2. Run `git clone https://github.com/wmorgan/turnsole.git`. 3. Install the following gems: trollop console locale rmail rest-client mime-types curb lrucache json. 4.1 If you are on OS X Snowleopard OR Lion, also install the snowleopard-ncurses gem. 4.2 If you are on Linux, also install the ncursesw gem. Run turnsole like this: ruby -I lib -I <heliotrope repo>/lib bin/turnsole After the first invocation, you should edit ~/.turnsole/config.yaml to set any defaults. SPECIAL NOTES FOR OS X ---------------------- Certain versions of Ruby, on OS X, appear to exhibit bugs in Fibers, which turnsole uses extensively. - Ruby 1.8.7 works fine (Turnsole includes a Fiber backport). - Ruby 1.9.2-p280 fails. - Ruby 1.9.3-p0 works, but you cannot compile with llvm-gcc. Unfortunately, if you have XCode installed, this is the default. (See http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/40574 .) If you're using rvm to install, try this: CC=/usr/bin/gcc-4.2 rvm install ruby-1.9.3-p0 I managed to get that working. Comments? Questions? File issues on the github page; ask questions on the sup-devel mailing list: http://rubyforge.org/mailman/listinfo/sup-devel.
While trying to run turnsole I encountered this problem:
/home/w0rm/.gem/ruby/1.9.1/gems/console-0.5/lib/console/string.rb:27:in display_width': malformed string: incomplete multibyte character at position 99 (ArgumentError) from /home/w0rm/.gem/ruby/1.9.1/gems/console-0.5/lib/console/string.rb:27:in
display_width'
from /home/w0rm/work/temp/turnsole/lib/turnsole/modes/scroll-mode.rb:230:in block in draw_line_from_array' from /home/w0rm/work/temp/turnsole/lib/turnsole/modes/scroll-mode.rb:228:in
each'
from /home/w0rm/work/temp/turnsole/lib/turnsole/modes/scroll-mode.rb:228:in each_with_index' from /home/w0rm/work/temp/turnsole/lib/turnsole/modes/scroll-mode.rb:228:in
draw_line_from_array'
from /home/w0rm/work/temp/turnsole/lib/turnsole/modes/scroll-mode.rb:203:in draw_line' from /home/w0rm/work/temp/turnsole/lib/turnsole/modes/line-cursor-mode.rb:51:in
draw_line'
from /home/w0rm/work/temp/turnsole/lib/turnsole/modes/scroll-mode.rb:48:in block in draw!' from /home/w0rm/work/temp/turnsole/lib/turnsole/modes/scroll-mode.rb:48:in
each'
from /home/w0rm/work/temp/turnsole/lib/turnsole/modes/scroll-mode.rb:48:in draw!' from /home/w0rm/work/temp/turnsole/lib/turnsole/buffer.rb:45:in
force_draw!'
from /home/w0rm/work/temp/turnsole/lib/turnsole/buffer.rb:41:in draw!' from /home/w0rm/work/temp/turnsole/lib/turnsole/screen.rb:212:in
draw!'
from /home/w0rm/work/temp/turnsole/lib/turnsole/ui.rb:43:in step' from bin/turnsole:150:in
Same thing in ruby 1.8.x and 1.9.2.180. I am guessing this is some form of character encoding problem, but I am able to see a few messages with non-latin1 characters, it bails on one html mail with a lot of diacritics. If needed I should be able to provide this email in raw.
./lib/turnsole/modes/thread-index-mode.rb:382:in reply': undefined method
latest_message' for #Turnsole::ThreadSummary:0x101888ce8 (NoMethodError)
from ./lib/turnsole/input.rb:39:in send' from ./lib/turnsole/input.rb:39:in
handle'
from ./lib/turnsole/ui.rb:69:in step' from ./lib/turnsole/ui.rb:94:in
spawn_fiber'
from ./lib/turnsole/fiberback.rb:15:in initialize' from ./lib/turnsole/ui.rb:92:in
new'
from ./lib/turnsole/ui.rb:92:in spawn_fiber' from ./lib/turnsole/ui.rb:69:in
step'
from bin/turnsole:150
Another one:
./lib/turnsole/global.rb:102:in do': uninitialized constant Turnsole::GlobalBehavior::DraftManager (NameError) from ./lib/turnsole/input.rb:41:in
handle'
from ./lib/turnsole/ui.rb:69:in step' from ./lib/turnsole/ui.rb:94:in
spawn_fiber'
from ./lib/turnsole/fiberback.rb:15:in initialize' from ./lib/turnsole/ui.rb:92:in
new'
from ./lib/turnsole/ui.rb:92:in spawn_fiber' from ./lib/turnsole/ui.rb:69:in
step'
from bin/turnsole:150
When tagging (adding labels to) lots of messages, say over 500, the first 50 or so messages take a long time to tag. It starts off doing it a bout 2-3 per second. After the first 50 or so it speeds up massively and does about 80 per second.
After doing a search, pressing % to save it causes this crash :
/home/chrisr/code/play/turnsole/lib/turnsole/modes/search-results-mode.rb:9:in save_search': uninitialized constant Turnsole::SearchResultsMode::BufferManager (NameError) from /home/chrisr/code/play/turnsole/lib/turnsole/input.rb:39:in
handle'
from /home/chrisr/code/play/turnsole/lib/turnsole/ui.rb:69:in block in step' from /home/chrisr/code/play/turnsole/lib/turnsole/ui.rb:100:in
block in spawn_fiber'
Some terminals on X11 allow to right-click a link to open it in a browser if this link has not been cut in half by being wrapped by the displaying application.
An alternative would be a view-url hook like it was discussed on the sup-talk list in Feb 2008. (http://article.gmane.org/gmane.mail.sup.general/650/)
A similar thing can be achieved by piping the message to urlview - but having a single shortcut like "L" to open a link would be much more convenient.
In issue #3, when turnsole exited with an exception, the tempfile which contained my email was gone already. As mentioned in your email, we should probably move away from the Ruby tempfile library.
Trying to start latest HEAD and this is what I get:
ruby: symbol lookup error: /usr/lib64/ruby/vendor_ruby/ncurses_bin.so: undefined symbol: STR2CSTR
Investigating.
$HOME/.rvm/gems/ruby-1.9.2-p180/gems/rmail-1.0.0/lib/rmail/header.rb:81:in =~': incompatible encoding regexp match (ASCII-8BIT regexp with UTF-8 string) (Encoding::CompatibilityError) from $HOME/.rvm/gems/ruby-1.9.2-p180/gems/rmail-1.0.0/lib/rmail/header.rb:81:in
parse'
from $HOME/.rvm/gems/ruby-1.9.2-p180/gems/rmail-1.0.0/lib/rmail/parser.rb:233:in block in parse_header' from $HOME/.rvm/gems/ruby-1.9.2-p180/gems/rmail-1.0.0/lib/rmail/parser.rb:229:in
each'
from $HOME/.rvm/gems/ruby-1.9.2-p180/gems/rmail-1.0.0/lib/rmail/parser.rb:229:in parse_header' from $HOME/.rvm/gems/ruby-1.9.2-p180/gems/rmail-1.0.0/lib/rmail/parser.rb:194:in
parse_low'
from $HOME/.rvm/gems/ruby-1.9.2-p180/gems/rmail-1.0.0/lib/rmail/parser.rb:183:in parse' from $HOME/.rvm/gems/ruby-1.9.2-p180/gems/rmail-1.0.0/lib/rmail/parser.rb:331:in
parse'
from $HOME/.rvm/gems/ruby-1.9.2-p180/gems/rmail-1.0.0/lib/rmail/parser.rb:345:in read' from $HOME/devel/turnsole/lib/turnsole/modes/edit-message-mode.rb:273:in
parse_file'
from $HOME/devel/turnsole/lib/turnsole/modes/edit-message-mode.rb:166:in edit_message!' from $HOME/devel/turnsole/lib/turnsole/input.rb:39:in
handle'
from $HOME/devel/turnsole/lib/turnsole/ui.rb:69:in block in step' from $HOME/devel/turnsole/lib/turnsole/ui.rb:94:in
block in spawn_fiber'
It would be nice to have something like the sup wiki to share information about configuring and using the software.
Maybe activating the wiki here in the repository and accepting pull requests would do.
I imported a few hundred MBytes of messages from maildirs but for some messages this happens:
I checked the bad-message.txt could not find anything wrong.
bundler (1.1.3)
console (0.5)
curb (0.8.0)
json (1.7.3)
leveldb-ruby (0.14)
locale (2.0.5)
lrucache (0.1.3)
mime-types (1.18)
ncursesw (1.2.4.3)
PriorityQueue (0.1.2)
rack (1.4.1)
rack-protection (1.2.0)
rake (0.9.2.2)
rest-client (1.6.7)
rmail (1.0.0)
rubygems-bundler (1.0.0)
rvm (1.11.3.3)
sinatra (1.3.2)
tilt (1.3.3)
trollop (1.16.2)
whistlepig (0.11.1)
* wrote broken message to bad-message.txt
/usr/src/my-stuff/sup/heliotrope/lib/heliotrope/meta-index.rb:658:in `add_entry': making new (Whistlepig::Error)
from /usr/src/my-stuff/sup/heliotrope/lib/heliotrope/meta-index.rb:658:in `index!'
from /usr/src/my-stuff/sup/heliotrope/lib/heliotrope/meta-index.rb:115:in `add_message'
from bin/heliotrope-import:133:in `block in <main>'
from /usr/src/my-stuff/sup/heliotrope/lib/heliotrope/message-adder.rb:57:in `block in each_message'
from /usr/src/my-stuff/sup/heliotrope/lib/heliotrope/maildir-walker.rb:28:in `each_message'
from /usr/src/my-stuff/sup/heliotrope/lib/heliotrope/message-adder.rb:42:in `each_message'
from bin/heliotrope-import:109:in `<main>'
When tagging threads with "t" and then archiving them with "=a" they get archived.
After repeating this action with other threads, the previously archived threads reappear.
After doing a search, pressing % to save it causes this crash :
/home/chrisr/code/play/turnsole/lib/turnsole/modes/search-results-mode.rb:9:in `save_search': uninitialized constant Turnsole::SearchResultsMode::BufferManager (NameError)
from /home/chrisr/code/play/turnsole/lib/turnsole/input.rb:39:in `handle'
from /home/chrisr/code/play/turnsole/lib/turnsole/ui.rb:69:in `block in step'
from /home/chrisr/code/play/turnsole/lib/turnsole/ui.rb:100:in `block in spawn_fiber'
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.