Crates.io | wiki_reader |
lib.rs | wiki_reader |
version | 0.1.3 |
source | src |
created_at | 2024-01-21 17:10:44.799264 |
updated_at | 2024-07-30 00:36:03.846817 |
description | Terminal app to search through wikipedia local dumps |
homepage | |
repository | https://github.com/sarjann/WikiReader-rs |
max_upload_size | |
id | 1107744 |
size | 50,974 |
This project's goal is to create a terminal app (using mainly vim motions) to allow you to quickly search through an offline copy of wikipedia.
This can be installed through crates.io
cargo install wiki_reader
# To start (Please set the config as below first)
wiki_reader
This app expects a config file to be present at
~/.config/wikiterm/config.json
With the following format:
{
"wiki_bzip_path": "~/Documents/wiki/simple/base.bz2",
"meta_directory": "~/Documents/wiki/simple/meta",
}
The meta_directory will be created from the above config if it does not already exist.
The wiki_bzip_path
is the path to the bzip2 (xml) archive file that is
downloaded. It's expected that this is a multistream version.
https://meta.wikimedia.org/wiki/Data_dump_torrents
Note that larger dumps will take a lot longer to index (but this only needs to be done once).
The meta_directory is the place you want any indexing / file produced by this project to go.
You should be able to navigate with (currently a subset of vim bindings)
j, k
up, down
:q to quit or Ctrl-c
Esc to exit back to normal mode
/ to search
These are some basic bindings, in order to get the rest, use ?.
This is currently a work in progress so many features will be missing / not perfect, e.g.
As this is still fairly new there will probably be quite a few breaking changes along the way, e.g. changes the config path or the saved file names (which will require reindexing).
If you want to make significant changes please first open an issue to avoid any wasted time. This is my first OS project and one of my first proper rust projects which I'm using to learn rust so this might not be properly idiomatic rust and there may be some shortcuts here.