diff options
| author | CoprDistGit <infra@openeuler.org> | 2023-05-18 05:55:15 +0000 |
|---|---|---|
| committer | CoprDistGit <infra@openeuler.org> | 2023-05-18 05:55:15 +0000 |
| commit | 884092112a469ec51013c113fc9ee6de7ecce759 (patch) | |
| tree | a7fbe0ff29d9d451307995b58ceb60c4eceb3f13 /python-weather-command.spec | |
| parent | 3e1149d56a8f5744b2a88b0b26b32d374045c476 (diff) | |
automatic import of python-weather-command
Diffstat (limited to 'python-weather-command.spec')
| -rw-r--r-- | python-weather-command.spec | 352 |
1 files changed, 352 insertions, 0 deletions
diff --git a/python-weather-command.spec b/python-weather-command.spec new file mode 100644 index 0000000..8f0676e --- /dev/null +++ b/python-weather-command.spec @@ -0,0 +1,352 @@ +%global _empty_manifest_terminate_build 0 +Name: python-weather-command +Version: 6.1.0 +Release: 1 +Summary: Command line weather app +License: MIT +URL: https://github.com/sanders41/weather-command +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/c0/2c/77e9f8eead5d60a7e5fa6861b6d18021751e6b4337f02b63e097e7612892/weather_command-6.1.0.tar.gz +BuildArch: noarch + +Requires: python3-rich +Requires: python3-httpx +Requires: python3-pydantic +Requires: python3-camel-converter[pydantic] +Requires: python3-typer +Requires: python3-tenacity +Requires: python3-pyyaml + +%description +# Weather Command + +[](https://github.com/sanders41/weather-command/actions?query=workflow%3ATesting+branch%3Amain+event%3Apush) +[](https://results.pre-commit.ci/latest/github/sanders41/weather-command/main) +[](https://codecov.io/gh/sanders41/weather-command) +[](https://badge.fury.io/py/weather-command) +[](https://github.com/sanders41/weather-command) + +A command line weather app + +## Installation + +Installation with [pipx](https://github.com/pypa/pipx) is recommended. + +```sh +pipx install weather-command +``` + +Alternatively Weather Command can be installed with pip. + +```sh +pip install weather-command +``` + +## Usage + +First an API key is needed from [OpenWeather](https://openweathermap.org/), A free account is all that +is needed. Once you have your API key create an environment variable named `OPEN_WEATHER_API_KEY` that +constains your API key. + +```sh +export OPEN_WEATHER_API_KEY=your-api-key +``` + +Each time the shell is restarted this variable will be cleared. To avoid this it can be added to your +profile. For example if your shell is zsh the API key can be added to the `~/.zshenv` file. Doing this +will prevent the need to re-add the key each time the shell is started. + +To get the weather for a city: + +```sh +weather city seattle +``` + +Once installed you can also add aliases to your shell to make it quick to get a forecast. For example +if your shell is zsh you can add something like the following to your `~/.zshrc` file: + +```sh +alias we="weather zip 98109 -i --am-pm" +alias wed="weather zip 98109 -i --am-pm -f daily" +alias weh="weather zip 98109 -i --am-pm -f hourly" +``` + +After adding this to the `~/.zshrc` you will need to restart your terminal. After that typing `we` +will get the current forecast, `wed` will get the daily forecast and `weh` will get the hourly forecast. + +## Examples + +- Current Weather + + + +- Current Weather Temp Only + + + +- Daily Weather + + + +- Daily Weather Temp Only + + + +- Hourly Weather + + + +- Hourly Weather Temp Only + + + +## Settings +weather now has the ability to save settings to default certain flags. The list of possible settings can be seen with: + +```sh +weather settings --help +``` +## Contributing + +Contributions to this project are welcome. If you are interesting in contributing please see our [contributing guide](CONTRIBUTING.md) + + +%package -n python3-weather-command +Summary: Command line weather app +Provides: python-weather-command +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-weather-command +# Weather Command + +[](https://github.com/sanders41/weather-command/actions?query=workflow%3ATesting+branch%3Amain+event%3Apush) +[](https://results.pre-commit.ci/latest/github/sanders41/weather-command/main) +[](https://codecov.io/gh/sanders41/weather-command) +[](https://badge.fury.io/py/weather-command) +[](https://github.com/sanders41/weather-command) + +A command line weather app + +## Installation + +Installation with [pipx](https://github.com/pypa/pipx) is recommended. + +```sh +pipx install weather-command +``` + +Alternatively Weather Command can be installed with pip. + +```sh +pip install weather-command +``` + +## Usage + +First an API key is needed from [OpenWeather](https://openweathermap.org/), A free account is all that +is needed. Once you have your API key create an environment variable named `OPEN_WEATHER_API_KEY` that +constains your API key. + +```sh +export OPEN_WEATHER_API_KEY=your-api-key +``` + +Each time the shell is restarted this variable will be cleared. To avoid this it can be added to your +profile. For example if your shell is zsh the API key can be added to the `~/.zshenv` file. Doing this +will prevent the need to re-add the key each time the shell is started. + +To get the weather for a city: + +```sh +weather city seattle +``` + +Once installed you can also add aliases to your shell to make it quick to get a forecast. For example +if your shell is zsh you can add something like the following to your `~/.zshrc` file: + +```sh +alias we="weather zip 98109 -i --am-pm" +alias wed="weather zip 98109 -i --am-pm -f daily" +alias weh="weather zip 98109 -i --am-pm -f hourly" +``` + +After adding this to the `~/.zshrc` you will need to restart your terminal. After that typing `we` +will get the current forecast, `wed` will get the daily forecast and `weh` will get the hourly forecast. + +## Examples + +- Current Weather + + + +- Current Weather Temp Only + + + +- Daily Weather + + + +- Daily Weather Temp Only + + + +- Hourly Weather + + + +- Hourly Weather Temp Only + + + +## Settings +weather now has the ability to save settings to default certain flags. The list of possible settings can be seen with: + +```sh +weather settings --help +``` +## Contributing + +Contributions to this project are welcome. If you are interesting in contributing please see our [contributing guide](CONTRIBUTING.md) + + +%package help +Summary: Development documents and examples for weather-command +Provides: python3-weather-command-doc +%description help +# Weather Command + +[](https://github.com/sanders41/weather-command/actions?query=workflow%3ATesting+branch%3Amain+event%3Apush) +[](https://results.pre-commit.ci/latest/github/sanders41/weather-command/main) +[](https://codecov.io/gh/sanders41/weather-command) +[](https://badge.fury.io/py/weather-command) +[](https://github.com/sanders41/weather-command) + +A command line weather app + +## Installation + +Installation with [pipx](https://github.com/pypa/pipx) is recommended. + +```sh +pipx install weather-command +``` + +Alternatively Weather Command can be installed with pip. + +```sh +pip install weather-command +``` + +## Usage + +First an API key is needed from [OpenWeather](https://openweathermap.org/), A free account is all that +is needed. Once you have your API key create an environment variable named `OPEN_WEATHER_API_KEY` that +constains your API key. + +```sh +export OPEN_WEATHER_API_KEY=your-api-key +``` + +Each time the shell is restarted this variable will be cleared. To avoid this it can be added to your +profile. For example if your shell is zsh the API key can be added to the `~/.zshenv` file. Doing this +will prevent the need to re-add the key each time the shell is started. + +To get the weather for a city: + +```sh +weather city seattle +``` + +Once installed you can also add aliases to your shell to make it quick to get a forecast. For example +if your shell is zsh you can add something like the following to your `~/.zshrc` file: + +```sh +alias we="weather zip 98109 -i --am-pm" +alias wed="weather zip 98109 -i --am-pm -f daily" +alias weh="weather zip 98109 -i --am-pm -f hourly" +``` + +After adding this to the `~/.zshrc` you will need to restart your terminal. After that typing `we` +will get the current forecast, `wed` will get the daily forecast and `weh` will get the hourly forecast. + +## Examples + +- Current Weather + + + +- Current Weather Temp Only + + + +- Daily Weather + + + +- Daily Weather Temp Only + + + +- Hourly Weather + + + +- Hourly Weather Temp Only + + + +## Settings +weather now has the ability to save settings to default certain flags. The list of possible settings can be seen with: + +```sh +weather settings --help +``` +## Contributing + +Contributions to this project are welcome. If you are interesting in contributing please see our [contributing guide](CONTRIBUTING.md) + + +%prep +%autosetup -n weather-command-6.1.0 + +%build +%py3_build + +%install +%py3_install +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +if [ -d usr/lib ]; then + find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/lib64 ]; then + find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/bin ]; then + find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then + find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst +fi +touch doclist.lst +if [ -d usr/share/man ]; then + find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst +fi +popd +mv %{buildroot}/filelist.lst . +mv %{buildroot}/doclist.lst . + +%files -n python3-weather-command -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Thu May 18 2023 Python_Bot <Python_Bot@openeuler.org> - 6.1.0-1 +- Package Spec generated |
