goostleek / cht.exe

cht.sh libcurl client for windows XP+ with changed colorization

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Utillity to gain help, working examples about various commands, APIs, ... Unified access to the best community driven documentation repositories of the world

The only cheat sheet you need

Look in https://github.com/chubin/cheat.sh for more info.

See Motivation for reasons this software esists.

Installation

Just copy downloaded cht.exe to some of your %PATH% dir to use it from every console.

e.g.: copy cht.exe c:\windows\system32 (but you need privileges)

Usage

Info about shutdown command

cht shutdown

Info about shutdown command

Reversing string in c, second alternative

cht c/reverse/2

Reversing string in c, second alternative

Options

Similar as on obove pic; showing first alternative but now with -Q (or longer variant --query) which switches on query mode - space delimetered arguments are parts of query.

cht -Q c check file exsists /1

Get version info with -v (or longer variant --version) switch and config file location (if you do not where to store it). Currently only server can be defined there. Example of file:

CHTSH_URL="http://cht.sh" # since https:// protocol is not yet supported, default server
#CHTSH_URL=http://secret.my #my own server

add -T (or longer variant --no_colors) parameter not to use coloring at all

cht c/strcpy -T

Disabling coloring of saved files localy

cht file:///tmp/saved_file -T

Removing colors

Compiling

Windows

Due to document length it is located separately here

Linux

Simplest & quickest

sudo apt install build-essential libcurl4-openssl-dev
gcc -Wall cht.c simple_config.c -lcurl -o cht
sudo cp ./cht /usr/local/bin/ # "install" it

Static & full under control

sudo apt install build-essential libcurl4-openssl-dev cmake
cd curl
cmake -DCURL_STATICLIB=ON .
make libcurl # we need only this mudule
cd ..
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ../src
make
sudo make install # install it to /usr/local/bin

External sources


TODO:

  • windows compile instructions
  • complete cmake
  • compile with openssl → postponed since this is not needed for now
  • complete functionallity all features of the cht.sh command line
  • sorry Mac users, only tasted on Linux and winXP-10

About

cht.sh libcurl client for windows XP+ with changed colorization

License:GNU General Public License v3.0


Languages

Language:C 61.7%Language:C++ 34.9%Language:CMake 3.5%