doc:s: add documentation and complete the readme
All checks were successful
build and upload / build (push) Successful in 16s
All checks were successful
build and upload / build (push) Successful in 16s
This commit is contained in:
@@ -25,6 +25,4 @@ jobs:
|
|||||||
uses: christopherhx/gitea-upload-artifact@v4
|
uses: christopherhx/gitea-upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: feddy
|
name: feddy
|
||||||
path: |
|
path: target/release/feddy
|
||||||
target/release/feddy
|
|
||||||
completions.*
|
|
||||||
10
Cargo.lock
generated
10
Cargo.lock
generated
@@ -89,6 +89,15 @@ dependencies = [
|
|||||||
"clap_derive",
|
"clap_derive",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "clap-markdown"
|
||||||
|
version = "0.1.5"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "d2a2617956a06d4885b490697b5307ebb09fec10b088afc18c81762d848c2339"
|
||||||
|
dependencies = [
|
||||||
|
"clap",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "clap_builder"
|
name = "clap_builder"
|
||||||
version = "4.5.37"
|
version = "4.5.37"
|
||||||
@@ -197,6 +206,7 @@ name = "feddy"
|
|||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"clap",
|
"clap",
|
||||||
|
"clap-markdown",
|
||||||
"clap_complete",
|
"clap_complete",
|
||||||
"env_logger",
|
"env_logger",
|
||||||
"log",
|
"log",
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ description = "Your awesome, friendly, lightning-fast, and super-easy-to-use Fed
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
clap = { version = "4.5", features = ["derive", "env", "cargo"] }
|
clap = { version = "4.5", features = ["derive", "env", "cargo"] }
|
||||||
clap_complete = "4.5"
|
clap_complete = "4.5"
|
||||||
|
clap-markdown = "0.1"
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
env_logger = "0.11"
|
env_logger = "0.11"
|
||||||
rust-ini = "0.21"
|
rust-ini = "0.21"
|
||||||
|
|||||||
186
DOCUMENTATION.md
Normal file
186
DOCUMENTATION.md
Normal file
@@ -0,0 +1,186 @@
|
|||||||
|
# Command-Line Help for `feddy`
|
||||||
|
|
||||||
|
This document contains the help content for the `feddy` command-line program.
|
||||||
|
|
||||||
|
**Command Overview:**
|
||||||
|
|
||||||
|
* [`feddy`↴](#feddy)
|
||||||
|
* [`feddy configure-dnf`↴](#feddy-configure-dnf)
|
||||||
|
* [`feddy add-repo`↴](#feddy-add-repo)
|
||||||
|
* [`feddy add-repo vscode`↴](#feddy-add-repo-vscode)
|
||||||
|
* [`feddy add-repo mullvad`↴](#feddy-add-repo-mullvad)
|
||||||
|
* [`feddy add-repo vivaldi`↴](#feddy-add-repo-vivaldi)
|
||||||
|
* [`feddy install-rpm-fusion`↴](#feddy-install-rpm-fusion)
|
||||||
|
* [`feddy configure-groups`↴](#feddy-configure-groups)
|
||||||
|
* [`feddy package`↴](#feddy-package)
|
||||||
|
* [`feddy package common-list`↴](#feddy-package-common-list)
|
||||||
|
* [`feddy package amd-list`↴](#feddy-package-amd-list)
|
||||||
|
* [`feddy package intel-list`↴](#feddy-package-intel-list)
|
||||||
|
* [`feddy package gnome-extra-list`↴](#feddy-package-gnome-extra-list)
|
||||||
|
* [`feddy package firmware-list`↴](#feddy-package-firmware-list)
|
||||||
|
* [`feddy package custom-list`↴](#feddy-package-custom-list)
|
||||||
|
|
||||||
|
## `feddy`
|
||||||
|
|
||||||
|
Your awesome, friendly, lightning-fast, and super-easy-to-use Fedora Buddy !
|
||||||
|
|
||||||
|
**Usage:** `feddy [COMMAND]`
|
||||||
|
|
||||||
|
###### **Subcommands:**
|
||||||
|
|
||||||
|
* `configure-dnf` — Configure dnf
|
||||||
|
* `add-repo` — Add a repository
|
||||||
|
* `install-rpm-fusion` — Install RPM fusion
|
||||||
|
* `configure-groups` — Add groups to a user
|
||||||
|
* `package` — Manage packages
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## `feddy configure-dnf`
|
||||||
|
|
||||||
|
Configure dnf
|
||||||
|
|
||||||
|
**Usage:** `feddy configure-dnf`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## `feddy add-repo`
|
||||||
|
|
||||||
|
Add a repository
|
||||||
|
|
||||||
|
**Usage:** `feddy add-repo <COMMAND>`
|
||||||
|
|
||||||
|
###### **Subcommands:**
|
||||||
|
|
||||||
|
* `vscode` — Add VSCode repository
|
||||||
|
* `mullvad` — Add Mullvad repository
|
||||||
|
* `vivaldi` — Add Vivaldi repository
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## `feddy add-repo vscode`
|
||||||
|
|
||||||
|
Add VSCode repository
|
||||||
|
|
||||||
|
**Usage:** `feddy add-repo vscode`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## `feddy add-repo mullvad`
|
||||||
|
|
||||||
|
Add Mullvad repository
|
||||||
|
|
||||||
|
**Usage:** `feddy add-repo mullvad`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## `feddy add-repo vivaldi`
|
||||||
|
|
||||||
|
Add Vivaldi repository
|
||||||
|
|
||||||
|
**Usage:** `feddy add-repo vivaldi`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## `feddy install-rpm-fusion`
|
||||||
|
|
||||||
|
Install RPM fusion
|
||||||
|
|
||||||
|
**Usage:** `feddy install-rpm-fusion`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## `feddy configure-groups`
|
||||||
|
|
||||||
|
Add groups to a user
|
||||||
|
|
||||||
|
**Usage:** `feddy configure-groups [OPTIONS]`
|
||||||
|
|
||||||
|
###### **Options:**
|
||||||
|
|
||||||
|
* `-u`, `--user <USER>` — The user to add to the groups, current user by default
|
||||||
|
* `-p`, `--print` — Print the groups without changing anything
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## `feddy package`
|
||||||
|
|
||||||
|
Manage packages
|
||||||
|
|
||||||
|
**Usage:** `feddy package [OPTIONS] <COMMAND>`
|
||||||
|
|
||||||
|
###### **Subcommands:**
|
||||||
|
|
||||||
|
* `common-list` — Install/Remove the common list
|
||||||
|
* `amd-list` — Install/Remove the AMD list
|
||||||
|
* `intel-list` — Install/Remove the Intel list
|
||||||
|
* `gnome-extra-list` — Install/Remove the Gnome extra list
|
||||||
|
* `firmware-list` — Install/Remove the firmware list
|
||||||
|
* `custom-list` — Install/Remove a custom list
|
||||||
|
|
||||||
|
###### **Options:**
|
||||||
|
|
||||||
|
* `-r`, `--remove` — Whenever to remove instead of install
|
||||||
|
* `-p`, `--print` — Print packages of the list without changing anything
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## `feddy package common-list`
|
||||||
|
|
||||||
|
Install/Remove the common list
|
||||||
|
|
||||||
|
**Usage:** `feddy package common-list`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## `feddy package amd-list`
|
||||||
|
|
||||||
|
Install/Remove the AMD list
|
||||||
|
|
||||||
|
**Usage:** `feddy package amd-list`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## `feddy package intel-list`
|
||||||
|
|
||||||
|
Install/Remove the Intel list
|
||||||
|
|
||||||
|
**Usage:** `feddy package intel-list`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## `feddy package gnome-extra-list`
|
||||||
|
|
||||||
|
Install/Remove the Gnome extra list
|
||||||
|
|
||||||
|
**Usage:** `feddy package gnome-extra-list`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## `feddy package firmware-list`
|
||||||
|
|
||||||
|
Install/Remove the firmware list
|
||||||
|
|
||||||
|
**Usage:** `feddy package firmware-list`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## `feddy package custom-list`
|
||||||
|
|
||||||
|
Install/Remove a custom list
|
||||||
|
|
||||||
|
**Usage:** `feddy package custom-list --file <FILE>`
|
||||||
|
|
||||||
|
###### **Options:**
|
||||||
|
|
||||||
|
* `-f`, `--file <FILE>` — The file to read the list from
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<hr/>
|
||||||
|
|
||||||
|
<small><i>
|
||||||
|
This document was generated automatically by
|
||||||
|
<a href="https://crates.io/crates/clap-markdown"><code>clap-markdown</code></a>.
|
||||||
|
</i></small>
|
||||||
|
|
||||||
1
Makefile
1
Makefile
@@ -13,6 +13,7 @@ INSTALL_DATA ?= $(INSTALL) -m 644
|
|||||||
|
|
||||||
build:
|
build:
|
||||||
cargo build --release
|
cargo build --release
|
||||||
|
target/release/$(PROJECT) --doc > DOCUMENTATION.md
|
||||||
|
|
||||||
format:
|
format:
|
||||||
cargo fmt --all
|
cargo fmt --all
|
||||||
|
|||||||
37
README.md
37
README.md
@@ -1,3 +1,38 @@
|
|||||||
# feddy
|
# feddy
|
||||||
|
|
||||||
Your awesome, friendly, lightning-fast, and super-easy-to-use Fedora Buddy !
|
Your awesome, friendly, lightning-fast, and super-easy-to-use Fedora Buddy !
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
This project is a command line tool that helps you to manage your Fedora system. You can use it to install or remove package lists, as well as to perform other post installation tasks.
|
||||||
|
|
||||||
|
Please refer to the [DOCUMENTATION.md](DOCUMENTATION.md) file for more information on how to use the tool.
|
||||||
|
|
||||||
|
## Install on Fedora
|
||||||
|
|
||||||
|
Please refer to project's [releases](https://git.rawleenc.dev/rawleenc/feddy/releases), copy the RPM package link of the latest version and install it with dnf.
|
||||||
|
|
||||||
|
## Build from source
|
||||||
|
|
||||||
|
This is a Rust project, so you must first install [Rust](https://www.rust-lang.org/tools/install) and then run the following command to build the project:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
./configure
|
||||||
|
make
|
||||||
|
```
|
||||||
|
|
||||||
|
## Install from source
|
||||||
|
|
||||||
|
You can install the project by running the following command:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo make install
|
||||||
|
```
|
||||||
|
|
||||||
|
## Development
|
||||||
|
|
||||||
|
You can run the project in development mode by running the following command:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cargo run -- ${args}
|
||||||
|
```
|
||||||
@@ -25,6 +25,7 @@ Your awesome, friendly, lightning-fast, and super-easy-to-use Fedora Buddy !
|
|||||||
|
|
||||||
%files
|
%files
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
|
%doc DOCUMENTATION.md
|
||||||
%doc README.md
|
%doc README.md
|
||||||
%{_bindir}/feddy
|
%{_bindir}/feddy
|
||||||
|
|
||||||
|
|||||||
@@ -11,8 +11,11 @@ pub type Result<T> = core::result::Result<T, Box<dyn Error>>;
|
|||||||
#[derive(Parser, Debug, PartialEq)]
|
#[derive(Parser, Debug, PartialEq)]
|
||||||
#[command(name = crate_name!(), author = crate_authors!(), version = crate_version!(), about = crate_description!())]
|
#[command(name = crate_name!(), author = crate_authors!(), version = crate_version!(), about = crate_description!())]
|
||||||
pub struct Cli {
|
pub struct Cli {
|
||||||
#[arg(long = "generate", hide = true, value_enum)]
|
#[arg(long, hide = true, value_enum)]
|
||||||
pub generator: Option<Shell>,
|
pub completion: Option<Shell>,
|
||||||
|
|
||||||
|
#[arg(long, hide = true)]
|
||||||
|
pub doc: bool,
|
||||||
|
|
||||||
#[command(subcommand)]
|
#[command(subcommand)]
|
||||||
pub command: Option<Commands>,
|
pub command: Option<Commands>,
|
||||||
|
|||||||
@@ -8,9 +8,16 @@ fn main() {
|
|||||||
configure_logger();
|
configure_logger();
|
||||||
|
|
||||||
let cli = Cli::parse();
|
let cli = Cli::parse();
|
||||||
|
|
||||||
|
if cli.doc {
|
||||||
|
log::info!("Generating markdown documentation...");
|
||||||
|
clap_markdown::print_help_markdown::<Cli>();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
let mut cmd = Cli::command();
|
let mut cmd = Cli::command();
|
||||||
|
|
||||||
if let Some(generator) = cli.generator {
|
if let Some(generator) = cli.completion {
|
||||||
log::info!("Generating completion file for {generator:?}...");
|
log::info!("Generating completion file for {generator:?}...");
|
||||||
print_completions(generator, &mut cmd);
|
print_completions(generator, &mut cmd);
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user