Skip to content

licht1stein/sanskrit-upaya

Repository files navigation

Sanskrit Upaya icon

Sanskrit Upāya

GitHub release Build Homebrew

A fast, cross-platform Sanskrit dictionary desktop application built with Go, Fyne, and SQLite FTS5.

Upāya (उपाय) means "method", "means", or "tool" in Sanskrit.

Screenshot

Features

  • Fast search: SQLite FTS5 provides sub-millisecond exact/prefix searches
  • Cross-platform: Windows, macOS (Intel & Apple Silicon), Linux
  • Multiple search modes:
    • Exact match
    • Prefix search
    • Contains (fuzzy) search
    • Full-text (reverse lookup in definitions)
  • IAST ↔ Devanagari: Automatic transliteration for search queries
  • 36 dictionaries: All Cologne Digital Sanskrit Dictionaries
  • Starred articles: Save favorites for quick access
  • Search history: Track and recall previous searches
  • Zoom control: 50%-200% UI scaling

Tech Stack

  • Go - Application language
  • Fyne - Cross-platform GUI framework
  • SQLite FTS5 - Full-text search engine
  • modernc.org/sqlite - Pure Go SQLite (no CGO required)

Installation

macOS (Homebrew)

The best way to install the app is using Homebrew. You'll need to install it first if you don't have it yet.

brew install --cask licht1stein/tap/sanskrit-upaya

To update:

brew update
brew upgrade sanskrit-upaya

Linux

Debian/Ubuntu (.deb)

Download the .deb package from the Releases page and install:

sudo dpkg -i sanskrit-upaya_*_amd64.deb

Fedora/RHEL (.rpm)

Download the .rpm package from the Releases page and install:

sudo rpm -i sanskrit-upaya-*-1.x86_64.rpm

Windows

Download the latest release from the Releases page.

On first run, the app will download the dictionary database (~670 MB).

Building from Source

Prerequisites

  • Go 1.21+
  • For Linux: libgl1-mesa-dev xorg-dev

Using Nix (recommended)

# Enter development environment with all dependencies
nix-shell

# Run the app
go run ./cmd/desktop

# Build release binary
go build -o sanskrit-upaya ./cmd/desktop

Without Nix

# Download dependencies
go mod tidy

# Run the app
go run ./cmd/desktop

# Build release binary
go build -o sanskrit-upaya ./cmd/desktop

Project Structure

sanskrit-upaya/
├── cmd/
│   ├── desktop/          # Fyne UI application
│   └── indexer/          # Build SQLite database from JSON
├── pkg/
│   ├── download/         # First-run database download
│   ├── search/           # SQLite FTS5 search engine
│   ├── state/            # User settings, history, starred
│   └── transliterate/    # IAST ↔ Devanagari conversion
├── .github/workflows/    # GitHub Actions for releases
├── flake.nix             # Nix flake (package + dev shell)
└── shell.nix             # Nix development environment (legacy)

Data Source

Dictionary data from Cologne Digital Sanskrit Dictionaries:

  • 36 dictionaries
  • ~1.3M words and articles

License

MIT

About

Cross-platform Sanskrit dictionary

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages