-
Notifications
You must be signed in to change notification settings - Fork 14
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
Add a command to tag a file/files with TTL #1
Comments
Do you mean tagging with a general self-destruct tag and then reading in the TTL as another tag? |
This is what I meant:
|
Thanks. I like it and am working on that in a branch. |
@tdlm Can you push anything semi-working on that branch? I'd like to help. Also it would be great if you could do |
@mauvm I haven't had a chance to work on this in a few days. I actually got stuck on a way to parse the time without resorting to dependencies. I too would like this sort of format! The path I was going down was just porting that input into the 'date' command like so: $ date && date -v +10M
Tue Oct 7 19:03:24 PDT 2014
Tue Oct 7 19:13:24 PDT 2014 Using date -v +10M or date -v +${SOME_VAR} it seems would work when altered to just output seconds: $ date -r 0 -v +10M +"%s"
600
$ date -r 0 -v +1d +"%s"
86400
$ date -r 0 -v +3d +"%s"
259200 This is fine and dandy. The only real trouble there would be security on the command input for date and making sure people know the difference between '10M' and '10m' because it's a big one. I almost think you would want a confirmation unless you specified --force|-f. Any input here is appreciated. |
@tdlm Running What works for me is I was thinking more along the lines of also allowing tags like "3 Days". After a quick Google search I found that you can get all tags by running:
Which results in something like:
This enables us to make the Finally we can add a command that adds the desired tag:
Let me know what you think. |
@nikolay I found a really simple solution:
|
This would be nice as it could be used from other scripts.
The text was updated successfully, but these errors were encountered: