made some changes to the project structure
This commit is contained in:
parent
d094164c84
commit
db112e8dc3
10 changed files with 11 additions and 5 deletions
0
LICENSE → .github/LICENSE
vendored
0
LICENSE → .github/LICENSE
vendored
0
readme.md → .github/README
vendored
0
readme.md → .github/README
vendored
|
|
@ -1,3 +1,5 @@
|
|||
# to delete
|
||||
|
||||
from typer import Typer
|
||||
import identify_file_type
|
||||
|
||||
|
|
@ -1,6 +1,5 @@
|
|||
from typer import Typer, Argument
|
||||
from rich import print, console
|
||||
from log import create_rich_logger
|
||||
from pprint import pprint
|
||||
import argparse
|
||||
import pathlib
|
||||
|
|
@ -10,7 +9,6 @@ import zipfile
|
|||
import magic
|
||||
|
||||
app = Typer()
|
||||
logger = create_rich_logger()
|
||||
|
||||
|
||||
@app.command()
|
||||
|
|
@ -32,9 +30,9 @@ def identify(files: list[str] = Argument(..., help="File paths to identify")):
|
|||
for member in tar.getmembers():
|
||||
print(f" - {member.name}")
|
||||
else:
|
||||
print(f"{file_path}: {file_type}")
|
||||
print(
|
||||
f"[bold green]Identified file type: {file_type}[/bold green]"
|
||||
)
|
||||
|
||||
except FileNotFoundError:
|
||||
log.error(f"Error: File not found: {file_path}")
|
||||
|
||||
print(f"[bold green]Identified file type: {file_type}[/bold green]")
|
||||
|
|
@ -1,3 +1,5 @@
|
|||
# to delete
|
||||
|
||||
import argparse
|
||||
import pathlib
|
||||
import shutil
|
||||
Binary file not shown.
Binary file not shown.
4
tests/identify_file_type_tests.py
Normal file
4
tests/identify_file_type_tests.py
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
# identify_file_type_tests
|
||||
import pytest
|
||||
import unittest
|
||||
import identify_file_type_tests
|
||||
Loading…
Reference in a new issue