{"id":25518593,"url":"https://github.com/beee33/weathercli","last_synced_at":"2025-07-21T00:33:27.839Z","repository":{"id":276071967,"uuid":"927917142","full_name":"beee33/weatherCLI","owner":"beee33","description":"Get verbose weather from NOAA through the command line!","archived":false,"fork":false,"pushed_at":"2025-03-28T02:12:45.000Z","size":110,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-11T00:05:27.314Z","etag":null,"topics":["linux","linux-command","pyinstaller","python3","sun","weather","weather-cli","weather-forecast"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/beee33.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-02-05T18:53:30.000Z","updated_at":"2025-03-28T02:12:49.000Z","dependencies_parsed_at":"2025-04-11T00:05:29.006Z","dependency_job_id":"3e8c10cf-ba28-43a9-a5aa-436e48199823","html_url":"https://github.com/beee33/weatherCLI","commit_stats":null,"previous_names":["beee33/weathercli","beee33/weathertui","beee33/myweathercli"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/beee33/weatherCLI","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beee33%2FweatherCLI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beee33%2FweatherCLI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beee33%2FweatherCLI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beee33%2FweatherCLI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/beee33","download_url":"https://codeload.github.com/beee33/weatherCLI/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beee33%2FweatherCLI/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266221360,"owners_count":23894966,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["linux","linux-command","pyinstaller","python3","sun","weather","weather-cli","weather-forecast"],"created_at":"2025-02-19T16:54:01.206Z","updated_at":"2025-07-21T00:33:27.822Z","avatar_url":"https://github.com/beee33.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# weatherCLI\n\nweatherCLI is a Linux command line UI based application that shows the user the weather and sun information from the National Weather Service written in Python. \nBecause of this, weatherCLI is only available in the United States, and its territories, However, the sun calculation is worldwide.\n\n\u003cimg src=\"https://github.com/user-attachments/assets/eb9a932e-d8c4-4070-9cf4-cd73e49b40bb\" width=\"100%\" \u003e\u003c/img\u003e\n\n\n\nApplication for generating weather using data from NOAA\n-------------------------------------------------------\nhttps://www.noaa.gov/\n\u003cbr\u003e\nhttps://weather.gov/\n\u003cbr\u003e\n\nAPI for sun information from Astronomical Applications Department\n-----------------------------------------------------------------\nhttps://aa.usno.navy.mil/data/api\n\u003cbr\u003e\nhttps://aa.usno.navy.mil/api/\n\u003cbr\u003e\n\nGeocoding for latitude and longitude using data from OpenStreetMap\n------------------------------------------------------------------\n\n\nhttps://nominatim.openstreetmap.org/\n\u003cbr\u003e\nhttps://openstreetmap.org/copyright   \n\u003cbr\u003e\n\n\n## What kind of data can the application show:\n\n\nHuman readable worded weather from NOAA's API (example: Partly cloudy, with a low around 32. West wind 5 to 14 mph):\n- Both day and night are unique\n- Up to one week forecast\n\n\nGraphs:\n- Precipitation type \u0026 Probability \n- Daily low\n- Daily high\n\n\nSun data:\n- Sunrise\n- Sunset\n- Solar noon\n- Moon info\n\n\nLive data from the location’s nearest weather station:\n- Temperature\n- Humidity\n- Visibility\n- Dew point\n- Name of station\n- Wind direction\n- Sustained wind speed\n- Wind gusts (will show NA knots if no gusts)\n- Local station url if you want to get more information:\n\n\nweather warnings (example: Frost Advisory, Winter Storm Warning or Severe Thunderstorm Warning) \n\n\n\n## How does weatherCLI get its data?\n\nThe National Weather Service allows you to generate XML files showing weather data from a specific longitude and latitude. This program reads those XML files and presents them to the user as readable data. To get the sun positions, the program uses the US Navy's API for getting sun info expressed in json, and prints the result out on terminal.\n\n## Supported operating systems\n| OS           | Supported?                     |\n| :----------- | :--------------:               |\n| Debian       | :white_check_mark:             | \n| Ubuntu       | :white_check_mark:             |\n| Fedora | :white_check_mark:    |\n| Arch | :white_check_mark:  |\n| Mint | :large_orange_diamond: |\n| Pop OS | :large_orange_diamond: |\n| EndeavourOS | :large_orange_diamond: |\n| Windows      | :x: |\n\n\n:white_check_mark:: Supported\n\u003cbr\u003e\n:large_orange_diamond:: Untested\n\u003cbr\u003e\n:x:: Broken\n\n## Download\n\n### from installer:\n\n#### 1. Dependencys: wget\n\nCan be installed from almost all package managers:\n\nDebian/Ubuntu/Mint:\n\n    sudo apt install wget\n\nArch:\n\n    pacman -S wget\n\nFedora\n\n    sudo dnf install wget\n    \n*may already be installed\n    \n#### 2. download installer script:\n\n    wget https://raw.githubusercontent.com/beee33/weatherCLI/main/installer.sh \n#### 3. run script:\n\n    sudo sh installer.sh\n\n### Only run python file instead:\n\n#### 1. download repo and download dependencies\n\n[Follow Build from source instructuions until the end of step 4](#build-from-source)\n\n\n#### 2. Run python fille\n\n    python3 main.py\n\n### Build from source:\n\n#### 1. Install git\n\nInstructions to install git are on: [Git's website](\u003chttps://git-scm.com/book/en/v2/Getting-Started-Installing-Git\u003e)\nhowever you can just use:\n\nDebian/Ubuntu/Mint:\n\n    sudo apt install git\n\nFedora\n\n    sudo dnf install git\n\n#### 2. download repo\n\n    git clone \"https://github.com/beee33/weatherCLI\"\n\n#### Configure venv\n\n#### 3. cd into weatherCLI directory\n\n    cd weatherCLI\n\n#### 4a. Recommended: use python venv \n\nCreate new virtual enviroment using python's venv\n\n    python3 -m venv \u003cname\u003e\n\nEnter venv\n\n    \n    source \u003cname\u003e/bin/activate\n*Note: if venv works, your shell should have (\u0026lt;name\u0026gt;) in prompt\nInstall dependencys\n\n    python3 -m pip install -r requirements.txt\n\u003cbr\u003e\n\u003cbr\u003e\n\n#### 4b. Not recommended: run without venv\n:exclamation: some Operating Systems eg: Debian, dont like you to install packages in the default python environment, as it may override system packages that are needed. I have bricked a VM by doing this.\n\u003cbr\u003e\n\u003cbr\u003e\nInstall dependencys\n\n    python3 -m pip install -r requirements.txt\n\n\n\u003cbr\u003e\n\u003cbr\u003e\n\n#### 5. install pyinstaller\n\n    pip install pyinstaller\n\nor\n\n    python3 -m pip install pyinstaller\n\n*Note, you may have to use a virtual enviroment for some systems. You can use something like pyenv to create instances of python with diffrent versions: https://github.com/pyenv/pyenv \n\u003cbr\u003e\nFor this program I would reccomend using python 3.10, as that is what version this program is written for. If not, try to rename all instances of it to your python version\n\n\n\n\n\n#### 6. compile to standalone binary if you use venv\n\nThis adds the new venv site packages path to pyinstaller, so it can use it. You should replace python3.10 with your python version eg python3.11\n    \n    pyinstaller main.py --onefile --paths \"\u003cname\u003e/lib/python3.10/site-packages\"\n\n\nLeave virtual enviroment\n\n    deactivate\n\n\u003cbr\u003e\n\u003cbr\u003e\n\n#### 7. compile to standalone binary if you dont use venv\n\n    pyinstaller main.py --onefile\n\n\u003cbr\u003e\n\u003cbr\u003e\n\u003cbr\u003e\n\u003cbr\u003e\n\n#### 8. Copy the new binary to the bin directory so it can be accessed by users\n    sudo cp dist/main /usr/bin/weatherCLI\n\n#### 9. Change perms so that any user can access it,but not modify it's code\n    sudo chmod 755 /usr/bin/weatherCLI\n\n#### 10. make the data directory\n    sudo mkdir /etc/weatherCLI\n\n#### 11a. change access to all users\n\n    sudo chmod 777 -R /etc/weatherCLI\n\n**_*note this directory and its subdirectorys is intended to be accessible for all users_**\n\n#### 11b. if you only want people with sudo perms to access it:\n\n    sudo chmod 711 -R /etc/weatherCLI\n\n\n\n#### potental problems with compiling\n\n\n\nif you get the error: \"[PYI-1890462:ERROR] Failed to load Python shared library '/tmp/_MEIWYQO9N/libpython3.10.so': dlopen: /tmp/_MEIWYQO9N/libpython3.10.so: cannot open shared object file: No such file or directory\"\n\nThis command fixes that so pyinstaller knows python's path.\nThis should be replaced with your python version and the temp directory may be diffrent, I was using python 3.10.\n\n    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/python3.10\n\n#### generating requiremnts.txt\ninstall dependencies\n\n    pip install pipreqs\n\nrun pipreqs, after executing, it will generate a reqirements.txt file in your project directory\n\n*Note: --scan-notebooks I am running this in a Jupyter Notebook, so the program will scan for files there, you can remove this if you are not using Jupyter Notebooks.\n\n*Note: --force, Use this to override previous reqirements.txt files, you dont need this if you are not overriding any files.\n\n    pipreqs \u003cproject directory\u003e --force --scan-notebooks\n\nTest if it works, by following steps: 3 4a/4b:\n\n[Run progam as python file](#user-content-3-cd-into-weathercli-directory)\n\n##### If you get bs4.FeatureNotFound: Couldn't find a tree builder with the features you requested: xml. Do you need to install a parser library? error.\nThis is because the reqirements.txt file misses a required library that BeautfulSoup uses. Add missing library.\n\n    echo \"lxml==5.3.1\" \u003e\u003e requirements.txt \n    \n## How does weatherCLI know the location?\n\nWeathterCLI uses OpenStreetMaps’s geocoding API to get latitude and longitude positions from user input. It converts the latitude and longitude into a url that has the XML data. This url is stored in “/etc/weatherCLI/\u0026lt;towns/zipcode/places\u0026gt;/\u0026lt;queryname\u0026gt;/url.txt” an example is: “/etc/weatherCLI/towns/Boston\\ MA/url.txt”.  The data for the sun positions are only calculated once per day per location, and the output is put in a file so that the user doesn't have to recalculate the same sun data for each day. All of the urls and sun data is stored in “/etc/weatherCLI/”\n\n# CLI examples:\n\u003cbr\u003e\n\n    weatherCLI \"city:Boston MA\" -t most -s \n\n\u003cimg src=\"https://github.com/user-attachments/assets/24a22a27-4192-432b-adff-5109ccf5ceaf\" width=\"100%\" \u003e\u003c/img\u003e\n-----------------\n\n    weatherCLI \"poi:Rochester Institute of Technology\" -t most\n\u003cimg src=\"https://github.com/user-attachments/assets/e9955d3a-bd70-4731-a5d7-b129e0f2eeea\" width = \"100%\"\u003e\u003c/img\u003e\n-----------------\n\n    weatherCLI \"zip:10001\" -t most -s \n\u003cimg src=\"https://github.com/user-attachments/assets/4770f279-50a9-418a-8fe1-b2222a0430f5\" width = \"100%\"\u003e\u003c/img\u003e\n-----------------\n\n    weatherCLI \"city:Palm Beach FL\" -t all -s \n\u003cimg src=\"https://github.com/user-attachments/assets/31e768aa-64ec-4379-a70b-2972c2a859dc\" width = \"100%\"\u003e\u003c/img\u003e\n-----------------\n\n    weatherCLI \"city:Seattle WA\" -t24 -t onlysun\n\u003cimg src=\"https://github.com/user-attachments/assets/d42893ca-a9ac-4d9e-8e21-eeacacc07755\" width = \"100%\"\u003e\u003c/img\u003e\n-----------------\n\n    weatherCLI \"city:Salt Lake City UT\" -t onlyworded\n\u003cimg src=\"https://github.com/user-attachments/assets/1cc6b228-3e84-417f-9105-aaf94733fe82\" width = \"100%\"\u003e\u003c/img\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeee33%2Fweathercli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbeee33%2Fweathercli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeee33%2Fweathercli/lists"}