{"id":30269769,"url":"https://github.com/antoinemartin/trello2keep","last_synced_at":"2025-08-16T02:18:35.277Z","repository":{"id":307988130,"uuid":"1026265741","full_name":"antoinemartin/trello2keep","owner":"antoinemartin","description":"Create a Google keep todo list from a trello board","archived":false,"fork":false,"pushed_at":"2025-08-03T12:05:45.000Z","size":134,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-03T14:18:47.662Z","etag":null,"topics":["google-api","google-keep-api","trello-api"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/antoinemartin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-25T15:30:26.000Z","updated_at":"2025-07-30T11:10:04.000Z","dependencies_parsed_at":"2025-08-03T14:19:00.404Z","dependency_job_id":"f9f487de-6961-490d-ba9d-5655d55bbad7","html_url":"https://github.com/antoinemartin/trello2keep","commit_stats":null,"previous_names":["antoinemartin/trello2keep"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/antoinemartin/trello2keep","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antoinemartin%2Ftrello2keep","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antoinemartin%2Ftrello2keep/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antoinemartin%2Ftrello2keep/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antoinemartin%2Ftrello2keep/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/antoinemartin","download_url":"https://codeload.github.com/antoinemartin/trello2keep/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antoinemartin%2Ftrello2keep/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270657715,"owners_count":24623465,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-16T02:00:11.002Z","response_time":91,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["google-api","google-keep-api","trello-api"],"created_at":"2025-08-16T02:18:34.621Z","updated_at":"2025-08-16T02:18:35.268Z","avatar_url":"https://github.com/antoinemartin.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# trello2keep\n\nCreate a Google Keep note with items from Trello lists.\n\n## Description\n\nThis tool exports cards from specified lists in a Trello board and creates a\nformatted Google Keep note with those items. It's designed to help manage todo\nlists by extracting items from Trello boards and converting them to a more\nportable format that can be easily accessed and checked off on mobile devices.\n\nI personally use this tool to manage my errands and tasks on my digital watch,\nwhere I can quickly check off items as I complete them.\n\nThe application connects to both the Trello API to fetch list items and the\nGoogle Keep API to create notes. It supports domain-wide delegation for Google\nWorkspace environments, allowing service accounts to impersonate users when\ncreating notes.\n\n### Key Features\n\n-   **Trello Integration**: Extract items from multiple lists on any Trello\n    board\n-   **Google Keep Integration**: Create formatted notes with proper sections\n-   **AI-Powered Filtering**: Use LLMs to intelligently filter, organize, and\n    categorize items with custom prompts (powered by\n    [Pythonic AI](https://ai.pydantic.dev/))\n-   **Multiple AI Models**: Support for various AI providers (Azure OpenAI,\n    OpenAI) with customizable model selection\n-   **Flexible Configuration**: Customize board IDs, note titles, and user\n    impersonation\n-   **Multiple List Support**: Process multiple Trello lists in a single run\n-   **Case-Insensitive Matching**: List names are matched case-insensitively for\n    convenience\n-   **Dual Note Formats**: Create either text notes (reorderable) or checklist\n    notes (with checkboxes)\n-   **Custom Organization**: Support for custom item ordering (see\n    `ordering_instructions_sample.md` for template)\n\n## Requirements\n\n-   Python \u003e= 3.13\n-   UV package manager\n\n## Getting Started\n\n1. Clone this repository\n2. Navigate to the project directory\n3. Follow the installation instructions below\n\n## Installation\n\n```bash\n# Install dependencies using UV\nuv sync\n\n# Or install in development mode with dev dependencies\nuv sync --group dev\n```\n\n## Usage\n\n```bash\nUsage: trello2keep [OPTIONS] TRELLO_BOARD [LIST_ITEMS]...\n\n  Extract items from Trello lists and create a Google Keep note.\n\n  This command extracts items from specified Trello lists and creates a\n  formatted Google Keep note. Specify list names as arguments.\n\n  Example: trello2keep Kanban Ongoing Validating\n\nOptions:\n  --credentials PATH              Path to credentials file.  [default:\n                                  credentials.json]\n  --title TEXT                    Title of the Google Keep note. Name of the\n                                  Trello board will be used if not specified.\n  --impersonated-user-email TEXT  Email address of the user to impersonate.\n                                  [default: antoine@openance.com]\n  --text / --no-text              Create a text note instead of a checklist\n                                  note. Default is False (checklist note).\n  --ai-filter PATH                Path to a markdown file with system prompt\n                                  to filter items via LLM.\n  --ai-model TEXT                 Model identifier. Prefix with provider (e.g.,\n                                  azure:gpt-4o).  [default: azure:gpt-4o]\n  --help                          Show this message and exit.\n```\n\n### Examples\n\n```bash\n# Run the application with default settings\nuv run trello2keep Kanban Developing Validating\n\n# Specify a custom credentials file\nuv run trello2keep --credentials /path/to/creds.json Kanban Developing Validating\n\n# Customize the Google Keep note title\nuv run trello2keep --title \"Weekly Task List\" Kanban Developing Validating\n\n# Use a different impersonated user email for Google Keep\nuv run trello2keep --impersonated-user-email user@company.com Kanban Developing Validating\n\n# Create a text note instead of checklist\nuv run trello2keep --text Kanban Developing Validating\n\n# Use AI filtering with a custom system prompt\nuv run trello2keep --ai-filter ./filter_prompt.md Kanban Developing Validating\n\n# Use a different AI model for filtering\nuv run trello2keep --ai-model openai:gpt-4 --ai-filter ./grocery_filter.md Kanban Shopping Lists\n\n# Combine multiple options including AI filtering\nuv run trello2keep \\\n  --credentials ./my-creds.json \\\n  --title \"Organized Shopping List\" \\\n  --ai-filter ./store_layout_filter.md \\\n  --ai-model azure:gpt-4o \\\n  --text \\\n  Kanban \\\n  Developing Validating \"Ready for QA\"\n\n# Or run directly with Python\nuv run python -m trello2keep.main Kanban Developing Validating\n```\n\n### Arguments and Options\n\n#### Positional Arguments\n\n-   `TRELLO_BOARD`: The name of the Trello board to extract items from. This is\n    a required positional argument.\n-   `LIST_ITEMS`: Names of the lists to export from Trello (space-separated).\n    These correspond to the names of lists in your Trello board. List names are\n    case-insensitive.\n\n#### Options\n\n-   `--credentials PATH`: Path to the credentials JSON file (default:\n    `credentials.json`). This file should contain both Trello API credentials\n    and Google service account credentials.\n-   `--title TEXT`: Title for the created Google Keep note. If not specified,\n    the Trello board name will be used as the title.\n-   `--impersonated-user-email TEXT`: Email address of the user to impersonate\n    when creating the Google Keep note (default: `antoine@openance.com`). This\n    requires domain-wide delegation to be properly configured.\n-   `--text / --no-text`: Create a text note instead of a checklist note.\n    Default is False (checklist note).\n-   `--ai-filter PATH`: Path to a markdown file containing a system prompt that\n    will be used to filter and organize items via a Large Language Model (LLM).\n    This enables intelligent filtering and categorization of items.\n-   `--ai-model TEXT`: Model identifier for the AI filtering feature (default:\n    `azure:gpt-4o`). Follows the same syntax as the pydantic-ai CLI with\n    provider prefixes (e.g., `azure:gpt-4o`, `openai:gpt-4`,\n    `gemini:gemini-1.5-pro`). See\n    [pydantic-ai model selection](https://ai.pydantic.dev/cli/#choose-a-model)\n    for complete syntax reference. Requires appropriate API credentials.\n\n#### Examples of Usage\n\n```bash\n# Common project stages\nuv run trello2keep \"My Board\" \"To Do\" \"In Progress\" \"Done\"\n\n# Category-based lists\nuv run trello2keep \"Project Board\" \"Frontend Tasks\" \"Backend Tasks\" \"DevOps\"\n\n# Team and status combinations\nuv run trello2keep \"Team Board\" \"Team A - In Progress\" \"Team B - Blocked\" \"Ready for Review\"\n\n# AI-filtered grocery shopping with store layout optimization\nuv run trello2keep --ai-filter ./grocery_filter.md \"Shopping Board\" \"Groceries\" \"Household Items\"\n\n# AI-filtered task management with priority organization\nuv run trello2keep --ai-filter ./task_priority_filter.md --ai-model openai:gpt-4 \"Project Board\" \"Backlog\" \"Sprint\"\n```\n\n## Getting the Trello Token\n\nThe `credentials.json` file should contain the appropriate credentials for\naccessing both the Trello API and Google Keep API.\n\n### Trello API Setup\n\nTo obtain your Trello API credentials, follow these steps:\n\n1. **Get your API Key**: Visit the\n   [Trello Power-Ups Admin page](https://trello.com/power-ups/admin) and create\n   a new Power-Up to generate your API key.\n\n2. **Generate a Token**: Once you have your API key, authorize the application\n   by visiting the following URL (replace `\u003cyour_api_key\u003e` with your actual API\n   key):\n\n    ```\n    https://trello.com/1/authorize?expiration=never\u0026scope=read\u0026response_type=token\u0026key=\u003cyour_api_key\u003e\n    ```\n\n3. **Authorize Access**: Click \"Allow\" to grant read access to your Trello\n   boards. The token will be displayed on the resulting page.\n\n4. **Save Credentials**: Copy both the API key and token to use in your\n   `credentials.json` file.\n\n\u003e **Note**: The token is set to never expire and only requires read access to\n\u003e your boards, ensuring minimal permissions while maintaining functionality.\n\nAfter authorizing the application, you will receive a token that should be\nplaced in the `credentials.json` file under the `trello` key.\n\n### Google Keep API Setup\n\nFor Google Keep access, you'll need to set up a service account with domain-wide\ndelegation:\n\n1. Create a service account in the Google Cloud Console\n2. Enable the Google Keep API for your project\n3. Configure domain-wide delegation for the service account on the following\n   scopes:\n\n```text\nhttps://www.googleapis.com/auth/keep,\nhttps://www.googleapis.com/auth/keep.readonly,\nhttps://www.googleapis.com/auth/userinfo.email\n```\n\n4. Download the service account key JSON file\n5. The service account credentials should be placed directly in the\n   `credentials.json` file\n\n### Credentials File Format\n\nYour `credentials.json` file should look like this:\n\n```json\n{\n    \"trello\": {\n        \"api_key\": \"your_api_key\",\n        \"token\": \"ATT...\"\n    },\n    \"type\": \"service_account\",\n    \"project_id\": \"your-project-id\",\n    \"private_key_id\": \"key-id\",\n    \"private_key\": \"-----BEGIN PRIVATE KEY-----\\n...\\n-----END PRIVATE KEY-----\\n\",\n    \"client_email\": \"your-service-account@your-project.iam.gserviceaccount.com\",\n    \"client_id\": \"client-id\",\n    \"auth_uri\": \"https://accounts.google.com/o/oauth2/auth\",\n    \"token_uri\": \"https://oauth2.googleapis.com/token\",\n    \"auth_provider_x509_cert_url\": \"https://www.googleapis.com/oauth2/v1/certs\",\n    \"client_x509_cert_url\": \"https://www.googleapis.com/robot/v1/metadata/x509/your-service-account%40your-project.iam.gserviceaccount.com\"\n}\n```\n\n## Advanced Features\n\n### Custom Item Ordering\n\nThe application supports custom ordering of items for optimized shopping\nexperiences. This is particularly useful for grocery lists where items can be\norganized by store layout.\n\n#### Creating Ordering Instructions\n\n1. Copy the sample template:\n   `cp ordering_instructions_sample.md ordering_instructions.md`\n2. Customize the categories and order based on your preferred store layout\n3. The application will automatically use `ordering_instructions.md` if present\n\nFor detailed examples and formatting guidelines, see\n`ordering_instructions_sample.md`.\n\n## Troubleshooting\n\n### Common Issues\n\n#### \"ModuleNotFoundError: No module named 'google'\"\n\nThis means the dependencies haven't been installed. Run:\n\n```bash\nuv sync\n```\n\n#### \"Error: Trello credentials not found in the credentials file.\"\n\nEnsure your `credentials.json` file has a `trello` section with `api_key` and\n`token` fields.\n\n#### Google Keep API errors\n\n-   Ensure your service account has domain-wide delegation enabled\n-   Verify the impersonated user email is in the same domain as your service\n    account\n-   Check that the Google Keep API is enabled for your project\n\n#### \"Invalid JSON file\" or \"Failed to extract items from Trello\"\n\n-   Verify your Trello board name is correct\n-   Check that the specified list names exist on your board (case-insensitive)\n-   Ensure your Trello token has read access to the board\n\n## Development\n\n### Quick Setup\n\nUse the provided setup script for a complete development environment:\n\n```bash\n# Run the setup script (recommended)\n./scripts/setup-dev.sh\n```\n\nThis script will:\n\n-   Install all dependencies including dev dependencies\n-   Set up pre-commit hooks\n-   Run initial code quality checks\n\n### Manual Setup\n\nIf you prefer to set up manually:\n\n```bash\n# Install development dependencies\nuv sync --group dev\n\n# Set up pre-commit hooks for code quality\nuv run pre-commit install\n\n# Run pre-commit hooks manually on all files (optional)\nuv run pre-commit run --all-files\n\n# Run tests\nuv run pytest\n```\n\n### Code Quality Tools\n\nThis project uses several tools to maintain code quality:\n\n-   **Ruff**: Fast Python linter and formatter (replaces Black, isort, flake8)\n-   **mypy**: Static type checker\n-   **Bandit**: Security linter\n-   **pre-commit**: Automatically runs quality checks on commit\n\nMost tools are automatically run via pre-commit hooks on every commit. You can\nalso run them manually:\n\n```bash\n# Lint and format with Ruff\nuv run ruff check src tests\nuv run ruff format src tests\n\n# Type check with mypy\nuv run mypy src tests\n\n# Security check with Bandit\nuv run bandit -r src\n\n# Run all pre-commit hooks manually\nuv run pre-commit run --all-files\n```\n\n### Project Structure and Guidelines\n\nThis project follows specific development conventions:\n\n-   **Package Manager**: Uses UV exclusively (not pip) for all Python operations\n-   **Code Style**: Ruff formatting with 120-character line length, single\n    quotes\n-   **Type Checking**: Type hints required throughout with mypy validation\n-   **CLI Framework**: Click for command-line interfaces with colored output\n-   **Error Handling**: User-friendly errors via `click.ClickException`\n-   **Python Version**: Requires Python 3.13 or higher\n\nFor detailed development guidelines, see:\n\n-   `CRUSH.md` - Quick reference for common development tasks\n-   `.github/copilot-instructions.md` - AI coding assistant guidelines\n\n### Testing\n\n```bash\n# Run all tests\nuv run pytest\n\n# Run tests with coverage\nuv run pytest --cov=src\n\n# Run specific test file\nuv run pytest tests/test_file.py\n\n# Run single test function\nuv run pytest tests/test_file.py::test_function_name\n```\n\n## Contributing\n\n1. Fork the repository\n2. Create a feature branch\n3. Set up the development environment:\n    ```bash\n    uv sync --group dev\n    uv run pre-commit install\n    ```\n4. Make your changes\n5. Run tests and ensure code quality checks pass:\n    ```bash\n    uv run pytest\n    uv run pre-commit run --all-files\n    ```\n6. Submit a pull request\n\n## License\n\nThis project is licensed under the MIT License - see the project metadata for\ndetails.\n\n## Author\n\nAntoine Martin (antoine@mrtn.fr)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantoinemartin%2Ftrello2keep","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fantoinemartin%2Ftrello2keep","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantoinemartin%2Ftrello2keep/lists"}