Skip to content

xyzpw/hc-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hc-client

GitHub Downloads (all assets, all releases) python-version

A script to connect to hack.chat through your terminal.

hc-client-v5-preview

Installation

Installation instructions are below. Where you see $FOLDERNAME you must replace it with the folder name of the release installed.

If you are getting execution errors on Linux, you have to add execution perms, you can do this via chmod +x hc-client.py.

Installing Requirements

$ cd $FOLDERNAME
$ pip3 install -r requirements.txt

If you are not using a pip virtual environment, may may have to run pip3 uninstall websocket
The default websocket module is not the one used for this script, but they are both imported with the same name.

Creating a Virtual Environment

Using a virtual environment will allow you to use these packages without uninstalling some packages.
This following codeblock will demonstrate how to create one

$ cd hc-client/
$ python3 -m venv .env

You can name your virtual environment anything, but it's recommended to stick with .env or .venv for Github repos.

Using Virtual Environments

To enable your virtual environment via bash

$ source .env/bin/activate

To disable

$ deactivate

Installation via Git

$ git clone https://github.com/xyzpw/hc-client.git
$ cd hc-client/
$ python3 hc-client

Installation via Release (tar.gz)

$ tar -xf $FOLDERNAME
$ cd $FOLDERNAME
$ ./hc-client.py

Installation via Release (zip)

$ unzip $FOLDERNAME
$ cd $FOLDERNAME
$ ./hc-client.py

Usage

Usage and explanations for certain commands.

Commands

You can run commands in the client by typing "--COMMAND", be sure to replace "COMMAND" with the actual command you want to use.
Below is a list of all the commands.

help:          displays help message
clear:         clears the screen
notify:        plays a notification when receiving a message
blocklist:     displays blocklist
color:         change color of users' names/text
syntaxstyle:   change theme color of highlighted code
config:        displays your config
nl:            prints a newline
mentions:      highlights @mentions
browserstyle:  uses browserstyle mode
botlist:       displays botlist
stars:         displays stars next to moderators names
whisperlock:   disables the ability to send any messages other than whispers
group:         assigns a specified user to a customizable group
reset:         reset specified values to default
groupcmd:      command for customizing groups

For more information, you can run "--help COMMAND" in client to get usage info.

Multiline Input

Support for multiline input. During input, use ctrl+n to move a line down, when you want to send the message, press enter.

File Config

The config file can be modified to make the client look how you want on startup. The config file name is "hc-client-config.json", modify this file in json format. example below

{
        "DONOTSAY": ["mypassword"],
        "ignoreConfigWarnings": "0",
        "nick": "myName",
        "channel": "myChannel",
        "altClear": "0",
        "blockUserReplaceText": "{TEXT REMOVED}",
        "blockedUsers": ["annoying_user"],
        "passwordProtection": "1",
        "userColor": "blue",
        "modColor": "green",
        "adminColor": "red",
        "colorMe": "blue",
        "botColor": "blue",
        "mySyntaxStyle": "monokai",
        "botlist": ["IAmABot", "ImABot"],
        "notifymention": "1",
        "notifywhisper": "1",
        "stars": "1",
        "mynickcolor": "#F06"
}

Contributing

Contributers are welcome if the code or files are non-breaking.