Twent (Time, WEather, and News in Terminal) is a Python script that allows you to display time, weather, and rss feeds in a text console.
Using world news feed from The Wall Street Journal.
Twent uses feedparser to parse rss feeds and pyfiglet to display time.
You need to have them installed to run twent.
git clone git@github.com:mikkkee/twent.git
cd twent
python twent.py 0
usage: twent.py [-h] Flag [Flags ...]
Flag
s can be numbers or name
s of feeds you specified in config.ini.
Numbers and name
s cannot be used together.
If numbers are used, the numbers correspond to the order of rss feeds in config.ini, starting from 1.
Use 0
as Flag
to display all feeds together.
Press Ctrl-C
to stop twent.
In config.ini, you can customize the following settings:
###[rss] section
- You can add rss feeds here, using
name = value
format. name
can be used as aFlag
to choose the corresponding feed when running.value
is url of the rss feed.- Default
value
s are Hacker News (50 points and above) and The Wall Street Journal - World News
###[weather] section
city
stands for the location code used in yahoo weather api.- You can find location code for you city by searching you city in yahoo weather. For example, the location code for New York is
2459115
, the corresponding url for New York is https://weather.yahoo.com/united-states/new-york/new-york-2459115/ unit
can beF
orC
, case insensitive, stands for Fahrenheit or Celsius, respictively.
###[duration] section
duration
stands for the time that twent should run, in minutes.- Default value
0
stands for running forever.