Skip to main content

Export iNaturalist observations to Ankivalenz-formatted Markdown for creating flashcards

Project description

iNaturalist to Ankivalenz

A Python CLI tool to export iNaturalist observations to Ankivalenz-formatted Markdown for creating flashcards.

Features

  • Fetch user's observations from iNaturalist API
  • Download observation images to a local directory
  • Generate Ankivalenz-compatible Markdown flashcards
  • Support for multiple observations
  • Preserve observation metadata

Installation

pip install inaturalist-to-ankivalenz

Usage

Export observations for any iNaturalist user:

inaturalist-to-ankivalenz --username <username> [--limit <number>] [--output-dir <directory>] [--common-name-lang <language>]

Options:

  • --username: iNaturalist username (required)
  • --limit: Maximum number of observations to fetch (default: 100)
  • --output-dir: Output directory for images and markdown (default: current directory)
  • --common-name-lang: Language for common names (e.g., 'en', 'da', 'sv') (default: 'en')

Output

The tool will:

  1. Create an iNaturalist/ directory to store downloaded images
  2. Generate an iNaturalist.md file with Ankivalenz-formatted flashcards

Example output format:

# iNaturalist

- ![iNaturalist/observation-1.jpg] ?:: Monarch Butterfly (Danaus plexippus)
- ![iNaturalist/observation-2.jpg] ?:: California Poppy (Eschscholzia californica)

Development

To set up the development environment:

# Clone the repository
git clone https://github.com/yourusername/inaturalist-to-ankivalenz.git
cd inaturalist-to-ankivalenz

# Create and activate virtual environment
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install in development mode
pip install -e .

# Run tests
pytest

License

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

inaturalist_to_ankivalenz-0.2.0.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

inaturalist_to_ankivalenz-0.2.0-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file inaturalist_to_ankivalenz-0.2.0.tar.gz.

File metadata

File hashes

Hashes for inaturalist_to_ankivalenz-0.2.0.tar.gz
Algorithm Hash digest
SHA256 367215623aaeca8ab488aa1914b2b35efea6997472794af640fd1d6eda83c707
MD5 45702dfcf7d6632f9aad2c311a29fc12
BLAKE2b-256 55c7ea7f5441fc6e29b6531167c2c1aa70dab851bc73b889acbbbbcc9d18d07e

See more details on using hashes here.

File details

Details for the file inaturalist_to_ankivalenz-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for inaturalist_to_ankivalenz-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cd8919faaa3b37cc7752bd477ed564e251fe4c88bbe73769683dc7ebe17bfbf9
MD5 7ee04f81ca7820d44ca3b2b3ff7a206b
BLAKE2b-256 0cea32584f510b7cfc9f8a266c8b09d19eae816b39a689ac0ef9033f0889a227

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page