GithubHelp home page GithubHelp logo

pyhn's Introduction

Pyhn

Hacker news in your terminal.

https://dl.dropbox.com/s/swxcq2uk797309c/Screenshot%20at%202013-01-05%2018%3A38%3A59.png

Don't be worry about your IP. Pyhn is not aggresive, it uses cache.

Installation

Using pip:

pip install pyhn

Run it:

pyhn

Usage

Use help for all key bindings:

  • h, ?: Print help popup

Configuration

By default, configuration file is in your $HOME/.pyhn/confi. You can set key bindings, colors and more.

This is an example file:

[keybindings]
open_story_link = S,enter
show_story_link = s
open_comments_link = C
show_comments_link = c
open_user_link = U
show_user_link = u
up = j
down = k
page_up = ctrl d
page_down = ctrl u
first_story = g
last_story = G
refresh = r,R
reload_config = ctrl r,ctrl R

[settings]
cache = /home/socketubs/.pyhn/cache
cache_age = 5
browser_cmd = __default__

[colors]
body = default||standout
focus = black|light green|underline
footer = black|light gray
footer-error = dark red,bold|light gray
header = dark gray,bold|white|
title = dark red,bold|light gray
help = black,bold|light gray

Settings

  • cache_age is a minute indicator which say to CacheManager when cache is outdated
  • browser_cmd is a bash command which will be use to open links

Examples:

browser_cmd = lynx __url__
browser_cmd = __default__
browser_cmd = w3m __url__
browser_cmd = echo "[INFO] Open with w3m: __url__" >> /tmp/pyhn.log && w3m __url__

Key bindings

You can set different key bindings for same action with a comma separator. Take a look at urwid input manual.

Colors

Colors options are designed like that: foreground|background|monochrome.

foreground

  • colors: ‘default’ (use the terminal’s default foreground), ‘black’, ‘dark red’, ‘dark green’, ‘brown’, ‘dark blue’, ‘dark magenta’, ‘dark cyan’, ‘light gray’, ‘dark gray’, ‘light red’, ‘light green’, ‘yellow’, ‘light blue’, ‘light magenta’, ‘light cyan’, ‘white’
  • settings: ‘bold’, ‘underline’, ‘blink’, ‘standout’

background

  • colors: ‘default’ (use the terminal’s default background), ‘black’, ‘dark red’, ‘dark green’, ‘brown’, ‘dark blue’, ‘dark magenta’, ‘dark cyan’, ‘light gray’

monochrome

  • settings : ‘bold’, ‘underline’, ‘blink’, ‘standout’

For more informations you can take a loot at urwid manual.

License

License is AGPL3. See LICENSE.

pyhn's People

Contributors

kubo39 avatar mrshu avatar

Watchers

 avatar  avatar  avatar

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.