xithrius / twitch-tui Goto Github PK
View Code? Open in Web Editor NEWTwitch chat in the terminal.
Home Page: https://xithrius.github.io/twitch-tui/
License: Apache License 2.0
Twitch chat in the terminal.
Home Page: https://xithrius.github.io/twitch-tui/
License: Apache License 2.0
-i
would be the short option, perhaps?
The pace of this project won't be as consistent as it used to be for a while.
Thank you for understanding.
I set it up using a token I already had, but it seam to have had insufficent permissions which let to a hard to diagnose silent error.
It is unnecessary to implement my own logger with a widget.
So, tui-logger will do swimmingly.
Keybinds to show log, filtering different levels, logging as a CLI argument, and options in the config.
Continuation of #109.
Warning when build project
cargo c
warning: unused manifest key: target.aarch64-unknown-linux-gnu.linker
Compiling libc v0.2.119
We can probably remove gcc linker from aarch64 target in Cargo.toml
.
How and where threads communicate can be confusing, document with ARCHITECTURE.md
, similar to rust-analyzer
's.
Also, GitHub markdown diagrams can be used in this file.
Now that PRs such as #32 have been merged, many keybinds have been updated or added.
A list of all keybinds in one window may not be optimal, a different strategy for sorting through descriptions of keys could be used such as tabs of keybinds.
The README of this repository will also have to be updated.
Probably not important, but easy to fix.
Build on nightly failed (1.62.0-nightly (f4ec0e7cf 2022-04-22))
cargo +nightly c
Checking twitch-tui v2.0.0-alpha.3 (/home/balrog/src/twitch-tui)
error[E0283]: type annotations needed
--> src/ui/mod.rs:62:35
Possible fix:
diff --git a/src/ui/mod.rs b/src/ui/mod.rs
index f32f5b7..681b8e3 100644
--- a/src/ui/mod.rs
+++ b/src/ui/mod.rs
@@ -51,7 +51,7 @@ pub fn draw_ui<T: Backend>(frame: &mut Frame<T>, app: &mut App, config: &Complet
let vertical_chunks = Layout::default()
.direction(Direction::Vertical)
.margin(margin)
- .constraints(vertical_chunk_constraints.as_ref())
+ .constraints(vertical_chunk_constraints.as_slice())
.split(frame.size());
streamlink
allows users to watch streams through their favorite media player, such as vlc
.
Since streamlink has a PyPI packge
, it should be possible to launch streamlink on startup of twitch-tui.
Given the level of integration streamlink's Python package allows, more features such as starting/stopping/restarting streamlink with keybinds on twitch-tui could have implementations.
PyO3 is the solution for the connection.
Describe the bug:
This is a hard bug to describe as it's not persistent, and can't be accuratly reproduced.
The best I've got is that sometimes, when loading twt, it fails to connect to the chat, without throwing any error - I only see an empty list with the "Time / Username / Message content" header.
To Reproduce:
No good way to reproduce unfortunately.
System:
Mac OS 12.2.1
Twitch-tui version:
1.6.0
Terminal:
iTerm2 3.4.15
Shell:
zsh
Context: https://github.com/Xithrius/twitch-tui/blob/main/.github/workflows/ci.yml#L16-L34.
Build & Test for CI fails on the following architectures/OS's due to linker/dependency issues. This issue tracks the solved ones.
This repository is littered with .unwraps()
here and there. Clean them all up and do some actual error handling.
The event handler for listening for any keystrokes is currently contained within an infinite loop with no delay.
This causes busy waiting, which means the thread handling keys is still processing, waiting for a key to be hit.
Using the polling crate, this problem can be avoided, and less computer resources can be taken.
Using this blog, and ripgrep's release.yml, we can create binaries on tag releases.
Hi! I've been using twt for a bit now and i felt the need to be able to override the channel property inside config.toml, since having to alter the file every time i wanted to switch channels was getting a bit cumbersome. So i hacked something real quick on my machine to achieve that:
let mut cloned_config;
let ui_config;
if env::args().len() > 1 {
let args: Vec<String> = env::args().collect();
let channel: String = args[1].clone();
cloned_config = config.clone();
cloned_config.twitch.channel = channel;
ui_config = cloned_config.clone();
} else {
cloned_config = config.clone();
ui_config = cloned_config.clone();
}
So, i was wandering... would having this as an offical feature for twt be of interest? If so, i think i could contribute with that. Not with the code above of course, i hacked that real quick and prior to that i had no experience with Rust, i'd have to take some time to study and then contribute. Many thanks for the software! :)
Some content just never wants to be seen by the user.
An sqlite file will be used so filters can be managed.
A popup window should also be used so the user can read/write filters.
This keybind shouldn't be too easy to reach since filters can contain quite abrasive inputs. If another person is watching the user's screen, said keybind wouldn't be desirable to hit accidentally.
Info, debug, warning, error, etc. errors for debugging. Disabled by default.
Implementation of a popup that has 2 windows.
The top one should have enough space for input to be shown, and the bottom one should have all the search results.
Fuzzy finding will be implemented through one of these repositories:
Instead of having the regular date and time, have a date/time delta to show how long it's been since a message was sent.
Sometimes app panicked at tokio::select
, app does not get any messages.
thread 'tokio-runtime-worker' panicked at 'all branches are disabled and there is no else branch', src/twitch.rs:56
git commit a4e26b3
Seeing who's in chat within a different window, either to a side of the main chat window, or layered.
Use rustdoc to generate more in-depth documentation for this binary.
This will be needed for 2.0 due to the amount of features that will be had.
This will be had in 2.1, since the README will suffice for now.
Allow users to have their names re-mapped to something else. This can be helpful if the user wants to be called something else, but doesn't want to change their username.
Perhaps notes for users could be added in the future. Maybe at that point, rusqlite can be put back, with data dump and purge options, of course.
Will be implemented after 2.0 is released.
Once again, university has picked up in pace, and I won't be able to focus on this project as often.
Thanks for understanding.
Cycle through different chats by Ctrl + Tab
to move right through the tabs, and Ctrl + Shift + Tab
to go left.
Ctrl + 1
through Ctrl + 0
should also be possible, to swap between 10 different chat windows.
Make sure the optimization of thread usage and message storage is viable so we don't hit CPU usage like shown in #31.
Did you see a message that you'd like to copy or get the context of?
Search in regex or just regular text (because regex allows that) to acquire the context of said message, and have it highlighted.
Other keybinds such as message deletion will also be implemented.
Relies on #34.
During first time setup, user should be prompted for what they want in their config, along with an entry for their Twitch token.
There should also be an option to not have the config be generated at all.
Perhaps different templates, such as minimal and maximum items on screen.
Highest priority at the top, lowest at the bottom.
ctrl + tab
and ctrl + shift + tab
for right/left movement.Users may switch channels often, between their favorite streamers. This feature allows them to go back to previous channels quickly.
An sqlite database shall be used for previous channels. It will be placed in ~/.config/twt/channels.db
on MacOs/Linux and %appdata%\twt\channels.db
on Windows.
This issue relies on #67.
A popup window for filtering out usernames and their messages.
Probably useful for moderation.
The sqlite database is not needed, due to it being hard for users to modify any data or see it easily.
It would be faster to read/write to memory instead of storage during runtime, and using JSON would make it much easier to implement methods for filters, and recently switched to channels.
Currently, the main branch allows for scrolling behind the last message.
This shouldn't be possible, since although the user can reset the scroll back to 0, it can be pretty annoying when just wanting to scroll all the way back to the first message, then going past it.
Implementation:
j
or k
.There are different users within Twitch, and then subsets of those users. Let's try to find a way to cater to all of them, either through different options in the config file or general-purpose manual scrolling. Given that someone has gone out of their way to download and setup the binary of this program, we can assume that they're most likely willing to either read large chunks of chat or freeze every so often to see if a message really is what they saw.
Implementation suggestions as of now when manual scrolling mode is activated for the chat:
VecDeque
for later viewing. Once the user exists out of manual scrolling mode (which only gives the previously configured amount of messages backwards, stored in config.terminal.maximum_messages
), they get to see the most recent messages as a whole.config.terminal.maximum_messages / 2
as a floored float are available backwards and forwards (for new messages). Once new messages appear, there are two options:
VecDeque
so there's room for new messages.For channel and user searching, a function will be created to go through the items. The popup window will not expand beyond a certain point.
TODO:
By creating a custom widget, the window which contains a search box along with a window above for the outputs can be created easily on demand.
Modifying how it works with the application and/or database would be much easier than implementing one function for returning multiple windows.
Only Twitch
username with uppercase letter, all others(like channel bot
and users
) in lowercase.
Expected: usernames can have both lowercase and uppercase letters
Describe the bug:
In step 3, from the README, it says that the default configuration paths get generated, but that wasn't the case when running it on Windows 10. Instead, this is what I get below.
Configuration not found. Create a config file at 'C:\Users\ME\AppData\Roaming\twt\config.toml', and see 'https://github.com/Xithrius/twitch-tui/blob/main/default-config.toml' for an example configuration.
To Reproduce:
twt
using cargo install.twt
in the terminal, from README step 3.APPDATA
to get to configurations, given the twt
directory.The directory and config file(s) isn't there. I checked all the directories in my ~/AppData
, just in case and found nothing. Even checked ~/.config
, although this is a Windows machine so there shouldn't be anything there.
Expected behavior:
I expected a directory at %APPDATA%\twt
(PowerShell: $env:APPDATA\twt
).
Screenshots:
System:
Additional context:
Add any other context about the problem here.
I use the same context on Linux machines, which is why I have directories like ~/.config
.
The user of this program is not able to exit. Unsure as to why at this current time.
Edit 1: It's not necessarily freezing, but lagging with increasing delays until it can no longer respond. Memory leak somewhere, probably.
Edit 2: Solved in 2167a47
Similar to the Doom Emacs start screen (top left) or vim-startify, this project should have one of its own.
This will be done after 2.0 is released.
When a window's boarder is colored, the text is always the same as that boarder.
That shouldn't be the case, but it is. Time for styling.
The user shouldn't have to copy over the config themselves from this repository.
If the folder(s) do not exist, default-config.toml
should be copied to the correct path, such as ~/.config/twt/config.toml
on Linux/MacOS, or %appdata%\twt\config.toml
on Windows.
We have no support of twitch badges, we can not differentiate users in chat.
Will be good to support this behavior by adding badges like in stream chat
.
Possible steps to solve the issue:
Moderator actions through slash commands (such as /clear
) should be suggested when /
looks to be the first character.
If a command isn't valid, it is up to debate whether the incorrect text should be sent to Twitch at all, or if the user should be warned instead.
Currently a work in progress, but this should be done across Windows, MacOS, and Linux.
Add a sidebar to the left (like Twitch's website) to see who's live, and who's offline.
No matter the state of the followed user, they list should be able to be scrolled through, and then some action will be taken to enter the chat.
Fix memory leak which causes extreme lag leading to a freeze when using message search.
Occurs in the dev-2.0 branch.
Opens a window to the right of the chat to debug the application.
Relies in #34, so values can be scrolled through.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.