noprobelm / tempy Goto Github PK
View Code? Open in Web Editor NEWA simple, visually pleasing weather report in your terminal.
License: MIT License
A simple, visually pleasing weather report in your terminal.
License: MIT License
Relates to #6
tempy
should support the ability to specify default settings (i.e. location and system of measurement).
I'd like to use tempyrc
for this. Right now, the Config
class checks tempyrc
for a user-provided API key. We'll need to expand the logic in the Config
class to parse out each config option.
I suppose we should also add command line options for tempy
to automatically update the config so the user doesn't have to go into tempyrc
each time they want to make an update.
Weather alerts would be a nice addition for tempy
. Open to ideas on what something like that might look like (e.g. customization options, positioning, options to enable/disable)...
Should be:
"pressure": f"{data['current']['pressure_mb']} mbar",
tempy
; a bug is visible in the lower left forecast panel.Issue brought to my attention per #24
There's a bit of housecleaning to be done to make tempy
compatible on Windows. Here's what I'm immediately aware of.
tempy
does not look in valid Windows directories for a tempyrc
config file.
nt
os types. The config
module now differentiates between nt
and posix
os names. If nt
, we look at C:/Users/<username>/AppData/Roaming/tempyrc
for a config.strftime
wherever it's needed.
strftime
might work differently between Windows and Linux systems.Installed v1.0.9
via pip install git+https://github.com/noprobelm/tempy
. Getting an invalid format string error:
$ tempy new york city
Traceback (most recent call last):
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\Scripts\tempy.exe\__main__.py", line 7, in <module>
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\tempy\__main__.py", line 8, in main
renderable = Report(config)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\tempy\weather.py", line 69, in __init__
self.data = Data(config["location"], config["api_key"])
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\tempy\data.py", line 34, in __init__
).strftime("%A, %B %-d | %H:%M"),
ValueError: Invalid format string
Python 3.10 and Windows 10
In the beginning, I will appreciate your job.
There is no information about the contribution so I write Issue.
At first, cloning using ssh requires permission to repository. So instead of
git clone [email protected]:noprobelm/tempy.git && cd tempy
there should be
git clone https://github.com/noprobelm/tempy.git
But pip allows installing directly from the git repository
so there is no need to clone, one could just call:
pip install git+https://github.com/noprobelm/tempy
It will be also nice if the configuration file will allow defining default locations and units.
Thanks for a really nice package.
This is an issue due to an oversight in the way I was parsing forecast date epoch fields provided by weatherapi. I will update the code to generate forecast dates based on present time + n days.
The config
module only checks if ~/.config/tempyrc
is a valid file. It doesn't account for the necessity to create ~/.config
if it doesn't already exist in $HOME
The data
module is using the localtime epoch to determine dtg information for the timing report, but we're not supplying the timestamp conversion with any timezone data. Current time readout is incorrect most of the time.
Extra data point, and doing so will level out the tables so reports with larger art look better.
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.