I've rewritten my first #Python project, a small CLI #backup #program utilising #rsync, #rclone, #VeraCrypt etc. I'm sure there are many ways it could be improved, but it's my beginner's effort and works well for my own needs.
Please feel free to critique, share, modify, collaborate and all that good stuff:
Design your programs so that you can always run them unmodified.
In this case that means externalizing 'sd_id', 'ssd_id', 'vc_pass'.
It could be provided by running your program with (named) parameters or by reading a config file or by reading environment variables.
If you must use hardcoded values, define them (as constants) at the top of the file.
Add documentation and/or help text
When you do the same thing multiple times, extract it into its own function.
ad 3) This is known as the DRY principle.
Don't Repeat Yourself
Try to get in the habit of writing good commit messages.
'git log --oneline' should directly give you a reasonably good indication of what has happened in the repo.
'git log --stat' should tell you a lot, short of the actual changes (which 'git diff' will tell you), including which files are modified.
Tell why you made a change or what, not where. Also use the extended msg to give details.
I like using 'git commit -v'
Thanks for all your tips, much appreciated.