made some changes to the project structure

This commit is contained in:
Catherine Oborski 2024-09-08 12:47:26 -05:00
parent d094164c84
commit db112e8dc3
10 changed files with 11 additions and 5 deletions

View file

View file

View file

@ -1,3 +1,5 @@
# to delete
from typer import Typer
import identify_file_type

View file

@ -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]")

View file

@ -1,3 +1,5 @@
# to delete
import argparse
import pathlib
import shutil

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1,4 @@
# identify_file_type_tests
import pytest
import unittest
import identify_file_type_tests