Skip to content
This repository was archived by the owner on Jun 25, 2026. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Contributing to wiki-tui
First of all, thank you for taking the time to contribute!
You can read all of the neccessary information on the wiki-tui website.
You can read all of the necessary information on the wiki-tui website.
2 changes: 1 addition & 1 deletion docs/docs/configuration/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ api.search_type = "text"
### Enabling query rewrites
[:octicons-tag-24: 0.9.0][release-0.9.0] · :octicons-milestone-16: Default `false`

Enable interal query rewriting. Wikipedia can rewrite the query into another which is thought to
Enable intenal query rewriting. Wikipedia can rewrite the query into another which is thought to
provide better results by, for instance, correcting spelling errors

```toml
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/configuration/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
I'm planning on overhauling the structure of the configuration. This
includes but is not limited to:

- Changing the names of varius settings and parameters
- Changing the names of various settings and parameters
- Organizing the configuration into a better thought out structure

This means that all of this is subject to change, however, it'll take a
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/configuration/keybindings.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ There are certain actions that you can change the Keybindings for. The configura
## Keybinding Configuration

!!! tip "Multiple Bindings per Action"
You can also define multiple bindings for one action by putting them into an array (`action = [bidning1, binding2, etc.]`).
You can also define multiple bindings for one action by putting them into an array (`action = [bindning1, binding2, etc.]`).

A bindig can be either a keycode or a keycode combined with one or more modifiers for that key. All
of the following are a valid way of configuring a binding (where `action` is one of the configurable
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/configuration/logging.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ logging.enabled = true

When a crash occurs or you encounter a bug, without the log file we cannot do very much if we cannot reproduce it. But even if we can reproduce your bug or crash, we can usually fix it much faster with the logs.

You don't need to have your `log_level` set to `INFO` (altough, we would appreciate it :)). Even if you only have the `log_level` set to `WARN`, it helps us so much more than no logs at all. So please, for you it is only a single file that gets overwritten when you start wiki-tui again. But for us, it means so much more.
You don't need to have your `log_level` set to `INFO` (although, we would appreciate it :)). Even if you only have the `log_level` set to `WARN`, it helps us so much more than no logs at all. So please, for you it is only a single file that gets overwritten when you start wiki-tui again. But for us, it means so much more.

## Adjusting the Log Level

Expand Down
4 changes: 2 additions & 2 deletions src/action.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ pub enum Action {
// Page loading
LoadSearchResult(SearchResult),
LoadLink(Link),
LoadLangaugeLink(LanguageLink),
LoadLanguageLink(LanguageLink),

Search(SearchAction),
Page(PageAction),
Expand All @@ -69,7 +69,7 @@ pub enum Action {
#[derive(Debug, Clone, PartialEq, Eq)]
pub enum SearchAction {
StartSearch(String),
FinshSearch(Search),
FinishSearch(Search),
ContinueSearch,
ClearSearchResults,
OpenSearchResult,
Expand Down
6 changes: 3 additions & 3 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use crate::{
message_popup::MessagePopupComponent,
page_viewer::PageViewer,
search::SearchComponent,
search_bar::{SearchBarComponent, SEARCH_BAR_HEIGTH},
search_bar::{SearchBarComponent, SEARCH_BAR_HEIGHT},
search_language_popup::SearchLanguageSelectionComponent,
Component,
},
Expand Down Expand Up @@ -67,7 +67,7 @@ impl AppComponent {
let chunks = Layout::default()
.direction(Direction::Vertical)
.constraints([
Constraint::Min(SEARCH_BAR_HEIGTH),
Constraint::Min(SEARCH_BAR_HEIGHT),
Constraint::Percentage(100),
])
.split(area);
Expand Down Expand Up @@ -205,7 +205,7 @@ impl Component for AppComponent {
self.page_loader.as_ref().unwrap().load_search_result(title)
}
Action::LoadLink(link) => self.page_loader.as_ref().unwrap().load_link(link),
Action::LoadLangaugeLink(link) => {
Action::LoadLanguageLink(link) => {
self.page_loader.as_ref().unwrap().load_language_link(link)
}

Expand Down
2 changes: 1 addition & 1 deletion src/components/page.rs
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,7 @@ impl Component for PageComponent {
Action::ScrollToTop => self.scroll_to_y(0),
Action::ScrollToBottom => self.scroll_to_bottom(),

Action::Resize(width, heigth) => self.resize(width, heigth),
Action::Resize(width, height) => self.resize(width, height),
_ => return ActionResult::Ignored,
}
ActionResult::consumed()
Expand Down
2 changes: 1 addition & 1 deletion src/components/page_language_popup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ impl Component for PageLanguageSelectionComponent {
));
}
return packet
.action(Action::LoadLangaugeLink(link.to_owned()))
.action(Action::LoadLanguageLink(link.to_owned()))
.into();
}
return ActionResult::Ignored;
Expand Down
6 changes: 3 additions & 3 deletions src/components/search.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ impl SearchComponent {
.unwrap();
match search_request.search().await {
Ok(search) => tx
.send(Action::Search(SearchAction::FinshSearch(search)))
.send(Action::Search(SearchAction::FinishSearch(search)))
.unwrap(),
Err(error) => {
let error = error.context("Unable to execute the search");
Expand Down Expand Up @@ -175,7 +175,7 @@ impl SearchComponent {
.unwrap();
match search_request.search().await {
Ok(search) => tx
.send(Action::Search(SearchAction::FinshSearch(search)))
.send(Action::Search(SearchAction::FinishSearch(search)))
.unwrap(),
Err(error) => {
let error = error.context("Unable to continue the search");
Expand Down Expand Up @@ -284,7 +284,7 @@ impl Component for SearchComponent {
match action {
Action::Search(search_action) => match search_action {
SearchAction::StartSearch(query) => self.start_search(query),
SearchAction::FinshSearch(search) => self.finish_search(search),
SearchAction::FinishSearch(search) => self.finish_search(search),
SearchAction::ContinueSearch => self.continue_search(),
SearchAction::ClearSearchResults => self.clear_search_results(),
SearchAction::OpenSearchResult => self.open_selected_result(),
Expand Down
2 changes: 1 addition & 1 deletion src/components/search_bar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use super::Component;
const EMPTY_PROMPT: &str = "Search Wikipedia";
const SEARCH_BAR_X: u16 = 50;

pub const SEARCH_BAR_HEIGTH: u16 = 3;
pub const SEARCH_BAR_HEIGHT: u16 = 3;

#[derive(Default)]
pub struct SearchBarComponent {
Expand Down
4 changes: 2 additions & 2 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ bitflags! {
pub enum PaddingConfig {
Uniform(u16),
Horizontal { horizontal: u16 },
Vertical { veritical: u16 },
Vertical { vertical: u16 },
Proportional { proportional: u16 },
Symmetric { symmetric: (u16, u16) },
Custom(u16, u16, u16, u16),
Expand All @@ -315,7 +315,7 @@ impl Into<Padding> for PaddingConfig {
match self {
PaddingConfig::Uniform(val) => Padding::uniform(val),
PaddingConfig::Horizontal { horizontal } => Padding::horizontal(horizontal),
PaddingConfig::Vertical { veritical } => Padding::vertical(veritical),
PaddingConfig::Vertical { vertical } => Padding::vertical(vertical),
PaddingConfig::Proportional { proportional } => Padding::proportional(proportional),
PaddingConfig::Symmetric { symmetric } => Padding::symmetric(symmetric.0, symmetric.1),
PaddingConfig::Custom(left, right, top, bottom) => {
Expand Down
10 changes: 5 additions & 5 deletions src/ui/stateful_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,20 @@ pub enum ScrollBehaviour {
pub struct StatefulList<T> {
state: ListState,
items: Vec<T>,
behvaiour: ScrollBehaviour,
behaviour: ScrollBehaviour,
}

impl<T> StatefulList<T> {
pub fn with_items(items: Vec<T>) -> Self {
StatefulList {
state: ListState::default().with_selected(Some(0)),
items,
behvaiour: ScrollBehaviour::default(),
behaviour: ScrollBehaviour::default(),
}
}

pub fn scroll_behavior(mut self, behavior: ScrollBehaviour) -> Self {
self.behvaiour = behavior;
self.behaviour = behavior;
self
}

Expand All @@ -45,7 +45,7 @@ impl<T> StatefulList<T> {
let i = match self.state.selected() {
Some(i) => {
if i >= self.items.len().saturating_sub(1) {
match self.behvaiour {
match self.behaviour {
ScrollBehaviour::StickToBottom | ScrollBehaviour::StickToEnds => i,
ScrollBehaviour::StickToTop | ScrollBehaviour::Circle => 0,
}
Expand All @@ -62,7 +62,7 @@ impl<T> StatefulList<T> {
let i = match self.state.selected() {
Some(i) => {
if i == 0 {
match self.behvaiour {
match self.behaviour {
ScrollBehaviour::StickToBottom | ScrollBehaviour::Circle => {
self.items.len().saturating_sub(1)
}
Expand Down
2 changes: 1 addition & 1 deletion wiki-api-macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ pub fn parse_languages(input: TokenStream) -> TokenStream {
impl std::fmt::Display for ParseLanguageError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.pad(
&format!("error parsing langugage: '{}' is an unknown language", self.0)
&format!("error parsing language: '{}' is an unknown language", self.0)
)
}
}
Expand Down
8 changes: 4 additions & 4 deletions wiki-api/src/page.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ pub mod link_data {
}

#[derive(Debug, Clone, PartialEq, Eq)]
pub struct ExternalToInteralData {}
pub struct ExternalToInternalData {}
}

#[derive(Debug, Clone, PartialEq, Eq)]
pub enum Link {
/// Interal link to another page in the same wiki
/// Internal link to another page in the same wiki
Internal(link_data::InternalData),
/// Anchor to a specific section in the current page
/// Note: this only corresponds to anchors on the current page. For anchors in another page on
Expand All @@ -69,8 +69,8 @@ pub enum Link {
MediaLink(link_data::MediaData),
/// External link to a page at another website
External(link_data::ExternalData),
/// External link to an interal page in the same wiki
ExternalToInternal(link_data::ExternalToInteralData),
/// External link to an internal page in the same wiki
ExternalToInternal(link_data::ExternalToInternalData),
}

impl Link {
Expand Down
4 changes: 2 additions & 2 deletions wiki-api/src/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use crate::{
document::{Data, HeaderKind, Raw, UnsupportedElement},
languages::Language,
page::{
link_data::{AnchorData, ExternalData, ExternalToInteralData, InternalData, MediaData},
link_data::{AnchorData, ExternalData, ExternalToInternalData, InternalData, MediaData},
Link,
},
search::Namespace,
Expand Down Expand Up @@ -339,7 +339,7 @@ impl WikipediaParser {
let is_same_wiki = link_url.domain() == endpoint.domain();
if !is_same_wiki {
return Some(Data::Link(Link::ExternalToInternal(
ExternalToInteralData {},
ExternalToInternalData {},
)));
}

Expand Down
8 changes: 4 additions & 4 deletions wiki-api/src/search.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ impl Debug for Search {
}
}

/// Contains general informations about the search
/// Contains general information about the search
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct SearchInfo {
/// Whether the search is complete and no more results are available
Expand Down Expand Up @@ -99,7 +99,7 @@ pub struct SearchInfo {
/// let continued_search = Search::builder()
/// .query(continue_data.query)
/// .endpoint(continue_data.endpoint)
/// .langauge(continue_data.language)
/// .language(continue_data.language)
/// .offset(continue_data.offset)
/// .search()?;
/// ```
Expand Down Expand Up @@ -665,7 +665,7 @@ impl<Q, E, L> SearchBuilder<Q, E, L> {
self
}

/// Set the sort order of returend results
/// Set the sort order of returned results
///
/// Default: [`SortOrder::Relevance`]
///
Expand All @@ -677,7 +677,7 @@ impl<Q, E, L> SearchBuilder<Q, E, L> {
}

impl SearchBuilder<WithQuery, WithEndpoint, WithLanguage> {
/// Performes the search and returns the result. The search can only be made when the query,
/// Performs the search and returns the result. The search can only be made when the query,
/// endpoint and language are set
///
/// # Example
Expand Down