{"id":17968133,"url":"https://github.com/seletskiy/runki","last_synced_at":"2025-07-25T23:36:44.452Z","repository":{"id":17005789,"uuid":"19769047","full_name":"seletskiy/runki","owner":"seletskiy","description":"Effortless AnkiSRS card managment to learn foreign words","archived":false,"fork":false,"pushed_at":"2024-03-25T19:18:00.000Z","size":39,"stargazers_count":24,"open_issues_count":1,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-20T00:11:16.933Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/seletskiy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-05-14T06:36:49.000Z","updated_at":"2025-02-25T12:53:51.000Z","dependencies_parsed_at":"2022-09-06T09:50:54.462Z","dependency_job_id":null,"html_url":"https://github.com/seletskiy/runki","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seletskiy%2Frunki","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seletskiy%2Frunki/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seletskiy%2Frunki/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seletskiy%2Frunki/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/seletskiy","download_url":"https://codeload.github.com/seletskiy/runki/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245426437,"owners_count":20613358,"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":[],"created_at":"2024-10-29T14:20:16.557Z","updated_at":"2025-03-25T08:31:51.977Z","avatar_url":"https://github.com/seletskiy.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"runki\n=====\n\nAnkiweb.net console client. Manage Anki flashcards without a friction.\n\n\nInstallation\n------------\n\nUse AUR package https://aur.archlinux.org/packages/runki\n\nFor other systems you can install runki through `go get`:\n\n  1. Install go.\n  2. Execute `go get github.com/seletskiy/runki`\n\n\nConfiguration\n-------------\n\nAll command line arguments can be stored in configuration file called\n`~/.config/runki/runkirc` with following format:\n```\n--[option\n  [value]]\n```\n\nExample:\n```\n--user\n  user@example.com\n\n--pass\n  password\n\n--deck\n  english\n```\n\nAll further invocations of `runki` can be done without specifying user/pass/deck\narguments.\n\nSee `runki --help` for complete arguments list.\n\nUsage\n-----\n\nAdd card to ankiweb.net:\n```\necho test | runki\n# or\necho test | runki --user=\u003cUSERNAME\u003e --pass=\u003cPASSWORD\u003e --deck=\u003cDECKNAME\u003e\n```\n\nAdd list of cards to ankiweb.net:\n```\ncat words-list | runki\n```\n\nAdd clipboard contents to ankiweb.net:\n```\necho xclip -selection clipboard -o | runki\n```\n\nAdd current selection to ankiweb.net:\n```\necho xclip -o | runki\n```\n\nAdd current selection to ankiweb.net and show translation:\n```\nnotify-send \"$(xclip -o | runki)\"\n```\n\n\nAdd word by shortcut (i3 window manager)\n----------------------------------------\n\nCreate file ~/bin/add-anki-word with following contents:\n```bash\n#!/bin/bash\n\nnotify-send \"$(echo $(xclip -o) | runki)\"\n```\n\nExecute following command:\n```\necho \"bindsym \\$mod+Escape exec add-anki-word\" \u003e\u003e ~/.i3/config \u0026\u0026 i3-msg reload\n```\n\nNow it's possible to highlight unknown word in the browser and press only one\nshortcut to get word be added into your Anki account.\n\n\nKindle\n------\n\nIt is possible to learn foreign words directly from Kindle. When you encounter\nunknown word, just tap on it, then select \"Highlight\". All this highlights will\nbe saved to the file \"/documents/My Clippings.txt\" in the Kindle FS.\n\nAfterwards this file can be filtered to extract single word highlights (see\nexample script here: https://github.com/seletskiy/dotfiles/blob/92a0e8fdb533106d700dc4c7415f4d41b232edff/bin/kindle-filter-words).\n\nSo, all highlighted words can be easily added to Anki like this:\n\n```bash\nkindle-filter-words \"/mnt/documents/My Clippings.txt\" | tac | runki --cut 3\n```\n\nNote, that `tac` command will reverse incoming list so most recent items will\ncame first. `--cut 3` flag tells runki to exit if it detect at least `3` words\nthat are already added to Anki. `tac` and `--cut` combination allows you to\nsync words from Kindle in seamless way just running one single command again\nand again.\n\n\nKindle + udev\n-------------\n\nOk, let's go deeper. One probably want to sync words that was highlighted on the kindle\nautomatically when one connect kindle to the computer.\n\nSo, we need to create udev rule like this:\n\n```\nACTION==\"add\", SUBSYSTEM==\"block\", ENV{DEVTYPE}==\"partition\", ENV{ID_VENDOR_ID}==\"1949\", RUN+=\"/usr/bin/su \u003cUSERNAME\u003e -lc 'DISPLAY=:0 kindle-to-anki $env{DEVNAME}'\"\n```\n\nAfter kindle is connected, `kindle-to-anki` program will have to be runned.\nIt will add new words directly to Anki and show nice notification about how\nmany new words has been added to.\n\nExample of this `kindle-to-anki` program can be found there: https://github.com/seletskiy/dotfiles/blob/1c9da6d347cc658c9d6d177a61ef94423a3c36d4/bin/kindle-to-anki\n\n\nVERSION\n-------\n\n0.0.1\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseletskiy%2Frunki","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fseletskiy%2Frunki","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseletskiy%2Frunki/lists"}