Giter Site home page Giter Site logo

pwygit's Introduction

pwygit's People

Contributors

egargo avatar patevs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

pwygit's Issues

Support for environment variable with location name

Will it be possible to support an environment variable (e.g. LOCATION) similar to BROWSER to indicate the location when the positional argument is missing?

Something in the lines of:

LOCATION="New York" pyw

Looking for it for better nnn integration. When I do:

export NNN_HELP= pyw New York

and exec NNN_HELP as a command, I get an error because of the space in New York.

Publish release assets for package building

If you could, I would appreciate it if you could upload zip and/or tar.gz files as releases so this can be built with python-setuptools and installed with a package manager. Please also include the api key in key.py in the compressed assets or add a switch so we can use our own openweathher api keys. Thanks.

Error when fetching weather

With the latest available on pip:

$ wwy kolkata
Traceback (most recent call last):
  File "/usr/local/bin/wwy", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.8/dist-packages/wwy/__main__.py", line 146, in main
    display_weather_info(info)
  File "/usr/local/lib/python3.8/dist-packages/wwy/__main__.py", line 118, in display_weather_info
    for line in ascii:
TypeError: 'NoneType' object is not iterable

name 'light_rain' is not defined

getting the following error:

$ wwy -c kolkata  
Traceback (most recent call last):
  File "/usr/local/bin/wwy", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.8/dist-packages/wwy/__main__.py", line 92, in main
    get_ascii(info)
  File "/usr/local/lib/python3.8/dist-packages/wwy/__main__.py", line 69, in get_ascii
    for i in range(len(light_rain)):
NameError: name 'light_rain' is not defined

Please fix.

Missing ~/.pwrc?

I've used pwy for a while to make a quick check on a sibling living in Japan. I tried it yesterday and got the following

Traceback (most recent call last):
  File "/home/user/.local/bin/pwy", line 8, in <module>
    sys.exit(main())
  File "/home/user/.local/lib/python3.9/site-packages/pwy/cli.py", line 202, in main
    info = get_weather_data(location, unit, lang)
  File "/home/user/.local/lib/python3.9/site-packages/pwy/cli.py", line 35, in get_weather_data
    f"&appid={get_key()}&units={unit}&lang={lang}")
  File "/home/user/.local/lib/python3.9/site-packages/pwy/cli.py", line 20, in get_key
    with open(f"{home}/.pwyrc") as f:
FileNotFoundError: [Errno 2] No such file or directory: '/home/user/.pwyrc'

Obviously missing a .pwyrc, but what should I put there? I don't see it on the github page. I tried uninstalling and reinstalling both via pip3 and cloning the repo. Same issue. Any help appreciated.

NameError: name 'pwy_jsoon' is not defined.

Running on Windows 10 I receive the follow error when attempting to run pwy version 1.4.6:

  File "C:\Users\User\scoop\apps\python\3.10.0\lib\site-packages\pwy\cli.py", line 38, in get_config_data
    data = json.load(pwy_jsoon)
NameError: name 'pwy_jsoon' is not defined. Did you mean: 'pwy_json'?

Invalid API key

Hi, I've created my API key and I've done pwy --config <api-key>, but when I do, say, pwy montreal, I see the following error:

Invalid API key.
Traceback (most recent call last):
  File "/data/dev/pytools/pwy/bin/pwy", line 8, in <module>
    sys.exit(main())
  File "/data/dev/pytools/pwy/lib/python3.9/site-packages/pwy/cli.py", line 202, in main
    info = get_weather_data(location, unit, lang)
  File "/data/dev/pytools/pwy/lib/python3.9/site-packages/pwy/cli.py", line 52, in get_weather_data
    "name": data["name"],
KeyError: 'name'

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.