Add timestamp description
This commit is contained in:
parent
b669d67ce6
commit
c8700f1b1c
|
@ -19,3 +19,5 @@ optional arguments:
|
||||||
-t FORMAT, --timestamp-format FORMAT
|
-t FORMAT, --timestamp-format FORMAT
|
||||||
format of timestamp, default: %Y%m%d
|
format of timestamp, default: %Y%m%d
|
||||||
```
|
```
|
||||||
|
|
||||||
|
For a complete timestamp format description, see the python strftime() documentation: <https://docs.python.org/3/library/datetime.html#strftime-strptime-behavior>
|
||||||
|
|
|
@ -130,7 +130,12 @@ class BackupFile():
|
||||||
self.remove(force_remove = force_remove)
|
self.remove(force_remove = force_remove)
|
||||||
|
|
||||||
# Argument parser
|
# Argument parser
|
||||||
parser = argparse.ArgumentParser(description="Cleanup old backups")
|
parser = argparse.ArgumentParser(
|
||||||
|
description = "Cleanup old backups",
|
||||||
|
epilog = "For a complete timestamp format description, see the python strftime() " +
|
||||||
|
"documentation: https://docs.python.org/3/library/datetime.html" +
|
||||||
|
"#strftime-strptime-behavior"
|
||||||
|
)
|
||||||
# path argument
|
# path argument
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"path",
|
"path",
|
||||||
|
|
|
@ -13,7 +13,12 @@ DEFAULT_SUFFIX = ".bak"
|
||||||
DEFAULT_TIMESTAMP_FORMAT = "%Y%m%d"
|
DEFAULT_TIMESTAMP_FORMAT = "%Y%m%d"
|
||||||
|
|
||||||
# Argument parser
|
# Argument parser
|
||||||
parser = argparse.ArgumentParser(description="Cleanup old backups")
|
parser = argparse.ArgumentParser(
|
||||||
|
description="Cleanup old backups",
|
||||||
|
epilog = "For a complete timestamp format description, see the python strftime() " +
|
||||||
|
"documentation: https://docs.python.org/3/library/datetime.html" +
|
||||||
|
"#strftime-strptime-behavior"
|
||||||
|
)
|
||||||
# path argument
|
# path argument
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"path",
|
"path",
|
||||||
|
|
Loading…
Reference in New Issue