-
Notifications
You must be signed in to change notification settings - Fork 3
Documentation
Tatoeba-karini is a command line tool. It provides commands intuitively named:
browser
to open a browser, translate
to... well, translate, find
to...
find.
This page assumes that you already have an working copy of the script. If you don't, please refer to either the Introduction or the Installation pages for more details.
The main documentation is on this wiki.
If you need access to this wiki locally, just git clone
it:
$ git clone https://github.com/lsrdg/tatoeba-karini.wiki.git
$ cd tatoeba-karini.wiki
Additionally, you can find the following files on the root of the project:
- README
- LICENSE
- tatoeba-karini-manpage.1
- CONTRIBUTING
Take a look at the commands below and just call them with their required arguments:
$ python tatoeba-karini.py [COMMAND] [ARGUMENTS]
As mentioned on the Introduction, Tatoeba-karini has three groups of commands:
- 1 Internet related: yes, they need internet connection.
- 2 Local searches: they need their corresponding files.
- 3 Helper: to help us (e.g. download files needed by the commands on the 2nd group)
Positional command | Description | Required arguments | Example |
---|---|---|---|
browser (or b ) |
Open the browser in a new tab performing a search on tatoeba.org | 3 | $ tatoeba-karini -b eng jpn breath |
find (or f ) |
Find sentences in X language containing the Y-term | 2 | $ tatoeba_karini find yor water |
abbreviate |
List languages and their abbreviation used by Tatoeba | 1 | $ tatoeba_karini abbreviate Japanese |
scrap (or s
|
Scrap Tatoeba.org. Works in the same way as the main search on the website | 3 | $ tatoeba_karini scrap eng ara watermelon |
translate (or t ) |
Search for sentences containing term in a specific language and the translation of the sentences in another language | 3 | $ tatoeba_karini translate eng jpn air |
id |
Open Tatoeba on the browser searching by sentence's ID | 1 | $ tatoeba_karini id 825762 |
download |
Download files (links or sentences ) from Tatoeba.org in order to perform offline searches |
1 | $ tatoeba_karini download links |
--version (or -v ) |
Prints the version | 0 | $ tatoeba_karini --version |
A brief presentation of each command and how to use them. Alternatively, jump to the Cheatsheet.
$ python tatoeba_karini.py browser eng por water
$ python tatoeba_karini.py find eng water
$ python tatoeba_karini.py abbreviate Japanese
$ python tatoeba_karini.py scrap eng jpn water
$ python tatoeba_karini.py translate eng jpn water
$ python tatoeba_karini.py id 6789
$ python tatoeba_karini.py download sentences
$ python tatoeba_karini.py --version
$ python tatoeba_karini.py --help
On the root of your copy of Tatoeba-karini, there is a file named
tatoeba-karini-manpage.1
. Since there is no automated installation process,
you need to either install or read it manually.
If you are on the root of the project, run the following command to view the manpage:
$ man -l tatoeba-karini-manpage.1
If you want to install it (and run it despite of your current location), please refer to your system's documentation. It can be as simple as:
$ manpath
The desired path will probably be something like /usr/local/share/man
.
Copy the man file to the directory and run the mandb
:
$ sudo cp tatoeba-karini-manpage.1 /usr/local/share/man/
$ mandb
$ man ./tatoeba-karini-manpage.1
If you have tab completion on your shell, use it: $ man tatoe[TAB]
should
expand to $ man ./tatoeba-karini-manpage.1
.
Again, check your system's/distro's documentation on how to deal with manually installed manpages.
Please refer to Troubleshooting.