|
@@ -24,10 +24,18 @@ parser.add_argument("-e", "--expire", type=int, help="Expire files after this ma
|
|
|
parser.add_argument("-f", "--fresh", help="Download fresh copy of RSS feed.", action="store_true")
|
|
|
parser.add_argument("-n", "--new", type=int, help="Number of Days (range) we consider to be new.", default=2)
|
|
|
parser.add_argument("-v", "--verbose", help="Display more verbose information.", action="store_true")
|
|
|
+parser.add_argument("--hour", type=int, help="Run every so many hours.", default=4)
|
|
|
args = parser.parse_args()
|
|
|
|
|
|
now = pendulum.now()
|
|
|
|
|
|
+import sys
|
|
|
+
|
|
|
+if now.hour % args.hour != 0:
|
|
|
+ if args.verbose:
|
|
|
+ print("NO, NOT YET!")
|
|
|
+ sys.exit(0)
|
|
|
+
|
|
|
for f in os.listdir():
|
|
|
if f.endswith('.html') or f.endswith('.text'):
|
|
|
created = pendulum.from_timestamp(os.path.getctime(f), tz='local')
|