feat(cli): add initial repository management commands
- Introduce CLI using Typer for repository management - Add commands for archiving, cleaning, moving, reviewing, and status - Implement configuration loading and default structure setup - Include utilities for Git status checks and directory size calculation - Lay groundwork for extensible repository operations Signed-off-by: Max P. <Mail@MPassarello.de>
This commit is contained in:
20
src/repocat/models/config.py
Normal file
20
src/repocat/models/config.py
Normal file
@@ -0,0 +1,20 @@
|
||||
from pydantic import BaseModel, Field
|
||||
from pathlib import Path
|
||||
from typing import List, Optional
|
||||
|
||||
class RepoCategory(BaseModel):
|
||||
name: str
|
||||
subdir: str
|
||||
days: Optional[int] = Field(default=None, ge=1)
|
||||
volatile: bool = False
|
||||
description: Optional[str] = None
|
||||
is_archive: bool = False
|
||||
|
||||
class RepoCatDefaults(BaseModel):
|
||||
dry_run: bool = True
|
||||
auto_create_directories: bool = True
|
||||
|
||||
class RepoCatConfig(BaseModel):
|
||||
base_dir: Path = Field(default=Path("~/Repositories").expanduser())
|
||||
categories: List[RepoCategory]
|
||||
defaults: Optional[RepoCatDefaults] = RepoCatDefaults()
|
||||
Reference in New Issue
Block a user