Code Monkey home page Code Monkey logo

dashcam-backup's People

Contributors

jancimajek avatar

Stargazers

 avatar

Watchers

 avatar  avatar

dashcam-backup's Issues

Improve progress output

Tasks

  • Change the progress output to keep in the same line:
    • Should overwrite the progress line
    • Should work correctly when a new line is shorter than the previous
    • Should NOT show progress in multiple files like now (, i.e. NOT one file per line)
    • Should work normally for non-progress output

Add CLI options to format/dismount volumes without prompting

  • Add -F option with values prompt (default), FORMAT, dis (dismount) or no (any other value)
    • Should be optional
    • When not set, or set to prompt, it should prompt the user after copying the files - current behaviour
    • When set to FORMAT, it should format and dismount/eject the source volume after copying the files without prompting the user (same as if the user types in FORMAT when prompted - current behaviour).
    • When set to dis, it should dismount/eject the source volume without formatting after copying the files without prompting the user (same as if the user types in dis when prompted - current behaviour).
    • When set to any other value (e.g. no), no action should be taken, and the user should not be prompted (same as if the user types in any other value when prompted - current behaviour).
  • Add -d option with values prompt (default), yes (dismount) or no (any other value)
    • Should be optional
    • When not set, or set to prompt, it should prompt the user after copying the files - current behaviour
    • When set to yes, it should dismount/eject the target volume (without formatting) after copying the files without prompting the user (same as if the user types in yes when prompted - current behaviour).
    • When set to any other value (e.g. no), no action should be taken, and the user should not be prompted (same as if the user types in any other value when prompted - current behaviour).
  • Order of the operations should be preserved:
    1. copy files, then
    2. dismount the target volume first, then
    3. format/dismount the source volume
  • Update usage message

Add issue template

Tasks

  • Add Issue template
## Tasks

- [ ] TASK1
- [ ] TASK2

## Details

DETAILS

### Scenario

SCENARIO

### Problem

PROBLEM

### Solution

- [ ] SOLUTION
- [ ] SOLUTION
- [ ] SOLUTION

Do not fail if an existing file is newer

Details

Scenario

  • Temporary files have newer timestamps until fully copied.

Problem

  • When the previous run failed mid-copy (e.g. due to running out of disk space), the temporary file will have a newer timestamp, and the script will fail.

Solution

  • Do not fail if the existing file has a newer timestamp
  • The file should be overwritten/skipped/cause error according to the existing size rules
    • Overwrite any existing target file that is smaller in size than the source file (existing behaviour); even if the existing file is newer (new behaviour).
    • Skip any existing target file that is the same size as the source file (existing behaviour).
    • Error in case any existing target file is bigger in size than the source file (existing behaviour).

Allow overwriting files with smaller size

Details

Scenario

Whenever copying is interrupted (e.g. because of insufficient space on the target device), a half-copied file can remain on the target device.

Problem

  • On a subsequent copy attempt (after fixing the issue), the half-copied file from the previous attempt will cause the script to error due to the file already exists.

Solution

  • Overwrite any existing target file that is smaller in size than the source file.
  • Skip any existing target file that is the same size as the source file (existing behaviour).
  • Error in case any existing target file is bigger in size than the source file (existing behaviour).

Fix `60s` in ETA

ETA sometimes shows Xm60s remaining but should only show seconds in the 0-59 range:

✅ [130/212] /Vol.../AMBA0130.MOV → /Vol.../2022-10-14-09-16-52-AMBA0130.MOV [⏳03m60s]
                                                                                  ^^^
  • Fix ETA seconds to be in the 0-59 range
  • Double-check that minutes are also in the 0-59 range

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.