Categories — Category System¶
The categories package provides task categorization with customizable templates and configuration.
CategoryManager¶
- class jot.categories.manager.CategoryManager(project_dir=None)[source]¶
Bases:
objectManages categories within a project directory and globally
- MAX_CATEGORIES = 12¶
- GLOBAL_CATEGORIES_DIR = PosixPath('/home/runner/.jot-categories')¶
- discover_categories()[source]¶
Find all category files in .jot-categories/ directory. Returns list of category names (without .json suffix).
- can_create_category(category_name)[source]¶
Check if a new category can be created. Returns (can_create: bool, message: str)
- get_warning_message(category_name)[source]¶
Get warning message if approaching category limit. Returns None if no warning needed.
- discover_global_categories()[source]¶
Find all global category files in ~/.jot-categories/ Returns list of category names (without .json suffix). Excludes special files like ids, archive, etc.
CategoryConfig¶
- class jot.categories.config.CategoryConfig(project_dir=None)[source]¶
Bases:
objectManages category colors and configuration
- COLORS = {'blue': '\x1b[94m', 'cyan': '\x1b[96m', 'green': '\x1b[92m', 'lime': '\x1b[38;5;154m', 'magenta': '\x1b[95m', 'orange': '\x1b[38;5;208m', 'pink': '\x1b[38;5;213m', 'purple': '\x1b[38;5;141m', 'red': '\x1b[91m', 'teal': '\x1b[38;5;44m', 'white': '\x1b[97m', 'yellow': '\x1b[93m'}¶
- DEFAULT_COLORS = {'backlog': 'cyan', 'bills': 'orange', 'bugs': 'red', 'default': 'white', 'docs': 'blue', 'features': 'green', 'health': 'lime', 'ideas': 'purple', 'personal': 'pink', 'testing': 'yellow', 'work': 'teal'}¶
CategoryTemplates¶
- class jot.categories.templates.CategoryTemplates(project_dir=None)[source]¶
Bases:
objectManages category templates for quick project setup
- TEMPLATES = {'academic': {'categories': ['reading', 'research', 'writing', 'teaching'], 'description': 'Academic and research project categories', 'name': 'Academic/Research', 'sample_tasks': {'reading': ['Literature review', 'Paper analysis'], 'research': ['Experiment design', 'Data collection'], 'teaching': ['Prepare lecture', 'Grade assignments'], 'writing': ['Draft paper', 'Revise manuscript']}}, 'business': {'categories': ['leads', 'clients', 'invoicing', 'marketing'], 'description': 'Business and client work categories', 'name': 'Business Management', 'sample_tasks': {'clients': ['Client meetings', 'Project deliverables'], 'invoicing': ['Send invoices', 'Track payments'], 'leads': ['Follow up prospects', 'Update CRM'], 'marketing': ['Social media posts', 'Email campaign']}}, 'creative': {'categories': ['ideas', 'drafts', 'editing', 'publishing'], 'description': 'Creative and content creation categories', 'name': 'Creative Project', 'sample_tasks': {'drafts': ['Write first draft'], 'editing': ['Review and revise'], 'ideas': ['Brainstorm topics', 'Research inspiration'], 'publishing': ['Format and publish']}}, 'personal': {'categories': ['work', 'home', 'bills', 'health'], 'description': 'Personal life management categories', 'name': 'Personal Tasks', 'sample_tasks': {'bills': ['Pay rent', 'Review budget'], 'health': ['Exercise', 'Doctor appointment'], 'home': ['Grocery shopping', 'Clean house'], 'work': ['Check email', 'Weekly planning']}}, 'software-dev': {'categories': ['features', 'bugs', 'testing', 'docs'], 'description': 'Standard software project categories', 'name': 'Software Development', 'sample_tasks': {'bugs': ['Triage bug reports'], 'docs': ['Update README', 'Write API docs'], 'features': ['Plan next sprint', 'Review backlog'], 'testing': ['Run test suite', 'Update test coverage']}}}¶