Skip to content

python-lodz/pythonlodz.org

Repository files navigation

pythonlodz.org

Repo for keeping the source code of our official website

Roadmap

How to run the website locally

  1. Install Hugo.

  2. Clone this repository.

  3. On new clone and when there are submodule updates:

    git submodule update --init --depth 1
    
  4. Run the Hugo development server:

    cd page
    hugo server
    
  5. Open http://127.0.0.1:1313.

Python Łódź Meetup Management CLI

This repository includes a Python CLI tool (pyldz) for managing meetup data and generating Hugo content from Google Sheets.

Prerequisites

  • Python 3.13+
  • uv package manager
  • Google Sheets API credentials (.client_secret.json)

Installation

  1. Install dependencies:

    uv sync
  2. Set up Google Sheets API credentials:

    • Create a project in Google Cloud Console
    • Enable the Google Sheets API
    • Create credentials (OAuth 2.0 Client ID)
    • Download the credentials file as .client_secret.json in the project root
  3. Configure environment variables in .env:

    GOOGLE_SHEETS__SHEET_ID=your_google_sheets_id_here

Usage

The CLI provides single command to generate Hugo content:

Generate Hugo markdown files for meetups:

# Generate single meetup
uv run pyldz -m 61

# Generate all meetups data (not sure if it works correctly)
uv run pyldz

This command will:

  • Fetch meetup data from Google Sheets
  • Generate markdown files in content/spotkania/{meetup_id}/index.md
  • Create featured images using Hugo templates
  • Include frontmatter with meetup metadata
  • Generate content sections for talks, speakers, and sponsors

Command Help

Get help for any command:

uv run pyldz --help

Development

Running Tests

uv run pytest

Code Quality

# Format code
uv run ruff format

# Lint code
uv run ruff check

# Type checking
uv run mypy src/

Project Structure

├── src/pyldz/           # Python source code
│   ├── main.py          # CLI entry point with typer commands
│   ├── config.py        # Configuration management
│   ├── meetup.py        # Meetup data models and Google Sheets integration
│   └── hugo_generator.py # Hugo content generation
├── tests/               # Test suite
├── page/                # Hugo site files
│   ├── content/         # Hugo content
│   ├── layouts/         # Hugo templates
│   └── assets/          # Static assets
└── pyproject.toml       # Project configuration

About

Source code of our website

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •