Skip to content

agmmnn/nisanyan-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nişanyan CLI

screenshot

GitHub release PyPI Downloads

CLI tool for the Turkish etymological dictionary, nisanyansozluk.com.

Explore the origins, history, and development of Turkish words directly from your terminal. This tool provides access to Sevan Nişanyan's comprehensive etymological database, including the "Adlar" (names) dictionary.

  • Etymology Tree: Visualize the lineage of words with the --tree flag.
  • Random Word: Discover new words and their origins with --random.
  • Adlar Support: Access the Turkish names dictionary (nisanyanadlar.com) using -ad.
  • Rich Output: Beautifully formatted terminal output thanks to Rich.
  • Plain Mode: Clean, unformatted text output for scripts and piping.

Installation

pip install nisanyan-cli

or

uv tool install nisanyan-cli

Usage

Basic Search

Simply provide the word you want to look up:

nis anadolu

Usage Screenshot

Etymology Tree (-t, --tree)

View the word's history as a hierarchical tree:

nis çikolata --tree

Output Example:

çikolata (Günümüz Türkçesi)
└── cioccolata (İtalyanca): kakao yağı ve şekerle imal edilen yiyecek maddesi.
    └── chocolate (İspanyolca): ~.
        └── xocolatl (Aztekçe): kakaodan yapılan içecek.
            ├── xocolli (Aztekçe): acı.
            └── atl (Aztekçe): su.

Tree Screenshot

Nişanyan Adlar (-ad)

Query the names dictionary for meanings and origins:

nis gökçe -ad

Adlar Screenshot

Combine with random for inspiration: nis -ad -r

Discover Random Words (-r, --random)

Explore the dictionary randomly:

nis -r -t

Commands & Arguments

Argument Long Flag Description
<word> The word to search for (positional).
-h --help Show help message and exit.
-t --tree Show result as an etymology tree.
-r --random Select a random word and display results.
-p --plain Output plain text (no styling).
-ad Fetch results from nisanyanadlar.com.
-v --version Show program's version number and exit.

Development

Prerequisites

  • Poetry (Dependency Management)

Setup

  1. Clone the repository:
    git clone https://github.com/agmmnn/nisanyan-cli.git
    cd nisanyan-cli
  2. Install dependencies:
    poetry install
  3. Run the CLI in development mode:
    poetry run nis <word>

TODO

  • Better processing of API results for better alignment with the website's format.
  • Expansion of abbreviations in supplementary descriptions to their full forms.

Dependencies

About

CLI tool for Turkish etymological dictionary, nisanyansozluk.com

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages