nuntium.rb
# TODO: Add improved loading icon/thing while chunking data
Add improved loading icon/thing while chunking data
Add improved loading icon / thing while chunking data
def main
  Util.clear_term
  @chunk = 'RSS data'
  @loading_thread = Util.poll(Cli::CLI_SPEED) { print "\rLoading #{@chunk}..." unless caches_valid? }
  Util.poll(30) { Util.clear_term }
  cli = Display.new('Cli')
  sleep Cli::CLI_SPEED
  Util.clear_term
  @enable_ifeeds = false
  config = read_config
  Keyboard.add_shortcut('q') do
    exit!
  end
  Keyboard.add_shortcut('c') do
    Util.clear_term
  end
  Keyboard.enable_listener
  @loading_thread.kill if caches_valid?
  Util.clear_term
  cli.display.stream(config) if caches_valid?
end
def main Util . clear_term @chunk = 'RSS data' @loading_thread = Util . poll ( Cli :: CLI_SPEED ) { print "\rLoading #{@chunk}..." unless caches_valid? } Util . poll ( 30 ) { Util . clear_term } cli = Display . new ( 'Cli' ) sleep Cli :: CLI_SPEED Util . clear_term @enable_ifeeds = false config = read_config Keyboard . add_shortcut ( 'q' ) do exit! end Keyboard . add_shortcut ( 'c' ) do Util . clear_term end Keyboard . enable_listener @loading_thread . kill if caches_valid? Util . clear_term cli . display . stream ( config ) if caches_valid? end
TODO: Add improved loading icon/thing while chunking data
TODO : Add improved loading icon / thing while chunking data
# Clear term of old data # TODO: make sure this thread gets killed...after you add in the frfr invalidation... # Set up cli display # Setup config, add exit hook, start listening for keys. # NOTE: read_config needs to run before Keyboard.listener, in case any Aggregators register shortcuts # TODO: Mac compat - basically a ruby script I guess... or fallback scripts # start streaming data