drupal-news


Namedrupal-news JSON
Version 0.0.5 PyPI version JSON
download
home_pageNone
SummaryAutomated Drupal news aggregator with AI-powered summaries
upload_time2025-10-30 00:00:55
maintainerNone
docs_urlNone
authorDrupal News Contributors
requires_python>=3.10
licenseGPL-2.0
keywords drupal news aggregator rss ai summarizer newsletter
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Drupal News Aggregator

Automated Drupal news aggregation with AI summarization.

## Installation

### From PyPI

```bash
pip install drupal-news

# With AI providers
pip install "drupal-news[openai]"
pip install "drupal-news[anthropic]"
pip install "drupal-news[all-providers]"
```

### From Source

```bash
./setup.sh
source venv/bin/activate
```

## Quick Start

```bash
# Using installed package
drupal-news --dry-run

# Or from source
python3 index.py --dry-run
```

## Configuration

### Unified Configuration (config.yml)

All configuration is now in a single `config.yml` file:

```bash
# Create from example
cp config.example.yml config.yml

# Edit to customize
nano config.yml
```

**Configuration sections:**

- **Core settings**: timeframe, HTTP options, email, markdown
- **Sources**: RSS feeds and web pages to scrape
- **AI providers**: Model configurations for summarization
- **Prompt template**: Customize AI summarization instructions
- **API keys**: Store or reference environment variables

### Custom Configuration Path

```bash
drupal-news --config /path/to/config.yml

# Or from source
python3 index.py --config /path/to/config.yml
```

### Environment Variables (.env)

You can still use `.env` for sensitive data:

```bash
# .env (optional)
OPENROUTER_API_KEY=sk-or-v1-...
ANTHROPIC_API_KEY=sk-ant-api03-...
TIMEZONE=Europe/Athens
SMTP_HOST=smtp.example.com
SMTP_PORT=587
SMTP_USER=user@example.com
SMTP_PASS=password
MAIL_TO=recipient@example.com
MAIL_FROM=sender@example.com
```

Reference them in `config.yml` using `${VAR_NAME}`:

```yaml
api_keys:
  OPENROUTER_API_KEY: ${OPENROUTER_API_KEY}  # From .env
  ANTHROPIC_API_KEY: ${ANTHROPIC_API_KEY}
```

### Configuration Examples

See `config.example.yml` for comprehensive examples of:

- Multiple AI providers (OpenAI, Anthropic, Gemini, Ollama, etc.)
- Custom API endpoints and proxies
- Advanced page scraping with CSS selectors
- Custom prompt templates

**Migration Guide**: See `MIGRATION.md` if upgrading from old config files

## Usage

### Main Aggregator

```bash
# Using installed package
drupal-news --provider openai --days 7
drupal-news --dry-run --verbose
drupal-news --provider anthropic --email yes

# Or from source
python3 index.py --provider openai --days 7
```

### Scheduler

```bash
# Using installed package
drupal-news-scheduler --every friday --hour 9 --provider openai
drupal-news-scheduler --every monday --hour 8 --email yes --days 7

# Or from source
python3 scheduler.py --every friday --hour 9 --provider openai
```

### Email Sender

```bash
# Using installed package
drupal-news-email --latest
drupal-news-email --run-dir runs/2025-10-29

# Or from source
python3 -m drupal_news.email_sender --latest
```

### Cron

```bash
# Using installed package
0 9 * * 5 drupal-news --provider openai --email yes

# Or from source
0 9 * * 5 cd /path && python3 index.py --provider openai
```

## Web Viewer

```bash
# Using installed package
drupal-news-viewer
# Open http://localhost:5000

# Or from source
python3 src/viewer.py
```

Features: tabs/split view, run history, metrics, logs

## Providers

Built-in: OpenAI, Anthropic, Gemini, Ollama, LMStudio, Qwen, Grok, DeepSeek, OpenRouter

**Generic:** Works with ANY OpenAI-compatible API (OpenRouter, Together AI, Groq, Perplexity, Fireworks, Azure OpenAI, custom endpoints)

See: [Generic Provider Guide](docs/GENERIC_PROVIDER.md)

## CLI Commands

### drupal-news

Main aggregator command. Fetches, parses, and summarizes Drupal news.

```bash
drupal-news [OPTIONS]

Options:
  --provider <name>       AI provider (openai, anthropic, gemini, etc.)
  --model <name>          Override provider's default model
  --days <n>              Timeframe in days (default: 7)
  --email yes|no          Send email report
  --dry-run               Skip AI and email (testing mode)
  --fetch-only            Only fetch and parse, skip AI
  --use-sources <date>    Use cached sources from date (YYYY-MM-DD)
  --config <path>         Custom config.yml path
  --env <path>            Custom .env path
  --outdir <path>         Custom output directory
  --verbose               Enable debug logging
```

### drupal-news-scheduler

Schedule recurring aggregator runs.

```bash
drupal-news-scheduler --every <day> [OPTIONS]

Options:
  --every <day>           Day of week (monday-sunday)
  --hour <n>              Hour to run (0-23, default: 9)
  --minute <n>            Minute to run (0-59, default: 0)
  --provider <name>       AI provider to use
  --model <name>          Model override
  --email yes|no          Send email
  --days <n>              Number of days to aggregate
```

### drupal-news-email

Send aggregated reports via email.

```bash
drupal-news-email [OPTIONS]

Options:
  --latest                Send latest report
  --run-dir <path>        Send specific run directory
  --days <n>              Days back to check (default: 7)
```

### drupal-news-viewer

Launch web interface to view reports.

```bash
drupal-news-viewer

Opens http://localhost:5000
Features: tabs, run history, metrics, logs
```

## Output

`runs/YYYY-MM-DD/`: parsed.md, summary.md, sources.json, metrics.json, run.log

## Project Structure

When using from PyPI, configuration files are in `~/.drupal-news/` or current directory.

When using from source:

```
├── setup.sh        # Setup script
├── index.py        # Main entry (wrapper)
├── scheduler.py    # Scheduler (wrapper)
├── src/            # Source code
├── src/viewer.py        # Web viewer (wrapper)
├── venv/                # Virtual env
├── config.yml           # Unified configuration
├── config.example.yml   # Configuration examples
└── .env                 # Optional environment variables
```

## Exit Codes

- 0:  Success
- 10: Partial fetch failure
- 20: Validation failed
- 30: Summarizer failed
- 40: Email failure
- 50: Integrity check failed

## Contributing

Contributions welcome! See [docs/RELEASING.md](docs/RELEASING.md) for release process.

### Creating a Release

```bash
# Patch release (bug fixes)
./release.sh patch -m "Bug fixes and improvements"

# Minor release (new features)
./release.sh minor -m "New features" --push

# Major release (breaking changes)
./release.sh major -m "Breaking changes" --push
```

The release script:

- Updates VERSION file
- Updates RELEASES.md with changelog
- Creates git commit and tag
- Optionally pushes to trigger automated PyPI publishing

## License

[GPL-V2](LICENSE.txt)

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "drupal-news",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "drupal, news, aggregator, rss, ai, summarizer, newsletter",
    "author": "Drupal News Contributors",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/21/22/72b0bc8805ecbfa3c7a71edcf3554deb4b1b2374efdf0f14a8119f602b7c/drupal_news-0.0.5.tar.gz",
    "platform": null,
    "description": "# Drupal News Aggregator\n\nAutomated Drupal news aggregation with AI summarization.\n\n## Installation\n\n### From PyPI\n\n```bash\npip install drupal-news\n\n# With AI providers\npip install \"drupal-news[openai]\"\npip install \"drupal-news[anthropic]\"\npip install \"drupal-news[all-providers]\"\n```\n\n### From Source\n\n```bash\n./setup.sh\nsource venv/bin/activate\n```\n\n## Quick Start\n\n```bash\n# Using installed package\ndrupal-news --dry-run\n\n# Or from source\npython3 index.py --dry-run\n```\n\n## Configuration\n\n### Unified Configuration (config.yml)\n\nAll configuration is now in a single `config.yml` file:\n\n```bash\n# Create from example\ncp config.example.yml config.yml\n\n# Edit to customize\nnano config.yml\n```\n\n**Configuration sections:**\n\n- **Core settings**: timeframe, HTTP options, email, markdown\n- **Sources**: RSS feeds and web pages to scrape\n- **AI providers**: Model configurations for summarization\n- **Prompt template**: Customize AI summarization instructions\n- **API keys**: Store or reference environment variables\n\n### Custom Configuration Path\n\n```bash\ndrupal-news --config /path/to/config.yml\n\n# Or from source\npython3 index.py --config /path/to/config.yml\n```\n\n### Environment Variables (.env)\n\nYou can still use `.env` for sensitive data:\n\n```bash\n# .env (optional)\nOPENROUTER_API_KEY=sk-or-v1-...\nANTHROPIC_API_KEY=sk-ant-api03-...\nTIMEZONE=Europe/Athens\nSMTP_HOST=smtp.example.com\nSMTP_PORT=587\nSMTP_USER=user@example.com\nSMTP_PASS=password\nMAIL_TO=recipient@example.com\nMAIL_FROM=sender@example.com\n```\n\nReference them in `config.yml` using `${VAR_NAME}`:\n\n```yaml\napi_keys:\n  OPENROUTER_API_KEY: ${OPENROUTER_API_KEY}  # From .env\n  ANTHROPIC_API_KEY: ${ANTHROPIC_API_KEY}\n```\n\n### Configuration Examples\n\nSee `config.example.yml` for comprehensive examples of:\n\n- Multiple AI providers (OpenAI, Anthropic, Gemini, Ollama, etc.)\n- Custom API endpoints and proxies\n- Advanced page scraping with CSS selectors\n- Custom prompt templates\n\n**Migration Guide**: See `MIGRATION.md` if upgrading from old config files\n\n## Usage\n\n### Main Aggregator\n\n```bash\n# Using installed package\ndrupal-news --provider openai --days 7\ndrupal-news --dry-run --verbose\ndrupal-news --provider anthropic --email yes\n\n# Or from source\npython3 index.py --provider openai --days 7\n```\n\n### Scheduler\n\n```bash\n# Using installed package\ndrupal-news-scheduler --every friday --hour 9 --provider openai\ndrupal-news-scheduler --every monday --hour 8 --email yes --days 7\n\n# Or from source\npython3 scheduler.py --every friday --hour 9 --provider openai\n```\n\n### Email Sender\n\n```bash\n# Using installed package\ndrupal-news-email --latest\ndrupal-news-email --run-dir runs/2025-10-29\n\n# Or from source\npython3 -m drupal_news.email_sender --latest\n```\n\n### Cron\n\n```bash\n# Using installed package\n0 9 * * 5 drupal-news --provider openai --email yes\n\n# Or from source\n0 9 * * 5 cd /path && python3 index.py --provider openai\n```\n\n## Web Viewer\n\n```bash\n# Using installed package\ndrupal-news-viewer\n# Open http://localhost:5000\n\n# Or from source\npython3 src/viewer.py\n```\n\nFeatures: tabs/split view, run history, metrics, logs\n\n## Providers\n\nBuilt-in: OpenAI, Anthropic, Gemini, Ollama, LMStudio, Qwen, Grok, DeepSeek, OpenRouter\n\n**Generic:** Works with ANY OpenAI-compatible API (OpenRouter, Together AI, Groq, Perplexity, Fireworks, Azure OpenAI, custom endpoints)\n\nSee: [Generic Provider Guide](docs/GENERIC_PROVIDER.md)\n\n## CLI Commands\n\n### drupal-news\n\nMain aggregator command. Fetches, parses, and summarizes Drupal news.\n\n```bash\ndrupal-news [OPTIONS]\n\nOptions:\n  --provider <name>       AI provider (openai, anthropic, gemini, etc.)\n  --model <name>          Override provider's default model\n  --days <n>              Timeframe in days (default: 7)\n  --email yes|no          Send email report\n  --dry-run               Skip AI and email (testing mode)\n  --fetch-only            Only fetch and parse, skip AI\n  --use-sources <date>    Use cached sources from date (YYYY-MM-DD)\n  --config <path>         Custom config.yml path\n  --env <path>            Custom .env path\n  --outdir <path>         Custom output directory\n  --verbose               Enable debug logging\n```\n\n### drupal-news-scheduler\n\nSchedule recurring aggregator runs.\n\n```bash\ndrupal-news-scheduler --every <day> [OPTIONS]\n\nOptions:\n  --every <day>           Day of week (monday-sunday)\n  --hour <n>              Hour to run (0-23, default: 9)\n  --minute <n>            Minute to run (0-59, default: 0)\n  --provider <name>       AI provider to use\n  --model <name>          Model override\n  --email yes|no          Send email\n  --days <n>              Number of days to aggregate\n```\n\n### drupal-news-email\n\nSend aggregated reports via email.\n\n```bash\ndrupal-news-email [OPTIONS]\n\nOptions:\n  --latest                Send latest report\n  --run-dir <path>        Send specific run directory\n  --days <n>              Days back to check (default: 7)\n```\n\n### drupal-news-viewer\n\nLaunch web interface to view reports.\n\n```bash\ndrupal-news-viewer\n\nOpens http://localhost:5000\nFeatures: tabs, run history, metrics, logs\n```\n\n## Output\n\n`runs/YYYY-MM-DD/`: parsed.md, summary.md, sources.json, metrics.json, run.log\n\n## Project Structure\n\nWhen using from PyPI, configuration files are in `~/.drupal-news/` or current directory.\n\nWhen using from source:\n\n```\n\u251c\u2500\u2500 setup.sh        # Setup script\n\u251c\u2500\u2500 index.py        # Main entry (wrapper)\n\u251c\u2500\u2500 scheduler.py    # Scheduler (wrapper)\n\u251c\u2500\u2500 src/            # Source code\n\u251c\u2500\u2500 src/viewer.py        # Web viewer (wrapper)\n\u251c\u2500\u2500 venv/                # Virtual env\n\u251c\u2500\u2500 config.yml           # Unified configuration\n\u251c\u2500\u2500 config.example.yml   # Configuration examples\n\u2514\u2500\u2500 .env                 # Optional environment variables\n```\n\n## Exit Codes\n\n- 0:  Success\n- 10: Partial fetch failure\n- 20: Validation failed\n- 30: Summarizer failed\n- 40: Email failure\n- 50: Integrity check failed\n\n## Contributing\n\nContributions welcome! See [docs/RELEASING.md](docs/RELEASING.md) for release process.\n\n### Creating a Release\n\n```bash\n# Patch release (bug fixes)\n./release.sh patch -m \"Bug fixes and improvements\"\n\n# Minor release (new features)\n./release.sh minor -m \"New features\" --push\n\n# Major release (breaking changes)\n./release.sh major -m \"Breaking changes\" --push\n```\n\nThe release script:\n\n- Updates VERSION file\n- Updates RELEASES.md with changelog\n- Creates git commit and tag\n- Optionally pushes to trigger automated PyPI publishing\n\n## License\n\n[GPL-V2](LICENSE.txt)\n",
    "bugtrack_url": null,
    "license": "GPL-2.0",
    "summary": "Automated Drupal news aggregator with AI-powered summaries",
    "version": "0.0.5",
    "project_urls": {
        "Changelog": "https://github.com/theodorosploumis/drupal_news/blob/main/CHANGELOG.md",
        "Documentation": "https://github.com/theodorosploumis/drupal_news#readme",
        "Homepage": "https://github.com/theodorosploumis/drupal_news",
        "Issues": "https://github.com/theodorosploumis/drupal_news/issues",
        "Repository": "https://github.com/theodorosploumis/drupal_news"
    },
    "split_keywords": [
        "drupal",
        " news",
        " aggregator",
        " rss",
        " ai",
        " summarizer",
        " newsletter"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "941f530f3f64ce0b86190807cfd1a8cb4ca72de73bff53f9749799df5f95deb2",
                "md5": "97c470dddc3c9d8692d3cfb8171a52fa",
                "sha256": "c7f284f857e5bac77dbb246a35c7dea525b626a42b984722417e0b5d93b07ecf"
            },
            "downloads": -1,
            "filename": "drupal_news-0.0.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "97c470dddc3c9d8692d3cfb8171a52fa",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 67120,
            "upload_time": "2025-10-30T00:00:54",
            "upload_time_iso_8601": "2025-10-30T00:00:54.299027Z",
            "url": "https://files.pythonhosted.org/packages/94/1f/530f3f64ce0b86190807cfd1a8cb4ca72de73bff53f9749799df5f95deb2/drupal_news-0.0.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "212272b0bc8805ecbfa3c7a71edcf3554deb4b1b2374efdf0f14a8119f602b7c",
                "md5": "a7159f010ad6b5617b5e1913f5d63acd",
                "sha256": "30f5c0d670c0f6ab5ce1d309c7b84f864a17535ba76318aa0ca0956fa04b787e"
            },
            "downloads": -1,
            "filename": "drupal_news-0.0.5.tar.gz",
            "has_sig": false,
            "md5_digest": "a7159f010ad6b5617b5e1913f5d63acd",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 70846,
            "upload_time": "2025-10-30T00:00:55",
            "upload_time_iso_8601": "2025-10-30T00:00:55.547836Z",
            "url": "https://files.pythonhosted.org/packages/21/22/72b0bc8805ecbfa3c7a71edcf3554deb4b1b2374efdf0f14a8119f602b7c/drupal_news-0.0.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-10-30 00:00:55",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "theodorosploumis",
    "github_project": "drupal_news",
    "github_not_found": true,
    "lcname": "drupal-news"
}
        
Elapsed time: 1.89503s