Skip to content

ignuslabs/EventScraper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Event Scraper

A Chrome extension that extracts event information from webpages and creates calendar entries. Uses Ollama LLM locally through Docker for event extraction.

Features

  • 🧠 Extract events from webpages using local LLM (Ollama)
  • 🔍 Scrape multiple sites from a configuration
  • 📅 Generate iCalendar (.ics) files from extracted events
  • 🔄 Sync with your preferred calendar app
  • 🛠️ Fully configurable through the extension UI

Project Structure

EventScraper/
├── manifest.json         # Chrome extension manifest
├── html/                 # HTML files for extension UI
├── css/                  # CSS styles for extension
├── js/                   # JavaScript for extension logic
│   ├── background.js     # Extension background script
│   ├── content.js        # Content script for page interaction
│   ├── popup.js          # Popup UI logic
│   └── contentScripts/   # Additional content scripts
└── server/               # Server-side Docker components
    ├── docker-compose.yml # Docker services configuration
    ├── Dockerfile        # API server Dockerfile
    ├── app.py            # FastAPI server for LLM integration
    └── requirements.txt  # Python dependencies

Setup

Extension Setup

  1. Clone this repository
  2. Open Chrome and go to chrome://extensions/
  3. Enable "Developer mode" in the top right
  4. Click "Load unpacked" and select the EventScraper folder
  5. The extension is now installed in your browser

Server Setup

  1. Navigate to the server directory
  2. Start the Docker containers:
    docker-compose up -d
    
  3. The server will be available at http://localhost:8000

Usage

  1. Click the extension icon to open the popup
  2. To extract events from the current page, click "Extract Events from Page"
  3. To scrape multiple sites, click "Scrape from Config"
  4. View extracted events by clicking "View Saved Events"
  5. Generate a calendar file with "Generate Calendar"

Configuration

LLM Options

The extension supports two LLM options:

  1. Ollama (Local): Uses a local Ollama instance running in Docker
  2. OpenAI: Uses OpenAI's API (requires API key)

Timezone

Set your preferred timezone for calendar events in the Settings panel.

Local Development

Extension

The Chrome extension uses manifest v3 and follows standard extension development practices.

Server

The server component uses FastAPI and Ollama running in Docker:

  1. Ollama container: Provides the LLM service
  2. API server: Interfaces between the extension and Ollama

Requirements

  • Chrome browser
  • Docker and Docker Compose
  • Python 3.9+ (for server development)

About

playing around with chrome extensions

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published