diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b16f86f..12de916 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -56,21 +56,21 @@ jobs: - name: Prepare artifacts run: | mkdir "${{ matrix.target }}" - artifact=wthrr-${{ matrix.target }} - binary=wthrr + artifact=ww-${{ matrix.target }} + binary=ww if [[ $RUNNER_OS == "Windows" ]]; then ext=.exe elif [[ $RUNNER_OS == "Linux" ]]; then - mv ./target/appimage/wthrr.AppImage "./${{ matrix.target }}/$artifact.AppImage" - mv ./target/debian/wthrr*.deb "./${{ matrix.target }}/$artifact.deb" + mv ./target/appimage/ww.AppImage "./${{ matrix.target }}/$artifact.AppImage" + mv ./target/debian/ww*.deb "./${{ matrix.target }}/$artifact.deb" fi mv "./target/release/$binary$ext" "./${{ matrix.target }}/$artifact$ext" ls ${{ matrix.target }} - name: Upload artifacts uses: actions/upload-artifact@v4 with: - name: wthrr-${{ matrix.target }} - path: ${{ matrix.target }}/wthrr* + name: ww-${{ matrix.target }} + path: ${{ matrix.target }}/ww* - name: Prepare release if: > github.repository_owner == 'ttytm' @@ -79,7 +79,7 @@ jobs: if [ "$GITHUB_REF_TYPE" == tag ]; then { echo "TAG=$GITHUB_REF_NAME"; - echo "TITLE=wthrr ${GITHUB_REF_NAME:1}"; # v1.0.0 -> wthrr 1.0.0 + echo "TITLE=ww ${GITHUB_REF_NAME:1}"; # v1.0.0 -> ww 1.0.0 } >> "$GITHUB_ENV" else { @@ -102,7 +102,7 @@ jobs: && ((github.ref_name == 'main' && github.event_name == 'push') || github.ref_type == 'tag') uses: softprops/action-gh-release@v2 with: - files: ${{ matrix.target }}/wthrr* + files: ${{ matrix.target }}/ww* tag_name: ${{ env.TAG }} body: ${{ env.BODY }} name: ${{ env.TITLE }} diff --git a/Cargo.lock b/Cargo.lock index c360d23..b1bf87a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1751,7 +1751,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] -name = "wthrr" +name = "ww" version = "1.2.1" dependencies = [ "anyhow", diff --git a/Cargo.toml b/Cargo.toml index 9c56921..8ade369 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,16 +1,16 @@ [package] -name = "wthrr" +name = "ww" version = "1.2.1" -authors = ["Turiiya "] +authors = ["Turiiya ","Andy George "] edition = "2021" license = "MIT" description = "Weather companion for the terminal" readme = "README.md" -homepage = "https://github.com/ttytm/wthrr-the-weathercrab" -repository = "https://github.com/ttytm/wthrr-the-weathercrab" +homepage = "https://github.com/andygeorge/ww" +repository = "https://github.com/andygeorge/ww" keywords = ["cli", "weather", "meteorological", "terminal"] categories = ["command-line-utilities"] -rust-version = "1.74.0" +rust-version = "1.81.0" [dependencies] anyhow = "1.0" @@ -49,5 +49,5 @@ strip = true lto = true [[bin]] -name = "wthrr" +name = "ww" path = "src/main.rs" diff --git a/INSTALL.md b/INSTALL.md index cc702af..b09a951 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -2,11 +2,11 @@ ## Contents -- [Requirements](https://github.com/ttytm/wthrr-the-weathercrab/blob/main/INSTALL.md#requirements) - - [Fonts](https://github.com/ttytm/wthrr-the-weathercrab/blob/main/INSTALL.md#fonts) - - [Other requirements](https://github.com/ttytm/wthrr-the-weathercrab#other-requirements) -- [Alternative installation methods](https://github.com/ttytm/wthrr-the-weathercrab/blob/main/INSTALL.md#alternative-installation-methods) - - [Build from source](https://github.com/ttytm/wthrr-the-weathercrab/blob/main/INSTALL.md#build-from-source) +- [Requirements](https://github.com/andygeorge/ww/blob/main/INSTALL.md#requirements) + - [Fonts](https://github.com/andygeorge/ww/blob/main/INSTALL.md#fonts) + - [Other requirements](https://github.com/andygeorge/ww#other-requirements) +- [Alternative installation methods](https://github.com/andygeorge/ww/blob/main/INSTALL.md#alternative-installation-methods) + - [Build from source](https://github.com/andygeorge/ww/blob/main/INSTALL.md#build-from-source) # Requirements @@ -83,7 +83,7 @@ Noto fonts that add support for Unicode glyphs are usually available via the pac It's enough to install the font, there is no need for configuration changes. > **Note** -> Depending on the used system and terminal another font package might be necessary. If you encounter missing glyphs in the graph: Instead of searching for the correct font package, you can also try setting a different graph style in the [config](https://github.com/ttytm/wthrr-the-weathercrab#config). +> Depending on the used system and terminal another font package might be necessary. If you encounter missing glyphs in the graph: Instead of searching for the correct font package, you can also try setting a different graph style in the [config](https://github.com/andygeorge/ww#config). @@ -105,27 +105,27 @@ It's enough to install the font, there is no need for configuration changes. There are several alternatives to the installation via `cargo`. -- Prebuilt binaries for GNU/Linux, macOS and Windows can be downloaded from the [GitHub release page](https://github.com/ttytm/wthrr-the-weathercrab/releases). +- Prebuilt binaries for GNU/Linux, macOS and Windows can be downloaded from the [GitHub release page](https://github.com/andygeorge/ww/releases). - If you are on NetBSD, a package is available from the official repositories. To install it, simply run ```sh - pkgin install wthrr + pkgin install ww ``` - A Nix flake is also available ```sh - nix profile install "github:ttytm/wthrr-the-weathercrab" + nix profile install "github:andygeorge/ww" ``` ```sh - nix run "github:tobealive/wthrr-the-weathercrab" + nix run "github:andygeorge/ww" ``` -- On Arch Linux, `wthrr` can be installed from the [AUR](https://aur.archlinux.org/packages?O=0&SeB=nd&K=wthrr&outdated=&SB=p&SO=d&PP=50&submit=Go) using an [AUR helper](https://wiki.archlinux.org/title/AUR_helpers). For example: +- On Arch Linux, `ww` can be installed from the [AUR](https://aur.archlinux.org/packages?O=0&SeB=nd&K=ww&outdated=&SB=p&SO=d&PP=50&submit=Go) using an [AUR helper](https://wiki.archlinux.org/title/AUR_helpers). For example: ``` - paru -S wthrr + paru -S ww ``` - On macOS, you can use Homebrew ``` - brew install wthrr + brew install ww ``` ## Build from source @@ -133,9 +133,9 @@ There are several alternatives to the installation via `cargo`. To compile the app yourself, clone the repository and build the release version. ```sh -git clone https://github.com/ttytm/wthrr-the-weathercrab.git -cd wthrr-the-weathercrab +git clone https://github.com/andygeorge/ww.git +cd ww cargo build --release ``` -The resulting `wthrr` binary will be placed in the `./target/release` directory. +The resulting `ww` binary will be placed in the `./target/release` directory. diff --git a/LICENSE b/LICENSE index aa59939..55734dc 100644 --- a/LICENSE +++ b/LICENSE @@ -2,6 +2,7 @@ MIT License Copyright (c) 2022 Turiiya Copyright (c) 2023-2024 wthrr contributors +Copyright (c) 2024+ ww contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 192e151..8a3b8f5 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ -# 🦀 wthrr-the-weathercrab +# ww -[![][ci_shield]](https://github.com/ttytm/wthrr-the-weathercrab/actions/workflows/ci.yml?query=branch%3Amain) -[![][last_commit_shield]](https://github.com/ttytm/wthrr-the-weathercrab/commits/main) -[![][crates_io_shield]](https://crates.io/crates/wthrr) -[![][msrv_shield]](https://github.com/ttytm/wthrr-the-weathercrab) +[![][ci_shield]](https://github.com/andygeorge/ww/actions/workflows/ci.yml?query=branch%3Amain) +[![][last_commit_shield]](https://github.com/andygeorge/ww/commits/main) +[![][crates_io_shield]](https://crates.io/crates/ww) +[![][msrv_shield]](https://github.com/andygeorge/ww)
@@ -11,34 +11,34 @@
-`wthrr` lives in your terminal and her passion is meteorology. +`ww` lives in your terminal and her passion is meteorology. If you spend time in the TUI, you'll have a little companion nearby who knows about the weather. ## Contents -- [How to use?](https://github.com/ttytm/wthrr-the-weathercrab#how-to-use) -- [Showcase](https://github.com/ttytm/wthrr-the-weathercrab#showcase) -- [Config](https://github.com/ttytm/wthrr-the-weathercrab#config) -- [Installation](https://github.com/ttytm/wthrr-the-weathercrab#installation) -- [Outlook](https://github.com/ttytm/wthrr-the-weathercrab#outlook) -- [Credits](https://github.com/ttytm/wthrr-the-weathercrab#credits) +- [How to use?](https://github.com/andygeorge/ww#how-to-use) +- [Showcase](https://github.com/andygeorge/ww#showcase) +- [Config](https://github.com/andygeorge/ww#config) +- [Installation](https://github.com/andygeorge/ww#installation) +- [Outlook](https://github.com/andygeorge/ww#outlook) +- [Credits](https://github.com/andygeorge/ww#credits) ## How to use? **Just call** ``` -wthrr +ww ``` -Without having added an address or options, wthrr uses the [config](https://github.com/ttytm/wthrr-the-weathercrab#config) saved as default.
-If you haven't configured anything as default yet, wthrr can try to search for a weather station near you and save the searched location as default. +Without having added an address or options, ww uses the [config](https://github.com/andygeorge/ww#config) saved as default.
+If you haven't configured anything as default yet, ww can try to search for a weather station near you and save the searched location as default. **It's always possible to specify an address.** E.g., ``` -wthrr melbourne +ww melbourne ``` Depending on the place you are looking for, you might need to be more specific. @@ -48,21 +48,21 @@ If the address contains spaces, separate them with a hyphen or enclose them in q To search explicitly for a weather station in the vicinity, call ``` -wthrr auto +ww auto ``` -As a final example, we instruct wthrr to use Fahrenheit and mph as units and add the hourly forecast for the day +As a final example, we instruct ww to use Fahrenheit and mph as units and add the hourly forecast for the day ``` -wthrr -u f,mph -f d +ww -u f,mph -f d ``` ### Find further usage parameters in the help information ``` -> wthrr -h +> ww -h -Usage: wthrr [OPTIONS] [ADDRESS] +Usage: ww [OPTIONS] [ADDRESS] Arguments: [ADDRESS] @@ -80,7 +80,7 @@ Options: -s, --save Save the supplied values as default -r, --reset - Wipe wthrr's configuration data + Wipe ww's configuration data -h, --help Print help -V, --version @@ -98,16 +98,16 @@ Options: | | | \*Rendering and colors are influenced by the terminal used and its theme and font.
-E.g., the first of the above screenshots show wthrr in nvim(toggleterm) using kitty as terminal with a Dracula theme and JetBrainsMono Nerd font. The last screenshot shows wthrr in Yakuake/Konsole, also with a Dracula color scheme.
+E.g., the first of the above screenshots show ww in nvim(toggleterm) using kitty as terminal with a Dracula theme and JetBrainsMono Nerd font. The last screenshot shows ww in Yakuake/Konsole, also with a Dracula color scheme. ## Config -The address, units and default forecast can be saved as default values in wthrr's config file by adding the `-s` flag to a run. This will save the config in `wthrr.ron`. +The address, units and default forecast can be saved as default values in ww's config file by adding the `-s` flag to a run. This will save the config in `ww.ron`. **Platform locations:**
-Lin: `~/.config/weathercrab/`
-Mac: `~/Library/Application Support/weathercrab/`
-Win: `%USERPROFILE%\AppData\Roaming\weathercrab\` +Lin: `~/.config/ww/`
+Mac: `~/Library/Application Support/ww/`
+Win: `%USERPROFILE%\AppData\Roaming\ww\` **Default values** @@ -132,21 +132,22 @@ Win: `%USERPROFILE%\AppData\Roaming\weathercrab\` rowspan: double, // Graph height: `double` | `single` time_indicator: true, // Indication of the current time in the graph: `true` | `false` ), - greeting: true, // Display greeting message: `true` | `false` + greeting: false, // Display greeting message: `true` | `false` ), ) ``` ## Installation -Use rusts package manger to install wthrr. +Use rusts package manger to install ww. + **From crates.io** | | | | ----------- | --------------------- | | **Version** | **Command** | -| release | `cargo install wthrr` | +| release | `cargo install ww` | | | | | development | _not available_ | | | | @@ -156,28 +157,28 @@ Use rusts package manger to install wthrr. | | | | ----------- | --------------------------------------------------------------------------------- | | **Version** | **Command** | -| release | `cargo install --git https://github.com/ttytm/wthrr-the-weathercrab --tag v1.1.1` | +| release | `cargo install --git https://github.com/andygeorge/ww --tag v1.1.1` | | | | -| development | `cargo install --git https://github.com/ttytm/wthrr-the-weathercrab` | +| development | `cargo install --git https://github.com/andygeorge/ww` | | | | -**Requirements and alternative, platform-specific installation instructions can be found in [`INSTALL.md`](https://github.com/ttytm/wthrr-the-weathercrab/blob/main/INSTALL.md).** +**Requirements and alternative, platform-specific installation instructions can be found in [`INSTALL.md`](https://github.com/andygeorge/ww/blob/main/INSTALL.md).** > **Important** > To display symbols correctly, the used terminal must be configured to use a NerdFont. ## Outlook -The [issues](https://github.com/ttytm/wthrr-the-weathercrab/issues) section lists some of the features that are being worked on. +The [issues](https://github.com/andygeorge/ww/issues) section lists some of the features that are being worked on. Contributions like 🐛bug reports, ⭐️stars and 💡suggestions are welcome alike! -A simple changelog can be found on the [releases page](https://github.com/ttytm/wthrr-the-weathercrab/releases). +A simple changelog can be found on the [releases page](https://github.com/andygeorge/ww/releases). ## Contributors - - + + ## Credits @@ -188,10 +189,10 @@ A simple changelog can be found on the [releases page](https://github.com/ttytm/ -[preview]: https://github.com/ttytm/wthrr-the-weathercrab/assets/34311583/58780205-816b-4cfd-95f8-9453e754eb94 -[crates_io_shield]: https://img.shields.io/crates/v/wthrr?style=flat-square&color=DEA584 -[ci_shield]: https://img.shields.io/github/actions/workflow/status/ttytm/wthrr-the-weathercrab/ci.yml?branch=main&style=flat-square -[last_commit_shield]: https://img.shields.io/github/last-commit/ttytm/wthrr-the-weathercrab?style=flat-square +[preview]: https://github.com/andygeorge/ww/assets/34311583/58780205-816b-4cfd-95f8-9453e754eb94 +[crates_io_shield]: https://img.shields.io/crates/v/ww?style=flat-square&color=DEA584 +[ci_shield]: https://img.shields.io/github/actions/workflow/status/andygeorge/ww/ci.yml?branch=main&style=flat-square +[last_commit_shield]: https://img.shields.io/github/last-commit/andygeorge/ww?style=flat-square [msrv_shield]: https://img.shields.io/badge/MSRV-1.74.0-DEA584?style=flat-square [first_run]: https://user-images.githubusercontent.com/34311583/219735581-8036590f-8354-47fb-a31f-055be79c9229.png [hourly_forecast]: https://user-images.githubusercontent.com/34311583/219735474-d8e2899d-c209-46d3-a5cd-bea4ed41ac3c.png diff --git a/flake.nix b/flake.nix index 199bd2a..74c1de6 100644 --- a/flake.nix +++ b/flake.nix @@ -16,14 +16,14 @@ }: flake-utils.lib.eachDefaultSystem (system: let pkgs = nixpkgs.legacyPackages.${system}; - wthrr-the-weathercrab = { + ww = { lib, openssl, pkg-config, rustPlatform, }: rustPlatform.buildRustPackage { - name = "wthrr-the-weathercrab"; + name = "ww"; src = lib.cleanSource ./.; cargoLock.lockFile = ./Cargo.lock; nativeBuildInputs = [ @@ -40,15 +40,15 @@ meta = with lib; { license = licenses.mit; - homepage = "https://github.com/ttytm/wthrr-the-weathercrab"; + homepage = "https://github.com/andygeorge/ww"; platforms = platforms.all; }; }; in { - packages.default = pkgs.callPackage wthrr-the-weathercrab {}; + packages.default = pkgs.callPackage ww {}; apps.default = { type = "app"; - program = "${self.outputs.packages.${system}.default}/bin/wthrr"; + program = "${self.outputs.packages.${system}.default}/bin/ww"; }; }); } diff --git a/src/modules/args.rs b/src/modules/args.rs index 9444752..4f5e685 100644 --- a/src/modules/args.rs +++ b/src/modules/args.rs @@ -31,7 +31,7 @@ pub struct Cli { #[arg(short, long, action, group = "config_file_action")] pub save: bool, - /// Wipe wthrr's configuration data + /// Wipe ww's configuration data #[arg(short, long, action, group = "config_file_action")] pub reset: bool, } diff --git a/src/modules/config.rs b/src/modules/config.rs index 951b7b0..4fc4996 100644 --- a/src/modules/config.rs +++ b/src/modules/config.rs @@ -45,8 +45,8 @@ impl Default for Config { } } -pub const CONFIG_DIR_NAME: &str = "weathercrab"; -const CONFIG_FILE_NAME: &str = "wthrr.ron"; +pub const CONFIG_DIR_NAME: &str = "ww"; +const CONFIG_FILE_NAME: &str = "ww.ron"; impl Config { pub fn get() -> Self { diff --git a/src/modules/display/gui_config.rs b/src/modules/display/gui_config.rs index e4e5b26..700b0e4 100644 --- a/src/modules/display/gui_config.rs +++ b/src/modules/display/gui_config.rs @@ -31,7 +31,7 @@ impl Default for Gui { border: BorderStyle::default(), color: ColorVariant::default, graph: GraphOpts::default(), - greeting: true, + greeting: false, } } } diff --git a/src/modules/localization.rs b/src/modules/localization.rs index 9ff9693..0e923f2 100644 --- a/src/modules/localization.rs +++ b/src/modules/localization.rs @@ -102,7 +102,7 @@ impl Default for ConfigLocales { deny: "No, dont ask me again".to_string(), always_auto: "Always check for a weather station".to_string(), save_as_default: "Would you like to use this as your default?".to_string(), - reset_config: "This will wipe wthrr's configuration. Continue?".to_string(), + reset_config: "This will wipe ww's configuration. Continue?".to_string(), no_selection: "User did not select anything or exited".to_string(), } } diff --git a/src/modules/location.rs b/src/modules/location.rs index aa2e6b9..918e7a3 100644 --- a/src/modules/location.rs +++ b/src/modules/location.rs @@ -67,7 +67,7 @@ impl From<&OpenMeteoGeoObj> for Location { impl Location { pub async fn get(address: &str, lang: &str) -> Result { - let client = Client::builder().user_agent("wthrr-the-weathercrab").build()?; + let client = Client::builder().user_agent("ww").build()?; let results = Self::search_osm(&client, address, lang).await; match results { diff --git a/wthrr.ron b/ww.ron similarity index 81% rename from wthrr.ron rename to ww.ron index a4a2363..1f1d828 100644 --- a/wthrr.ron +++ b/ww.ron @@ -1,7 +1,7 @@ -/* Configuration for wthrr the weathercrab, your weather companion for the terminal -Lin: ~/.config/weathercrab/ -Mac: ~/Library/Application Support/weathercrab/ -Win: %USERPROFILE%\AppData\Roaming\weathercrab\ +/* Configuration for `ww`, your weather companion for the terminal +Lin: ~/.config/ww/ +Mac: ~/Library/Application Support/ww/ +Win: %USERPROFILE%\AppData\Roaming\ww\ */ ( @@ -24,6 +24,6 @@ Win: %USERPROFILE%\AppData\Roaming\weathercrab\ rowspan: double, // Graph height: `double` | `single` time_indicator: true, // Indication of the current time in the graph: `true` | `false` ), - greeting: true, // Display greeting message: `true` | `false` + greeting: false, // Display greeting message: `true` | `false` ), )