Skip to main content

JobType

Enum JobType 

Source
pub enum JobType {
    EmailSync {
        identities: Option<Vec<String>>,
        local_output: Option<PathBuf>,
        remote_output: Option<String>,
        encryption_key: Option<String>,
        concurrency: Option<usize>,
        upload_concurrency: Option<usize>,
        max_connections_per_identity: Option<usize>,
        upload_only: bool,
        report_bucket: Option<String>,
        yes: bool,
    },
    DecryptFiles {
        input_dir: Option<PathBuf>,
        output_dir: Option<PathBuf>,
        encryption_key: Option<String>,
        concurrency: Option<usize>,
        report_bucket: Option<String>,
        yes: bool,
    },
    EmailPull {
        identities: Option<Vec<String>>,
        local_output: Option<PathBuf>,
        remote_output: Option<String>,
        concurrency: Option<usize>,
        upload_concurrency: Option<usize>,
        max_connections_per_identity: Option<usize>,
        upload_only: bool,
        report_bucket: Option<String>,
        yes: bool,
    },
    PullTransform {
Show 14 fields source_bucket: Option<String>, local_output: Option<PathBuf>, remote_output: Option<String>, encryption_key: Option<String>, file_types: Option<Vec<String>>, expand_zips: Option<Vec<String>>, image_format: Option<String>, video_format: Option<String>, audio_format: Option<String>, concurrency: Option<usize>, upload_concurrency: Option<usize>, upload_only: bool, report_bucket: Option<String>, yes: bool,
}, Deduplicate { source_bucket: Option<String>, local_output: Option<PathBuf>, remote_output: Option<String>, concurrency: Option<usize>, upload_concurrency: Option<usize>, upload_only: bool, report_bucket: Option<String>, yes: bool, }, Reduce { source_bucket: Option<String>, local_output: Option<PathBuf>, remote_output: Option<String>, concurrency: Option<usize>, upload_concurrency: Option<usize>, upload_only: bool, force_valuable: Vec<String>, force_reproducible: Vec<String>, report_bucket: Option<String>, yes: bool, }, Import { source: Option<String>, destination: Option<String>, local_output: Option<PathBuf>, report_bucket: Option<String>, yes: bool, }, }

Variants§

§

EmailSync

Fetch, transform, deduplicate, and optionally upload mail for one or more authenticated email identities. Replaces pigeon email sync (ADR-0021).

Fields

§identities: Option<Vec<String>>

Aliases of the identities to sync, comma-separated. Interactively selected from the authenticated identities when omitted and stdin is a terminal; required otherwise.

§local_output: Option<PathBuf>

Local directory to stage and store output under, shared across every selected identity (each gets its own subdirectory underneath). Defaults to a directory under the OS temp directory when omitted.

§remote_output: Option<String>

Alias of a configured bucket-config (see pigeon dataops bucket-config new) to upload each identity’s local result tree to, once its local fetch/transform/dedupe phase is complete.

§encryption_key: Option<String>

Alias of a configured encryption key (see pigeon keyring add encryption-key) to use, overriding the target bucket-config’s own default (if any). Interactively selected/confirmed when omitted; falls back to the bucket’s default non-interactively (ADR-0027).

§concurrency: Option<usize>

Maximum number of fetch/transform workers to run concurrently, spanning every selected identity’s every mailbox. Interactively prompted (with a rough time estimate) when omitted and stdin is a terminal; required otherwise.

§upload_concurrency: Option<usize>

Maximum number of files to upload concurrently, independent of --concurrency (which sizes IMAP fetch/transform work) – the upload phase is network-round-trip-bound, not IMAP-bound, so it benefits from its own, separately-tuned concurrency (ADR-0091). Interactively prompted when omitted and stdin is a terminal; defaults to 16 otherwise. With --upload-only, this is the only concurrency flag that has any effect.

§max_connections_per_identity: Option<usize>

Maximum number of simultaneous IMAP connections opened to any one identity, regardless of --concurrency (ADR-0071) – caps worker concurrency per-account rather than only globally, so a mailbox with enough pending batches can’t cause more than this many workers to log in to the same account at once and trip a provider’s simultaneous-connection limit. Defaults to 6 (well under Gmail’s documented 15-connection cap) when omitted; not interactively prompted.

§upload_only: bool

Resumes uploading already-completed local runs for the selected identities instead of starting new ones: skips the IMAP connect/fetch/transform/dedup phases entirely (and the per-identity IMAP credentials they’d otherwise need) and uploads straight from each identity’s existing local result tree, picking up where a prior run’s upload phase left off via the same .staging/.uploaded index per identity (ADR-0090). An identity with no completed local run is skipped with a warning rather than failing the whole command. Requires a mandatory --remote-output.

§report_bucket: Option<String>

Alias of a configured bucket-config this run’s report, the shared observability log, and a transcript of its printed output are uploaded to, always unencrypted, under a YYYY-MM-DD-job-name-{run-id}/ prefix (ADR-0100). Mandatory – interactively selected when omitted and stdin is a terminal; required otherwise.

§yes: bool

Skip the final “proceed?” confirmation. Every other omitted input (identities, concurrency) still follows its own independent flag-or-prompt rule – this only answers the last prompt.

§

DecryptFiles

Decrypts every *.enc file under --input-dir into --output-dir (.enc suffix stripped, relative structure preserved), using a configured encryption key (ADR-0028).

Fields

§input_dir: Option<PathBuf>

Directory containing *.enc files to decrypt. Interactively prompted when omitted and stdin is a terminal; required otherwise.

§output_dir: Option<PathBuf>

Directory decrypted files are written under, mirroring --input-dir’s relative structure. Must not be the same directory as --input-dir. Interactively prompted when omitted and stdin is a terminal; required otherwise.

§encryption_key: Option<String>

Alias of a configured encryption key (see pigeon keyring add encryption-key) to decrypt with. Interactively selected when omitted and stdin is a terminal; required otherwise.

§concurrency: Option<usize>

Maximum number of files to decrypt concurrently.

§report_bucket: Option<String>

Alias of a configured bucket-config this run’s report, the shared observability log, and a transcript of its printed output are uploaded to, always unencrypted, under a YYYY-MM-DD-job-name-{run-id}/ prefix (ADR-0100). Mandatory – interactively selected when omitted and stdin is a terminal; required otherwise.

§yes: bool

Skip the final “proceed?” confirmation.

§

EmailPull

Fetches raw .eml files and unpacked attachments (no Markdown/ frontmatter transform) for one or more authenticated email identities, deduplicating attachments by content, and optionally uploads the result unencrypted to a bucket-config (ADR-0081).

Fields

§identities: Option<Vec<String>>

Aliases of the identities to pull, comma-separated. Interactively selected from the authenticated identities when omitted and stdin is a terminal; required otherwise.

§local_output: Option<PathBuf>

Local directory to stage and store output under, shared across every selected identity. Defaults to a directory under the OS temp directory when omitted.

§remote_output: Option<String>

Alias of a configured bucket-config to upload each identity’s local result tree to, once its local fetch/dedupe phase is complete. Always uploaded unencrypted – this job never offers encryption (ADR-0081).

§concurrency: Option<usize>

Maximum number of fetch/extract workers to run concurrently, spanning every selected identity’s every mailbox. Interactively prompted (with a rough time estimate) when omitted and stdin is a terminal; required otherwise.

§upload_concurrency: Option<usize>

Maximum number of files to upload concurrently, independent of --concurrency (which sizes IMAP fetch/extract work) – the upload phase is network-round-trip-bound, not IMAP-bound, so it benefits from its own, separately-tuned concurrency (ADR-0091). Interactively prompted when omitted and stdin is a terminal; defaults to 16 otherwise. With --upload-only, this is the only concurrency flag that has any effect.

§max_connections_per_identity: Option<usize>

Maximum number of simultaneous IMAP connections opened to any one identity, regardless of --concurrency. Defaults to 6 when omitted; not interactively prompted.

§upload_only: bool

Resumes uploading already-completed local runs for the selected identities instead of starting new ones: skips the IMAP connect/fetch/dedup phases entirely (and the per-identity IMAP credentials they’d otherwise need) and uploads straight from each identity’s existing local result tree, picking up where a prior run’s upload phase left off via the same .staging/.uploaded index per identity (ADR-0090). An identity with no completed local run is skipped with a warning rather than failing the whole command. Requires a mandatory --remote-output.

§report_bucket: Option<String>

Alias of a configured bucket-config this run’s report, the shared observability log, and a transcript of its printed output are uploaded to, always unencrypted, under a YYYY-MM-DD-job-name-{run-id}/ prefix (ADR-0100). Mandatory – interactively selected when omitted and stdin is a terminal; required otherwise.

§yes: bool

Skip the final “proceed?” confirmation.

§

PullTransform

Recursively pulls every object from a bucket-config, expands zips, recodes media into a size-optimized canonical format per category (photo/screenshot -> jpg, video -> mp4, audio -> m4a), dates and dedups everything by content, and organizes the result by extension – then optionally encrypts and uploads it to a (possibly different) bucket-config (ADR-0074). Requires ffmpeg/ffprobe on PATH.

Fields

§source_bucket: Option<String>

Alias of a configured bucket-config (see pigeon keyring add bucket) to pull from. Interactively selected from the configured bucket-configs when omitted and stdin is a terminal; required otherwise.

§local_output: Option<PathBuf>

Local directory to stage and store output under. Defaults to a directory under the OS temp directory when omitted.

§remote_output: Option<String>

Alias of a configured bucket-config to upload the organized result to, once local processing is complete.

§encryption_key: Option<String>

Alias of a configured encryption key, overriding the target bucket-config’s own default (if any).

§file_types: Option<Vec<String>>

File extensions to pull/transform/upload, comma-separated (e.g. jpg,mp4,pdf; use the literal none for extensionless keys). Everything else is left pending, untouched, for a future run – never checkpointed as done (ADR-0077). Interactively selected (all pre-checked) from the pending-summary table when omitted and stdin is a terminal; defaults to everything otherwise.

§expand_zips: Option<Vec<String>>

Keys of pending zip objects to expand and transform; comma-separated. Every other pending zip is uploaded as-is, untouched (ADR-0077). Interactively selected (all pre-checked) when omitted and stdin is a terminal; defaults to expanding every pending zip otherwise.

§image_format: Option<String>

Recode target for photos/screenshots: jpg (default) or png.

§video_format: Option<String>

Recode target for video: mp4 (default), mkv, or webm.

§audio_format: Option<String>

Recode target for audio: m4a (default), mp3, or flac.

§concurrency: Option<usize>

Maximum number of files to download/recode concurrently.

§upload_concurrency: Option<usize>

Maximum number of files to upload concurrently, independent of --concurrency (which sizes download/recode work) – the upload phase is network-round-trip-bound, not CPU-bound, so it benefits from its own, separately-tuned concurrency (ADR-0091). Interactively prompted when omitted and stdin is a terminal; defaults to 16 otherwise. With --upload-only, this is the only concurrency flag that has any effect.

§upload_only: bool

Resumes uploading an already-completed local pull-transform run instead of starting a new one: skips the bucket listing/ download/classify/recode/placement phases entirely (and the source bucket credentials and ffmpeg/ffprobe check they’d otherwise need) and uploads straight from an existing --local-output, picking up where a prior run’s upload phase left off via the same .staging/.uploaded index (ADR-0090). Requires a --local-output from a completed prior run (its .processed checkpoint must exist and it must hold at least one placed-content subdirectory) and a mandatory --remote-output.

§report_bucket: Option<String>

Alias of a configured bucket-config this run’s report, the shared observability log, and a transcript of its printed output are uploaded to, always unencrypted, under a YYYY-MM-DD-job-name-{run-id}/ prefix (ADR-0100). Mandatory – interactively selected when omitted and stdin is a terminal; required otherwise.

§yes: bool

Skip the final “proceed?” confirmation.

§

Deduplicate

Recursively scans a bucket, always inflates every zip found (the zip container itself is never uploaded, only its inflated contents), content-hashes every file bucket-wide to keep one byte-identical copy of each, writes a human-readable merge report, and optionally uploads the result unencrypted to a (possibly different) bucket-config (ADR-0082). Unlike pull-transform, every file is always processed and every zip is always expanded – there is no file-type or zip-expansion selection, and this job never offers encryption.

Fields

§source_bucket: Option<String>

Alias of a configured bucket-config to pull from. Interactively selected from the configured bucket-configs when omitted and stdin is a terminal; required otherwise.

§local_output: Option<PathBuf>

Local directory to stage and store output under. Defaults to a directory under the OS temp directory when omitted.

§remote_output: Option<String>

Alias of a configured bucket-config to upload the deduped result to, once local processing is complete. Always uploaded unencrypted.

§concurrency: Option<usize>

Maximum number of files to download/hash concurrently.

§upload_concurrency: Option<usize>

Maximum number of files to upload concurrently, independent of --concurrency (which sizes download/hash work) – the upload phase is network-round-trip-bound, not CPU-bound, so it benefits from its own, separately-tuned concurrency (ADR-0091). Interactively prompted when omitted and stdin is a terminal; defaults to 16 otherwise. With --upload-only, this is the only concurrency flag that has any effect.

§upload_only: bool

Resumes uploading an already-completed local deduplicate run instead of starting a new one: skips the bucket listing/download/hash/ placement phases entirely (and the source bucket credentials they’d otherwise need) and uploads straight from an existing --local-output’s result/ tree, picking up where a prior run’s upload phase left off via the same .staging/.uploaded index (ADR-0089). Requires a --local-output from a completed prior run (its .staging/.processed checkpoint must exist and its result/ must be non-empty) and a mandatory --remote-output.

§report_bucket: Option<String>

Alias of a configured bucket-config this run’s report, the shared observability log, and a transcript of its printed output are uploaded to, always unencrypted, under a YYYY-MM-DD-job-name-{run-id}/ prefix (ADR-0100). Mandatory – interactively selected when omitted and stdin is a terminal; required otherwise.

§yes: bool

Skip the final “proceed?” confirmation.

§

Reduce

Runs after deduplicate: recursively scans a source bucket already organized into top-level <extension>/ folders, classifies each extension as either genuinely valuable or an artifact/piece of media (TV, movie, software installer, disk image) that’s easily reproduced from an external canonical source, and forwards only the valuable extensions’ objects to a mandatory destination bucket (ADR-0096). Reproducible extensions are never even downloaded. Never offers encryption; never expands zips (input is already flat).

Fields

§source_bucket: Option<String>

Alias of a configured bucket-config to pull from. Interactively selected from the configured bucket-configs when omitted and stdin is a terminal; required otherwise.

§local_output: Option<PathBuf>

Local directory to stage and store output under. Defaults to a directory under the OS temp directory when omitted.

§remote_output: Option<String>

Alias of a configured bucket-config to upload the forwarded result to. Always uploaded unencrypted. Interactively selected from the configured bucket-configs when omitted and stdin is a terminal; required otherwise – uploading is mandatory for this job.

§concurrency: Option<usize>

Maximum number of files to download concurrently.

§upload_concurrency: Option<usize>

Maximum number of files to upload concurrently, independent of --concurrency (which sizes download work) – the upload phase is network-round-trip-bound, not CPU-bound, so it benefits from its own, separately-tuned concurrency (ADR-0091). Interactively prompted when omitted and stdin is a terminal; defaults to 16 otherwise. With --upload-only, this is the only concurrency flag that has any effect.

§upload_only: bool

Resumes uploading an already-completed local reduce run instead of starting a new one: skips the bucket listing/download/ placement phases entirely (and the source bucket credentials they’d otherwise need) and uploads straight from an existing --local-output’s result/ tree, picking up where a prior run’s upload phase left off via the same .staging/.uploaded index (ADR-0090). Requires a --local-output from a completed prior run (its .staging/.processed checkpoint must exist and its result/ must be non-empty).

§force_valuable: Vec<String>

Extension (without the leading dot, e.g. mp3) to always treat as valuable regardless of the built-in classification table. Repeatable.

§force_reproducible: Vec<String>

Extension (without the leading dot, e.g. pdf) to always treat as a reproducible artifact/media file regardless of the built-in classification table. Repeatable.

§report_bucket: Option<String>

Alias of a configured bucket-config this run’s report, the shared observability log, and a transcript of its printed output are uploaded to, always unencrypted, under a YYYY-MM-DD-job-name-{run-id}/ prefix (ADR-0100). Mandatory – interactively selected when omitted and stdin is a terminal; required otherwise.

§yes: bool

Skip the final “proceed?” confirmation.

§

Import

Copies data from a configurable source to a configurable destination by shelling out to the external rclone binary, with its performance/retry flags fixed (not configurable here). Pigeon manages no rclone credentials/config – --source/--destination are raw remote:path strings passed straight through to rclone copy’s argv; rclone.conf is provisioned by an external process, outside this crate’s scope (ADR-0101). Requires rclone on PATH.

Fields

§source: Option<String>

rclone source, e.g. source:media/. Interactively prompted when omitted and stdin is a terminal; required otherwise.

§destination: Option<String>

rclone destination, e.g. destination:. Interactively prompted when omitted and stdin is a terminal; required otherwise.

§local_output: Option<PathBuf>

Local directory this run’s rclone log (also serving as this job’s report) and transcript are written under. Defaults to a directory under the OS temp directory when omitted. Unlike every other job, this is not a staging area for transferred data – rclone transfers directly source -> destination with no pigeon-side staging.

§report_bucket: Option<String>

Alias of a configured bucket-config this run’s report (the rclone log itself, for this job), the shared observability log, and a transcript of its printed output are uploaded to, always unencrypted, under a YYYY-MM-DD-job-name-{run-id}/ prefix (ADR-0100). Mandatory – interactively selected when omitted and stdin is a terminal; required otherwise.

§yes: bool

Skip the final “proceed?” confirmation.

Trait Implementations§

Source§

impl Debug for JobType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl FromArgMatches for JobType

Source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

impl Subcommand for JobType

Source§

fn augment_subcommands<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate Self via FromArgMatches::from_arg_matches_mut Read more
Source§

fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate self via FromArgMatches::update_from_arg_matches_mut Read more
Source§

fn has_subcommand(__clap_name: &str) -> bool

Test whether Self can parse a specific subcommand

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more