8 releases (3 stable)

2.1.0 Sep 10, 2024
2.0.0 Jun 22, 2024
1.0.0 Jun 22, 2024
0.0.6 Jun 10, 2024
0.0.2 May 28, 2024

#320 in Command line utilities

AGPL-3.0

670KB
155 lines

What's ?

It's a simple tool to clone directories contents from the local machine.

Installation

cargo install cloning

Usage

Cloning source directory to destination

Usage: cloning --template=<template> --progress=<progress> --source=<source> --destination=<destination> --clock=<clock>

Options:
      --template=<template>        the progress console output
      --progress=<progress>        the progress bar progress chars
      --source=<source>            the directory to clone
      --destination=<destination>  the directory destination path
      --clock=<clock>              Set the sleep time
  -h, --help                       Print help

Display help

cloning --help

Example

cloning --template='{spinner:.white} [{elapsed_precise}] [{bar:50.white}] {msg}' --progress='==-' --source='source' --destination='dest' --clock=250 

Template

  • Templates
    • bar: renders a progress bar. By default, 20 characters wide. The style string is used to color the elapsed part, the alternative style is used for the bar that is yet to render.
    • wide_bar: like bar but always fills the remaining space. It should not be used with wide_msg.
    • spinner: renders the spinner (current tick string). Note that spinners do not automatically tick by default. You either need to call enable_steady_tick or manually call tick.
    • prefix: renders the prefix set on the progress bar.
    • msg: renders the currently set message on the progress bar.
    • wide_msg: like msg but always fills the remaining space and truncates. It should not be used with wide_bar.
    • pos: renders the current position of the bar as integer
    • human_pos: renders the current position of the bar as an integer, with commas as the thousands separator.
    • len: renders the amount of work to be done as an integer
    • human_len: renders the total length of the bar as an integer, with commas as the thousands separator.
    • percent: renders the current position of the bar as a percentage of the total length (as an integer).
    • percent_precise: renders the current position of the bar as a percentage of the total length (with 3 fraction digits).
    • bytes: renders the current position of the bar as bytes (alias of binary_bytes).
    • total_bytes: renders the total length of the bar as bytes (alias of binary_total_bytes).
    • decimal_bytes: renders the current position of the bar as bytes using power-of-10 units, i.e. MB, kB, etc.
    • decimal_total_bytes: renders the total length of the bar as bytes using power-of-10 units, i.e. MB, kB, etc.
    • binary_bytes: renders the current position of the bar as bytes using power-of-two units, i.e. MiB, KiB, etc.
    • binary_total_bytes: renders the total length of the bar as bytes using power-of-two units, i.e. MiB, KiB, etc.
    • elapsed_precise: renders the elapsed time as HH:MM:SS.
    • elapsed: renders the elapsed time as 42s, 1m etc.
    • per_sec: renders the speed in steps per second.
    • bytes_per_sec: renders the speed in bytes per second (alias of binary_bytes_per_sec).
    • decimal_bytes_per_sec: renders the speed in bytes per second using power-of-10 units, i.e. MB, kB, etc.
    • binary_bytes_per_sec: renders the speed in bytes per second using power-of-two units, i.e. MiB, KiB, etc.
    • eta_precise: the remaining time (like elapsed_precise).
    • eta: the remaining time (like elapsed).
    • duration_precise: the extrapolated total duration (like elapsed_precise).
    • duration: the extrapolated total duration time (like elapsed).

Dependencies

~7–16MB
~204K SLoC