shorten CLI timezone flags, add docs
This commit is contained in:
parent
9890538c0e
commit
c87bac1856
2 changed files with 11 additions and 5 deletions
|
|
@ -135,6 +135,12 @@ Fetch a list of all the items saved in your YouTube/YouTube Music profile.
|
|||
`--auth` flag you can use authentication for any request.
|
||||
- `--lang` Change the YouTube content language
|
||||
- `--country` Change the YouTube content country
|
||||
- `--tz` Use a specific
|
||||
[timezone](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) (e.g.
|
||||
Europe/Berlin, Australia/Sydney)
|
||||
|
||||
**Note:** this requires building rustypipe-cli with the `timezone` feature
|
||||
- `--local-tz` Use the local timezone instead of UTC
|
||||
- `--report` Generate a report on every request and store it in a `rustypipe_reports`
|
||||
folder in the current directory
|
||||
- `--cache-file` Change the RustyPipe cache file location (Default:
|
||||
|
|
|
|||
|
|
@ -55,13 +55,13 @@ struct Cli {
|
|||
/// YouTube content country
|
||||
#[clap(long, global = true)]
|
||||
country: Option<String>,
|
||||
/// UTC offset in minutes
|
||||
/// Use a specific timezone (e.g. Europe/Berlin, Australia/Sydney)
|
||||
#[cfg(feature = "timezone")]
|
||||
#[clap(long, global = true)]
|
||||
timezone: Option<String>,
|
||||
tz: Option<String>,
|
||||
/// Use local timezone
|
||||
#[clap(long, global = true)]
|
||||
timezone_local: bool,
|
||||
tz_local: bool,
|
||||
/// Use authentication
|
||||
#[clap(long, global = true)]
|
||||
auth: bool,
|
||||
|
|
@ -920,12 +920,12 @@ async fn run() -> anyhow::Result<()> {
|
|||
if let Some(botguard_bin) = cli.botguard_bin {
|
||||
rp = rp.botguard_bin(botguard_bin);
|
||||
}
|
||||
if cli.timezone_local {
|
||||
if cli.tz_local {
|
||||
rp = rp.timezone_local();
|
||||
}
|
||||
|
||||
#[cfg(feature = "timezone")]
|
||||
if let Some(timezone) = cli.timezone {
|
||||
if let Some(timezone) = cli.tz {
|
||||
use time::OffsetDateTime;
|
||||
use time_tz::{Offset, TimeZone};
|
||||
|
||||
|
|
|
|||
Reference in a new issue