Command line weather application that queries https://wttr.in/
Find a file
2019-08-29 10:03:26 +02:00
cmw Moving all the needed API calls to easily usable commands 2019-08-29 10:03:25 +02:00
requirements * Adding automatic versioning to the tool. 2019-08-29 10:03:25 +02:00
.gitignore Moving all the needed API calls to easily usable commands 2019-08-29 10:03:25 +02:00
LICENSE Adding BSD License 2019-08-29 10:03:25 +02:00
README.rst Let's make README look beautiful for eye candy 2019-08-29 10:03:26 +02:00
setup.py * Adding automatic versioning to the tool. 2019-08-29 10:03:25 +02:00
setup.sh * Adding automatic versioning to the tool. 2019-08-29 10:03:25 +02:00

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

cmw
===

`cmw` is a command line weather application that queries `wttr.in <https://wttr.in>`_.

Usage
=====

.. code:: text

    $ cmw --help
    usage: cmw [-h] [-L LOCATION] [-f FORMAT] [-l LANG] [-m] [-u] [-M] [-z] [-o]
               [-w] [-A] [-F] [-n] [-q] [-Q] [-N] [-P] [-p] [-T] [-t TRANSPARENCY]
               [--v2] [--version]

    Get the weather!

    optional arguments:
    -h, --help            show this help message and exit
    -L LOCATION, --location LOCATION
                            Location (look at epilog for more information)
    -f FORMAT, --format FORMAT
                            Query formatting
    -l LANG, --lang LANG  The language to use
    -m, --metric          Units: Metric (SI) (default outside US)
    -u, --uscs            Units: USCS (default in US)
    -M, --meter-second    Units: Show wind speed in m/s
    -z, --zero            View: Only current weather
    -o, --one             View: Current weather & one day
    -w, --two             View: Current weather & two days
    -A, --ignore-user-agent
                            View: Force ANSI output format
    -F, --follow-link     View: Show the 'Follow' line from upstream
    -n, --narrow          View: Narrow version
    -q, --quiet           View: Quiet version
    -Q, --super-quiet     View: Super quiet version
    -N, --no-colors       View: Switch terminal sequences off
    -P, --png             PNG: Generate PNG file
    -p, --add-frame       PNG: Add frame around output
    -T, --mid-transparency
                            PNG: Make transparency 150
    -t TRANSPARENCY, --transparency TRANSPARENCY
                            PNG: Set transparency between 0 and 255
    --v2                  v2 interface of the day
    --version             show program's version number and exit

        Supported Location Types
        ------------------------
        City name:                  Paris
        Unicode name:               Москва
        Airport code (3 letters):   muc
        Domain name:                @stackoverflow.com
        Area code:                  94107
        GPS coordinates:            -78.46,106.79

        Special Location
        ----------------
        Moon phase (add ,+US
        or ,+France
        for these cities):          moon
        Moon phase for a date:      moon@2016-10-25

        Supported languages
        -------------------

        Supported: af da de el et fr fa hu id it nb nl pl pt-br ro ru tr uk vi


Example
=======

.. code:: text

    $ cmw -L London -z
    Weather report: london

         \   /     Clear
          .-.      21 °C
       ― (   ) ―   ↑ 19 km/h
          `-      10 km
         /   \     0.0 mm
    Location: London [51.509648,-0.099076]


.. code:: text

    $ cmw -L London -o
    Weather report: london

         \   /     Clear
          .-.      21 °C
       ― (   ) ―   ↑ 19 km/h
          `-      10 km
         /   \     0.0 mm
                                                           ┌─────────────┐
    ┌──────────────────────────────┬───────────────────────┤  Wed 28 Aug ├───────────────────────┬──────────────────────────────┐
    │            Morning           │             Noon      └──────┬──────┘     Evening           │             Night            │
    ├──────────────────────────────┼──────────────────────────────┼──────────────────────────────┼──────────────────────────────┤
    │               Cloudy         │    \  /       Partly cloudy  │    \  /       Partly cloudy  │    \  /       Partly cloudy  │
    │      .--.     22..25 °C      │  _ /"".-.     25 °C          │  _ /"".-.     22 °C          │  _ /"".-.     19 °C          │
    │   .-(    ).   ↗ 12-14 km/h   │    \_(   ).   ↗ 14-17 km/h   │    \_(   ).   ↗ 18-21 km/h   │    \_(   ).   ↗ 15-18 km/h   │
    │  (___.__)__)  10 km          │    /(___(__)  10 km          │    /(___(__)  10 km          │    /(___(__)  10 km          │
    │               0.0 mm | 0%    │               0.0 mm | 0%    │               0.0 mm | 0%    │               0.0 mm | 0%    │
    └──────────────────────────────┴──────────────────────────────┴──────────────────────────────┴──────────────────────────────┘
    Location: London [51.509648,-0.099076]


Advanced Usage
==============

.. code:: text

    $ cmw -L London -f "?format=%l:+%c+%t"
    london: ☀️ +21°C

Please check `wttr.in <https://github.com/chubin/wttr.in>`_ for more information.