Skip to content

Commit

Permalink
docs: Add readme to doc.rs pages and fix doc lints
Browse files Browse the repository at this point in the history
  • Loading branch information
Nukesor committed May 30, 2024
1 parent b620e53 commit bd977b7
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 30 deletions.
7 changes: 7 additions & 0 deletions pueue/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Pueue

These are the internal library files that **shouldn't** be used by anything but `pueue` itself.

If you're looking for a way to install the `pueue` binaries, please refer to [Pueue's crates.io page](https://crates.io/crates/pueue) or the [Github repository](https://github.com/nukesor/pueue).

If you're looking for a way to programatically interface with `pueue` via Rust code, please take a look at the [`pueue_lib`](https://docs.rs/pueue-lib/latest/pueue_lib/)
4 changes: 2 additions & 2 deletions pueue/src/client/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ pub enum SubCommand {
#[arg(short, long, conflicts_with = "immediate")]
stashed: bool,

/// Prevents the task from being enqueued until <delay> elapses. See "enqueue" for accepted formats.
/// Prevents the task from being enqueued until 'delay' elapses. See "enqueue" for accepted formats.
#[arg(name = "delay", short, long, conflicts_with = "immediate", value_parser = parse_delay_until)]
delay_until: Option<DateTime<Local>>,

Expand Down Expand Up @@ -126,7 +126,7 @@ pub enum SubCommand {
/// Enqueue these specific tasks.
task_ids: Vec<usize>,

/// Delay enqueuing these tasks until <delay> elapses. See DELAY FORMAT below.
/// Delay enqueuing these tasks until 'delay' elapses. See DELAY FORMAT below.
#[arg(name = "delay", short, long, value_parser = parse_delay_until)]
delay_until: Option<DateTime<Local>>,
},
Expand Down
2 changes: 1 addition & 1 deletion pueue/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// This lint is generating way too many false-positives.
// Ignore it for now.
#![allow(clippy::assigning_clones)]

#![doc = include_str!("../README.md")]
pub mod client;
pub mod daemon;
21 changes: 8 additions & 13 deletions pueue_lib/README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,18 @@
# Pueue-lib

[![GitHub Actions Workflow](https://github.com/nukesor/pueue/workflows/Test%20build/badge.svg)](https://github.com/Nukesor/pueue/actions)
[![Test Build](https://github.com/Nukesor/pueue/actions/workflows/test.yml/badge.svg)](https://github.com/Nukesor/pueue/actions/workflows/test.yml)
[![Crates.io](https://img.shields.io/crates/v/pueue-lib)](https://crates.io/crates/pueue-lib)
[![docs](https://docs.rs/pueue-lib/badge.svg)](https://docs.rs/pueue-lib/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)


This is the shared library used by the [Pueue](https://github.com/nukesor/pueue/) client and daemon.

It can also be used by third-party software to, for instance, to communicate with the Pueue daemon.

## Contributing

Feature requests and pull requests are very much appreciated and welcome!

Anyhow, please talk to me a bit about your ideas before you start hacking!
It's always nice to know what you're working on and I might have a few suggestions or tips :)

There's also the [Architecture Guide](https://github.com/Nukesor/pueue/blob/main/ARCHITECTURE.md), which is supposed to give you a brief overview and introduction to the project.
It contains common components such as:

Copyright &copy; 2019-2022 Arne Beer ([@Nukesor](https://github.com/Nukesor))
- Everything about the [Task](task::Task), [TaskResult](task::TaskResult) etc.
- The [State](state::State), which represents the current state of the daemon.
- Network code. Everything you need to communicate with the daemon.
- Other helper code and structs.

Pueue-lib is a stand-alone crate, so it can be used by third-party applications to either
manipulate or monitor the daemon or to simply write your own front-end for the daemon.
12 changes: 1 addition & 11 deletions pueue_lib/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,4 @@
//! Pueue-lib is a shared library used by the `pueue` and `pueued` binary.
//!
//! It contains common components such as:
//!
//! - Everything about the [Task](task::Task), [TaskResult](task::TaskResult) etc.
//! - The [State](state::State), which represents the current state of the daemon.
//! - Network code. Everything you need to communicate with the daemon.
//! - Other helper code and structs.
//!
//! Pueue-lib is a stand-alone crate, so it can be used by third-party applications to either
//! manipulate or monitor the daemon or to simply write your own front-end for the daemon.
#![doc = include_str!("../README.md")]

/// Shared module for internal logic!
/// Contains helper for command aliasing.
Expand Down
4 changes: 2 additions & 2 deletions pueue_lib/src/network/message.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ pub struct TaskToRestart {
pub path: Option<PathBuf>,
/// Restart the task with an updated label.
pub label: Option<String>,
/// Cbor cannot represent Option<Option<T>> yet, which is why we have to utilize a
/// Cbor cannot represent `Option<Option<T>>` yet, which is why we have to utilize a
/// boolean to indicate that the label should be released, rather than an `Some(None)`.
pub delete_label: bool,
/// Restart the task with an updated priority.
Expand Down Expand Up @@ -236,7 +236,7 @@ pub struct EditMessage {
pub command: Option<String>,
pub path: Option<PathBuf>,
pub label: Option<String>,
/// Cbor cannot represent Option<Option<T>> yet, which is why we have to utilize a
/// Cbor cannot represent `Option<Option<T>>` yet, which is why we have to utilize a
/// boolean to indicate that the label should be released, rather than an `Some(None)`.
pub delete_label: bool,
pub priority: Option<i32>,
Expand Down
2 changes: 1 addition & 1 deletion pueue_lib/src/network/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
//! serialization and deserialization for you.
//!
//! The payloads itself are defined via the `Message` enum that can be found in the
//! [message](crate::network::message) module.
//! crate::network::message module.
//!
//! The serialization/deserialization format that's used by `pueue_lib` is `cbor`.
//!
Expand Down

0 comments on commit bd977b7

Please sign in to comment.