Skip to content

Commit

Permalink
rename ww
Browse files Browse the repository at this point in the history
  • Loading branch information
andygeorge committed Oct 16, 2024
1 parent f9ac22c commit 02ca626
Show file tree
Hide file tree
Showing 13 changed files with 90 additions and 88 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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
{
Expand All @@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
[package]
name = "wthrr"
name = "ww"
version = "1.2.1"
authors = ["Turiiya <[email protected]>"]
authors = ["Turiiya <[email protected]>","Andy George <[email protected]>"]
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"
Expand Down Expand Up @@ -49,5 +49,5 @@ strip = true
lto = true

[[bin]]
name = "wthrr"
name = "ww"
path = "src/main.rs"
32 changes: 16 additions & 16 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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).
</details>

Expand All @@ -105,37 +105,37 @@ 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

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.
1 change: 1 addition & 0 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
83 changes: 42 additions & 41 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,44 +1,44 @@
# 🦀 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)

<div align="center">

[![][preview]][preview]

</div>

`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.<br>
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.<br>
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.
Expand All @@ -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]
Expand All @@ -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
Expand All @@ -98,16 +98,16 @@ Options:
| | |

<sup>\*Rendering and colors are influenced by the terminal used and its theme and font.<br>
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.</sup>
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.</sup>

## 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:**<br>
Lin: `~/.config/weathercrab/`<br>
Mac: `~/Library/Application Support/weathercrab/`<br>
Win: `%USERPROFILE%\AppData\Roaming\weathercrab\`
Lin: `~/.config/ww/`<br>
Mac: `~/Library/Application Support/ww/`<br>
Win: `%USERPROFILE%\AppData\Roaming\ww\`

**Default values**

Expand All @@ -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_ |
| | |
Expand All @@ -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

<a href="https://github.com/ttytm/wthrr-the-weathercrab/graphs/contributors">
<img height='48' src="https://contrib.rocks/image?repo=ttytm/wthrr-the-weathercrab&columns=24" />
<a href="https://github.com/andygeorge/ww/graphs/contributors">
<img height='48' src="https://contrib.rocks/image?repo=andygeorge/ww&columns=24" />
</a>

## Credits
Expand All @@ -188,10 +189,10 @@ A simple changelog can be found on the [releases page](https://github.com/ttytm/

<!-- Images -->

[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
Expand Down
10 changes: 5 additions & 5 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand All @@ -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";
};
});
}
Loading

0 comments on commit 02ca626

Please sign in to comment.