Path Management
Path management utilities for Simulchip.
This module provides centralized path generation and management for: - Collection files - Deck PDFs - Cache directories - Configuration files
- simulchip.paths.get_default_collection_path()[source]
Get the default collection file path.
- Return type:
- Returns:
Path to the default collection file (~/.simulchip/collection.toml)
- simulchip.paths.get_default_cache_dir()[source]
Get the default cache directory path.
- Return type:
- Returns:
Path to the default cache directory (~/.simulchip/cache)
- simulchip.paths.get_deck_pdf_path(identity_title, deck_name, side, base_dir=None)[source]
Generate the standard path for a deck PDF.
Creates a path structure like: decks/(corporation|runner)/(identity-slug)/(deck-name).pdf
- Parameters:
- Return type:
- Returns:
Path object for the deck PDF
Examples
>>> get_deck_pdf_path("Zahya Sadeghi: Versatile Smuggler", "My Deck", "runner") PosixPath('decks/runner/zahya-sadeghi-versatile-smuggler/my-deck.pdf')
- simulchip.paths.create_identity_slug(identity_title)[source]
Create a filesystem-safe slug from an identity title.
- Parameters:
identity_title (
str
) – The identity card title- Return type:
- Returns:
A filesystem-safe slug
Examples
>>> create_identity_slug("Zahya Sadeghi: Versatile Smuggler") 'zahya-sadeghi-versatile-smuggler' >>> create_identity_slug("Haas-Bioroid: Engineering the Future") 'haas-bioroid-engineering-the-future'
- simulchip.paths.get_cache_subdirectory(subdir)[source]
Get a subdirectory within the cache directory.