REDROOM
PHP 8.2.30
Path:
Logout
Edit File
Size: 739 B
Close
//opt/hc_python/lib/python3.12/site-packages/identify/cli.py
Text
Base64
from __future__ import annotations import argparse import json from collections.abc import Sequence from identify import identify def main(argv: Sequence[str] | None = None) -> int: parser = argparse.ArgumentParser() parser.add_argument('--filename-only', action='store_true') parser.add_argument('path') args = parser.parse_args(argv) if args.filename_only: func = identify.tags_from_filename else: func = identify.tags_from_path try: tags = sorted(func(args.path)) except ValueError as e: print(e) return 1 if not tags: return 1 else: print(json.dumps(tags)) return 0 if __name__ == '__main__': raise SystemExit(main())
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 2 × Files: 6
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
vendor
DIR
-
drwxr-xr-x
2025-04-04 08:02:00
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
__pycache__
DIR
-
drwxr-xr-x
2025-04-04 08:02:00
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
cli.py
739 B
lrw-r--r--
2025-04-04 08:02:00
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
extensions.py
13.56 KB
lrw-r--r--
2025-04-04 08:02:00
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
identify.py
7.73 KB
lrw-r--r--
2025-04-04 08:02:00
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
interpreters.py
688 B
lrw-r--r--
2025-04-04 08:02:00
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
py.typed
0 B
lrw-r--r--
2025-04-04 08:02:00
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
__init__.py
0 B
lrw-r--r--
2025-04-04 08:02:00
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).