transparent-classroom-photos-grabber-rs

Crates.iotransparent-classroom-photos-grabber-rs
lib.rstransparent-classroom-photos-grabber-rs
version0.2.0
created_at2025-05-22 17:21:48.058739+00
updated_at2025-05-22 17:24:15.358033+00
descriptionA Rust implementation to download photos from Transparent Classroom
homepagehttps://github.com/harperreed/transparent-classroom-photos-grabber-rs
repositoryhttps://github.com/harperreed/transparent-classroom-photos-grabber-rs
max_upload_size
id1685418
size722,758
Harper Reed (harperreed)

documentation

README

📸 Transparent Classroom Photos Grabber

A Rust implementation to download photos from Transparent Classroom

MIT License Rust

🌟 Summary

Transparent Classroom Photos Grabber is a command-line tool that lets you easily download and organize photos from your child's Transparent Classroom account. It automatically handles authentication, crawls through all available posts, and downloads photos with proper metadata including location and timestamps.

Built in Rust for speed and reliability, this tool ensures you never miss a classroom moment while maintaining a well-organized photo collection.

🚀 How to Use

Prerequisites

  • Rust and Cargo installed (install instructions)
  • Transparent Classroom account credentials
  • School ID and Child ID from Transparent Classroom

Installation

# Clone the repository
git clone https://github.com/harperreed/transparent-classroom-photos-grabber-rs.git
cd transparent-classroom-photos-grabber-rs

# Build the project
cargo build --release

Configuration

You need to set the following environment variables:

export TC_EMAIL="your.email@example.com"
export TC_PASSWORD="your_password"
export SCHOOL=12345        # Your school ID
export CHILD=67890         # Your child ID
export SCHOOL_LAT=41.9032  # School latitude
export SCHOOL_LNG=-87.6663 # School longitude
export SCHOOL_KEYWORDS="school, montessori, chicago"  # Keywords for metadata

Alternatively, create a .env file in the project directory with these values (see .env.example).

Running

# Download photos to default ./photos directory
cargo run --release

# Or specify a custom output directory
cargo run --release -- /path/to/output/directory

Command-line Options

Usage: transparent-classroom-photos-grabber [OUTPUT_DIR]

If OUTPUT_DIR is not provided, photos will be saved to './photos'

🔧 Technical Information

Architecture

The project is structured around these core components:

  • Client: Handles authentication and API interactions with Transparent Classroom
  • Config: Manages user configuration from environment variables
  • Cache: Provides efficient caching of API responses to reduce network requests
  • Error: Centralized error handling for robust operation

Features

  • ✅ Secure authentication to Transparent Classroom
  • ✅ Automatic crawling of all posts with photos
  • ✅ Smart caching to avoid unnecessary downloads
  • ✅ Embedded metadata including GPS coordinates and timestamps
  • ✅ Progress indicators for download tracking
  • ✅ Fallback mechanisms for handling different API responses
  • ✅ Skip already downloaded photos for incremental updates

Dependencies

Key libraries used:

  • reqwest: HTTP client for API requests
  • scraper: HTML parsing for extracting photo information
  • chrono: Date and time handling
  • serde: Serialization/deserialization for JSON data
  • indicatif: Progress bars for CLI experience
  • dotenv: Environment variable management

Development

For development and testing:

# Run tests
cargo test

# Run with debug logging
RUST_LOG=debug cargo run

# Format code
cargo fmt

# Check for issues
cargo clippy

📝 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgements

  • Built by Harper Reed
  • Inspired by the original Python implementation
Commit count: 36

cargo fmt