mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-15 07:34:27 -04:00
add archivebox info command to scan data dir
This commit is contained in:
parent
50b947f41d
commit
ab68819332
4 changed files with 105 additions and 3 deletions
28
archivebox/cli/archivebox_info.py
Normal file
28
archivebox/cli/archivebox_info.py
Normal file
|
@ -0,0 +1,28 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
__package__ = 'archivebox.cli'
|
||||
__command__ = 'archivebox info'
|
||||
__description__ = 'Print out some info and statistics about the archive collection'
|
||||
|
||||
import sys
|
||||
import argparse
|
||||
|
||||
from ..legacy.main import info
|
||||
from ..legacy.util import reject_stdin
|
||||
|
||||
|
||||
def main(args=None):
|
||||
args = sys.argv[1:] if args is None else args
|
||||
|
||||
parser = argparse.ArgumentParser(
|
||||
prog=__command__,
|
||||
description=__description__,
|
||||
add_help=True,
|
||||
)
|
||||
parser.parse_args(args)
|
||||
reject_stdin(__command__)
|
||||
|
||||
info()
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
Loading…
Add table
Add a link
Reference in a new issue