fp_appimage_updater/lib.rs
1//! Declarative AppImage manager.
2//!
3//! `fp-appimage-updater` keeps a set of AppImages current from a tree of YAML
4//! recipes, without root, without a GUI, and without a database. You describe
5//! each application and where its updates come from; the tool resolves versions,
6//! downloads what is newer, and integrates the result into your desktop menu,
7//! icons and `PATH`.
8//!
9//! # Getting started
10//!
11//! ```bash
12//! # Write the global config
13//! fp-appimage-updater init --global
14//!
15//! # Scaffold a recipe for an app published as a GitHub release
16//! fp-appimage-updater init --app hydra-launcher --strategy forge
17//!
18//! # Confirm the recipe parses, then see whether anything is newer
19//! fp-appimage-updater validate
20//! fp-appimage-updater check
21//!
22//! # Install it
23//! fp-appimage-updater update
24//! ```
25//!
26//! # How it fits together
27//!
28//! * [`cli`] parses arguments and, more importantly, carries the user-facing
29//! documentation for every command in its doc comments.
30//! * [`config`] holds the shapes of `config.yml` and of an app recipe. The doc
31//! comments on its fields are the published configuration reference.
32//! * [`parser`] finds and reads that YAML; [`validator`] checks it.
33//! * [`resolvers`] decide what the newest version is: a forge release, a direct
34//! URL checked by ETag or Last-Modified, or a script you supply.
35//! * [`downloader`] fetches it, through a delta path, segmented range requests,
36//! or a plain download.
37//! * [`integrator`] extracts the `.desktop` entry and icon and installs them;
38//! [`disintegrator`] reverses that.
39//! * [`update`] orchestrates all of the above concurrently; [`state`] remembers
40//! what was installed.
41//!
42//! # Where the documentation lives
43//!
44//! The command reference is the doc comments in [`cli`]; the configuration
45//! reference is the doc comments in [`config`]. Those same comments are
46//! rendered as `--help`, as a man page, and on
47//! [docs.rs](https://docs.rs/fp-appimage-updater). There is no separate
48//! documentation tree to drift out of date — see [`help`] for how the three
49//! are derived from one source.
50
51// The command reference (`cli`), the configuration reference (`config`), the
52// help machinery (`help`) and the diagnostics (`doctor`) are this project's
53// documentation, and each of those modules turns on `missing_docs` for itself.
54// `build.rs` additionally fails the build if a command's doc comment is
55// missing the sections that `--help` and the man page render.
56//
57// The remaining modules are implementation detail that happens to be `pub` so
58// the integration tests can reach it. Documenting every one of those fields
59// would be volume, not reference, so the lint is not applied there.
60
61pub mod cli;
62pub mod commands;
63
64/// Configuration types, and the published configuration reference.
65///
66/// [`config::GlobalConfig`] is `config.yml`. [`config::AppConfig`] is one application recipe.
67/// [`config::StrategyConfig`] says where an application's updates come from.
68///
69/// The doc comments on the fields here are the reference: `build.rs` renders
70/// their first sentences into the man page's key list, and rustdoc renders the
71/// rest on [docs.rs](https://docs.rs/fp-appimage-updater). Editing those
72/// comments is how you change the documentation.
73pub mod config;
74pub mod disintegrator;
75pub mod doctor;
76pub mod downloader;
77pub mod extractor;
78pub mod help;
79pub mod initializer;
80pub mod integrator;
81pub mod lock;
82pub mod output;
83pub mod parser;
84mod process;
85pub mod resolvers;
86pub mod self_updater;
87pub mod state;
88pub(crate) mod transaction;
89pub mod update;
90pub mod validator;