1.3 KiB
1.3 KiB
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Commands
- Run the backup script:
python3 backup.py - Install for system-wide access:
./setup.sh - No formal testing framework is used
Code Style Guidelines
- Imports: Standard library imports first, then third-party libraries
- Formatting: 4-space indentation, max line length ~100 characters
- Types: Python type hints for function parameters and returns
- Naming: Snake_case for variables and functions, CamelCase for classes
- Error Handling: Prefer explicit error handling with try/except blocks
- Documentation: Use docstrings for functions
- Config Files: JSON format with all required keys
Project Structure
/configs/: JSON configuration files for different backup jobsbackup.py: Main script for creating tar.gz or zip archives of specified directoriesbackup: Shell script wrapper to run backup.py from any directorysetup.sh: Installation script to make the backup command available system-wide
Config File Format
{
"outputDir": "~/path/to/backups/",
"inputs": [
"~/path/to/backup/",
"~/another/path/"
],
"ignorePatterns": [
".git/",
"node_modules/"
],
"archiveType": "tar" or "zip"
}