Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable setting last timestamp to any value #6

Open
dmarsic opened this issue Sep 8, 2019 · 0 comments
Open

Enable setting last timestamp to any value #6

dmarsic opened this issue Sep 8, 2019 · 0 comments

Comments

@dmarsic
Copy link
Owner

dmarsic commented Sep 8, 2019

Last timestamp is saved in the inventory database as the current timestamp of the encrypt_all() operation. Timestamps of files in plaindir are compared against this saved value to determine new files to encrypt.

There are valid use cases where we may want to re-encrypt all files, or encrypt files after some timestamp. check.py could provide information about the saved timestamp (in unix timestamp and human-readable format) and also accept the new timestamp:

It seems appropriate that this information is available both when listing all records (check.py with no arguments) and when listing summary (check.py --list).

$ check.py --list
- Registered regular files :     0
- Registered symlinks :          0
- Registered empty directories : 1

Total number of records :        1
Last timestamp:                  1567923006 (2019-09-08T06:10:06Z)

The last timestamp could be changed by specifying unix timestamp as an argument to check.py. Human-writable dates like "1 day ago" could be implemented if we take dependency on Maya, but it's not a hard requirement for this issue.

$ check.py -t|--set-timestamp 1567923006
$ check.py -t|--set-timestamp "1 day ago"   # optional
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant