{"id":21633874,"url":"https://github.com/rhaberkorn/openrussian-cli","last_synced_at":"2025-04-11T15:29:09.102Z","repository":{"id":47919915,"uuid":"182183594","full_name":"rhaberkorn/openrussian-cli","owner":"rhaberkorn","description":"Offline Console Russian Dictionary (based on openrussian.org)","archived":false,"fork":false,"pushed_at":"2024-08-21T21:21:15.000Z","size":106008,"stargazers_count":12,"open_issues_count":2,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-25T11:39:07.313Z","etag":null,"topics":["bash-completion","dictionary","russian","terminal-based"],"latest_commit_sha":null,"homepage":null,"language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rhaberkorn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-04-19T01:50:19.000Z","updated_at":"2025-03-03T21:42:32.000Z","dependencies_parsed_at":"2024-04-25T11:57:01.428Z","dependency_job_id":null,"html_url":"https://github.com/rhaberkorn/openrussian-cli","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhaberkorn%2Fopenrussian-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhaberkorn%2Fopenrussian-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhaberkorn%2Fopenrussian-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhaberkorn%2Fopenrussian-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rhaberkorn","download_url":"https://codeload.github.com/rhaberkorn/openrussian-cli/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248430699,"owners_count":21102062,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bash-completion","dictionary","russian","terminal-based"],"created_at":"2024-11-25T03:14:23.474Z","updated_at":"2025-04-11T15:29:09.078Z","avatar_url":"https://github.com/rhaberkorn.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"# An Offline Console Russian Dictionary (based on openrussian.org)\n\nThis is an offline console and terminal-friendly Russian dictionary,\nbased on the database of [openrussian.org](https://en.openrussian.org/).\n\n* Works offline (without internet access) and is very fast.\n  This really pays off if you browse Russian words a lot.\n* It integrates well into the console environment - browse dictionary\n  entries like man pages.\n  Internally, Troff code is generated which makes further processing of generated\n  pages ~~very easy~~ possible.\n* Puts very low requirements on the runtime environment:\n  a black and white terminal display is sufficient.\n* Auto completions supported for Bash and Zsh.\n  Most of this is handled by the script's `-C` argument, so it\n  is trivial to add support for other shells.\n  Contributions are welcome!\n* Search terms can be: base forms (infinitives, nominative singular nouns...),\n  inflections (all cases, conjugations, short forms, imperatives...) and\n  translations.\n* Search terms are [glob patterns](https://en.wikipedia.org/wiki/Glob_(programming)),\n  which is very useful for looking up words with uncertain spelling or finding\n  related words.\n\nPossible future features:\n\n* Limit the number of results (by default to 1000) - the sheer number of results\n  can slow down auto-completions.\n* Not all terminals can display the accent correctly (linux console), so we should have\n  a fallback.\n  Ideally this can be detected, or we simply whitelist terminal emulators via $TERM.\n* Better internationalization when generating German pages (`-Lde`).\n* Lookups via popular\n  [ASCII-cyrillic transliterations](https://en.wikipedia.org/wiki/Informal_romanizations_of_Cyrillic) -\n  would be useful without a Russian/cyrillic keyboard layout.\n* Be tolerant to typing mistakes.\n* Accented characters are still broken in nroff tables\n  (see https://lists.gnu.org/archive/html/groff/2018-08/msg00000.html).\n  We could and probably should of translate most vowel-accent combinations to single precomposed codepoints,\n  but that might cause problems when copying text from the terminal.\n\n## Installation\n\n### Ubuntu\n\nBuild-time dependencies:\n\n    sudo apt-get install make pkg-config lua5.2 bash-completion wget unzip gawk sqlite3\n\nRun-time dependencies:\n\n    sudo apt-get install lua5.2 lua-sql-sqlite3 man-db bash-completion\n\nFurthermore, you will need the [luautf8 library](https://github.com/starwing/luautf8).\nUsing [LuaRocks](https://luarocks.org/), it may be installed as follows:\n\n    sudo luarocks-5.2 install luautf8\n\nBuilding is straight forward:\n\n    make\n    sudo make install\n\nIf you want to redownload the latest [openrussian.org](https://en.openrussian.org/)\ndatabase:\n\n    make clean all check\n\n**Warning:** While the database content might be newer, the database schema\nmight also at any time become incompatible with the existing script.\nThat is why a `check` is performed after building everything in the above\nexample.\nIf it returns lots of errors, you should probably stay with the original database.\nOtherwise, the error messages might help in fixing/upgrading the script.\nYou are of course welcome to contribute patches. :-)\n\n### FreeBSD\n\nBuild-time dependencies:\n\n    pkg install gmake pkgconf groff lua52 lua52-luasql-sqlite3 lua52-luarocks wget sqlite3\n\nInstalling [luautf8](https://github.com/starwing/luautf8) using LuaRocks:\n\n    luarocks52 install luautf8\n\nBuilding is straight forward:\n\n    gmake LUA=lua52 LUAC=luac52\n    gmake install\n\n### NixOS\n\n`openrussian-cli` is part of the `nixos-unstable` (and soon `nixos-21.05`) channels.\n\nTo install `openrussian-cli` on NixOS:\n* Via `configuration.nix`:\n  ```nix\n  environment.systemPackages = [ pkgs.openrussian-cli ];\n  ```\n* Via `nix-env`:\n  ```bash\n  nix-env -iA openrussian-cli\n  ```\n\nSee https://nixos.org/manual/nixos/stable/index.html#sec-package-management for more information.\n\n### Bash Aliases\n\nWhile the default command name `openrussian` was chosen to avoid cluttering the\nglobal command namespace, you may want to define more concise shortcuts.\nIn order to do so, add something like the following to your `~/.bashrc`:\n\n    alias ru='openrussian' ру='openrussian'\n    _completion_loader openrussian\n    complete -F _openrussian_completions ru ру\n\nThis adds the alias `ru` (latin) and `ру` (cyrillic).\nIt would however be useful to add a few default options to the `ru` and `ру` aliases.\nUnfortunately, above method cannot take that into account.\nA more robust solution might be to install the\n[complete-alias](https://github.com/cykerway/complete-alias) script and adding\nsomething like the following to your `~/.bash_completion`:\n\n    alias ru='openrussian -Lde -Len' ру='openrussian -Lde -Len'\n    complete -F _complete_alias ru ру\n\n### Zsh Aliases\n\nAutocompletion will automatically work with aliases in the Zsh, so it is\nsufficient to add the following to your `~/.zshrc`:\n\n    alias ru='openrussian -Lde -Len' ру='openrussian -Lde -Len'\n\n### Fish Aliases\n\nThe Fish `alias` command creates local shell aliases or\npersistent aliases when invoked with the `--save` flag.\n\n    alias --save ru='openrussian -Lde -Len'\n    alias --save ру='openrussian -Lde -Len'\n\n## Examples\n\nA simple lookup:\n\n    openrussian саморазрушение\n\nDisplay the German translation:\n\n    openrussian -Lde саморазрушение\n\nDisplay both German and English translations, giving precedence to German:\n\n    openrussian -Lde -Len саморазрушение\n\nIf you are unsure which consonants appear in this word:\n\n    openrussian самора[сз]ру[шщ]ение\n\nFind more words derived from \"разрушение\":\n\n    openrussian *разрушение\n\nAvoid ambiguous search results:\n\n    openrussian -V коса\n\nLook up by translation:\n\n    openrussian catch a cold\n\nGraphical display using `groffer`:\n\n    openrussian -p кошка | groffer -Kutf8 --mode pdf2\n\nYou may have to specify a non-default font supporting\ncyrillic characters via groffer's `-f` option.\n\n## License\n\nThe main program is licensed under the GNU General Public License Version 3 or later\n(see `COPYING`).\n\nThis repository contains database dumps from the\n[openrussian.org website](https://en.openrussian.org/dictionary).\nThe `openrussian-sql.zip` file is licensed under the [CC BY-SA](https://creativecommons.org/licenses/)\nlicense.\n\nThis repository also contains code, imported from the\n[mysql2sqlite repository](https://github.com/dumblob/mysql2sqlite.git).\nThe file `mysql2qlite` is licensed under the following terms and conditions:\n\n```\nThe MIT License (MIT)\n\nCopyright (c) 2015 esperlu, 2016 dumblob\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n```\n\n## Further documentation\n\n    man openrussian\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frhaberkorn%2Fopenrussian-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frhaberkorn%2Fopenrussian-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frhaberkorn%2Fopenrussian-cli/lists"}