diff --git a/memos/commands.py b/memos/commands.py index 19df672..6155f51 100644 --- a/memos/commands.py +++ b/memos/commands.py @@ -10,6 +10,7 @@ import typer from memos.server import run_server from tabulate import tabulate from tqdm import tqdm +from gitignore_parser import parse_gitignore app = typer.Typer() lib_app = typer.Typer() @@ -19,6 +20,7 @@ app.add_typer(lib_app, name="lib") BASE_URL = "http://localhost:8080" +ignore_files = [".DS_Store"] def format_timestamp(timestamp): if isinstance(timestamp, str): @@ -122,6 +124,8 @@ def scan(library_id: int): pbar.update(1) file_path = Path(root) / file absolute_file_path = file_path.resolve() # Get absolute path + if file in ignore_files: + continue scanned_files.add( str(absolute_file_path) ) # Add to scanned files set