Skip to content

Commit

Permalink
optimize cli parser
Browse files Browse the repository at this point in the history
  • Loading branch information
doums committed Sep 1, 2021
1 parent c91d626 commit 0070844
Show file tree
Hide file tree
Showing 6 changed files with 499 additions and 174 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ jobs:
- uses: actions/checkout@v2
- name: Lint
run: cargo clippy
- name: Test
run: cargo test
- name: Build
run: cargo build --release --locked
- name: Release
Expand Down
123 changes: 23 additions & 100 deletions Cargo.lock

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

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[package]
name = "milcheck"
version = "0.2.5"
version = "0.2.6"
authors = ["pierre <[email protected]>"]
license = "MPL-2.0"
edition = "2018"
description = "A small binary that displays the status of your pacman mirrorlist in your terminal"
description = "A simple program that displays the status of your pacman mirrorlist and the Arch Linux lastest news right in your terminal"
repository = "https://github.com/doums/milcheck"
readme = "README.md"
keywords = ["archlinux", "pacman", "mirror", "mirrorlist"]
Expand Down
39 changes: 25 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,28 @@

![milcheck](https://raw.githubusercontent.com/doums/milcheck/master/public/milcheck.png)

A small binary that displays the status of your pacman mirrorlist in your terminal and optionally the lastest news
A simple program that displays the status of your pacman
mirrorlist and the Arch Linux lastest news right in your terminal

### How ?

milcheck just reads your `/etc/pacman.d/mirrorlist` and retrieves the corresponding data from the official [mirror status page](https://www.archlinux.org/mirrors/status/)
Milcheck just reads your `/etc/pacman.d/mirrorlist` and retrieves
the corresponding data from the official
[mirror status page](https://www.archlinux.org/mirrors/status/).

The latest news are directly scraped from https://archlinux.org/.

### Why ?

As explained in the [mirror doc](https://wiki.archlinux.org/index.php/Mirrors),\
before a system upgrade i.e. `sudo pacman -Syu`, you must check that the mirrors in your mirrorlist are up to date e.g. not out of sync.
As explained in the
[mirror doc](https://wiki.archlinux.org/index.php/Mirrors), before
a system upgrade i.e. `sudo pacman -Syu`, you should check that
the mirrors in your mirrorlist are up to date e.g. not out of
sync.

### It's not

..an additional mirrorlist ranking utility

### Install

Rust is a language that compiles to native code and by default statically links all dependencies.\
Simply download the latest [release](https://github.com/doums/milcheck/releases) of the precompiled binary and use it!
(do not forget to make it executable `chmod 755 milcheck`)
..an additional mirrorlist ranking utility.

### Install from [crates.io](https://crates.io/crates/milcheck)

Expand All @@ -37,7 +39,9 @@ cargo install milcheck

### Arch Linux AUR package

milcheck is present as a [package](https://aur.archlinux.org/packages/milcheck) in the Arch User Repository.
Milcheck is present as a
[package](https://aur.archlinux.org/packages/milcheck) in the Arch
User Repository.

### Build from sources

Expand All @@ -51,15 +55,22 @@ to build for release
```
cargo build --release
```
the binary is located under `target/debug` or `target/release`
the binary is located under `target/debug` or `target/release`.

### Pre-built binary

Rust is a language that compiles to native code and by default
statically links. Simply download the pre-built binary from latest
[release](https://github.com/doums/milcheck/releases/latest).

### Usage

```
milcheck
```

you can print the lastest news, handy to stay informed
In addition to the mirrorlist output you can print the Arch Linux
[lastest news](https://archlinux.org/), handy to stay informed:
```
milcheck -n
```
Expand Down
Loading

0 comments on commit 0070844

Please sign in to comment.