#CLI chat interface, written in python.

1 messages · Page 1 of 1 (latest)

stuck sun
#

Repo: https://github.com/jckirton/CLImudChat

I am working on making a CLI chat interface, written entirely in python.

Current Features

  • Guided, user-friendly setup process (except for windows, you can figure that stuff out yourself).
  • Chat fetching & storage.
  • Chat message rendering (complete with colors and locally-timed timestamps).
  • "monitoring" mode, which fetches new chats every 2 seconds.
  • Sender and channel filters for monitoring mode.
    • arrays accepted, format when inputting is thing1,thing2.
    • tell and tells are valid inputs for the channel filter, filtering by tells.
  • CLI direct input on viewChats.py script run.
    • Same syntax for filters, syntax for this form of input is [PYTHON SCRIPT CALL OR WHATEVER] user sender_filter channel_filter.
    • Inputting of filters is not necessary, but you can give it none, and it will be the equivalent of not putting it in.

TODO

  • Allow sending of messages while also updating and displaying new chats.
  • Better message storage (currently just one big JSON file... Should be fine given it doesn't get over a couple GB).
  • An actual interface.
  • Filtering by timestamp/time range.
  • Finishing and packaging.

Some Other Words

Please try it out and give me some thoughts! It's still in early-ish development, and not complete.

It should be usable by anyone (if the setup process works/is done right), and can take in historical message data given it's in the correct format (which is just the same format as when you make a read call to the API).

GitHub

Contribute to jckirton/CLImudChat development by creating an account on GitHub.

coarse crown
#

btw I was briefly looking into the "sending of messages while also updating" issue in Python and I didn't make any progress 😭
in Rust I found one library that lets me do it, but it's not very flexible (e.g. when you send a message the prompt + input stays there in the history, so you see your message twice)
I fear we need to just use curses or something ?

stuck sun
#

Curses?

#

Also that double-message thing is fine.

coarse crown
#

old low-level TUI library IIUC

stuck sun
#

Ah.

covert obsidian
#

It's a pain no matter how you tackle it. Console's like to either take info in, or spit info out. We used a library for node that was specifically meant to work around that, and even then the cursor would go a lil wonky

#

A way to do it, though, is to look for some sort of keystroke combo, and buffer any incoming messages until the user is done typing

coarse crown
#

I wonder if my rust library is just outputting deletes and then re-outputting my prompt whenever I write new chats

#

also sorry don't want to derail your post, but I was also trying to solve this issue before 😄

stuck sun
#

A multi-window approach would probably be fine.

covert obsidian
#

also an option, I'm just a one monitor pleb so I try to avoid extra windows :p