""" config.py Configuration and constants """ # --------------------------------------------------------------------------- # Directories ignored during scan # --------------------------------------------------------------------------- IGNORE_DIRS_DEFAULT = ( ".git,.idea,.vscode,__pycache__,.pytest_cache,node_modules," "venv,.venv,env,build,dist,.next,.cache," "site-packages,.mypy_cache,target,.gradle," "bin,obj" ) # --------------------------------------------------------------------------- # Binary / ignored extensions # --------------------------------------------------------------------------- IGNORE_EXTENSIONS = { ".exe", ".dll", ".so", ".dylib", ".png", ".jpg", ".jpeg", ".gif", ".ico", ".svg", ".webp", ".zip", ".rar", ".7z", ".tar", ".gz", ".pdf", ".mp4", ".mp3", ".wav", ".mov", ".woff", ".woff2", ".ttf", ".eot", ".pyc", ".class", ".jar", ".db", ".sqlite3", ".lock", ".bin", ".dat", } # --------------------------------------------------------------------------- # Extension → Language # --------------------------------------------------------------------------- LANGUAGE_MAP = { ".py": "Python", ".js": "JavaScript", ".jsx": "JavaScript (JSX)", ".ts": "TypeScript", ".tsx": "TypeScript (TSX)", ".html": "HTML", ".css": "CSS", ".scss": "SCSS", ".json": "JSON", ".yaml": "YAML", ".yml": "YAML", ".toml": "TOML", ".xml": "XML", ".md": "Markdown", ".sql": "SQL", ".java": "Java", ".go": "Go", ".rb": "Ruby", ".php": "PHP", ".c": "C", ".cpp": "C++", ".cs": "C#", ".swift": "Swift", ".kt": "Kotlin", ".sh": "Shell", ".txt": "Text", ".env": "Environment", ".ini": "INI", ".cfg": "Config", ".rst": "reStructuredText", } # --------------------------------------------------------------------------- # Categories # --------------------------------------------------------------------------- EXTENSION_CATEGORIES = { "Python": { ".py", }, "JavaScript / TypeScript": { ".js", ".jsx", ".ts", ".tsx", }, "Web": { ".html", ".css", ".scss", }, "Configuration": { ".json", ".yaml", ".yml", ".toml", ".xml", ".ini", ".cfg", ".env", }, "Documentation": { ".md", ".txt", ".rst", }, "Other Languages": { ".java", ".go", ".rb", ".php", ".c", ".cpp", ".cs", ".swift", ".kt", ".sql", ".sh", }, } # --------------------------------------------------------------------------- # Token estimation # --------------------------------------------------------------------------- CHARS_PER_TOKEN = 4.0 # --------------------------------------------------------------------------- # Output defaults # --------------------------------------------------------------------------- DEFAULT_MAX_FILE_SIZE_MB = 2.0 DEFAULT_MAX_TOKENS = 0 OUTPUT_MARKDOWN = "Markdown" OUTPUT_XML = "XML" OUTPUT_MD_EXT = "md" OUTPUT_XML_EXT = "xml" PREVIEW_LIMIT = 3000 MAX_WORKERS = 16