cheat.sh icon indicating copy to clipboard operation
cheat.sh copied to clipboard

Offline usage for Windows (and also online usage)

Open ndavd opened this issue 4 years ago • 10 comments

Continued discussion from https://github.com/chubin/cheat.sh/issues/14

Make cht.sh usable on Windows (offline as well). Maybe create a separate cht.bat since Windows uses batch and not shell

ndavd avatar Jan 08 '21 12:01 ndavd

It will be easier to rewrite cht.sh in Python and call that instead.

abitrolly avatar Jan 08 '21 13:01 abitrolly

Yeah or that

ndavd avatar Jan 08 '21 13:01 ndavd

@chubin you told me to remove pyICU from requirements.txt. How exactly do I do that. It has to be done from the repository right? Because it clones the repo and installs the requirements automatically

ndavd avatar Jan 08 '21 13:01 ndavd

Who clones the repo?

abitrolly avatar Jan 08 '21 15:01 abitrolly

Doing cht.sh --standalone-install

ndavd avatar Jan 08 '21 16:01 ndavd

The problem with windows batch scripts, that they are not so functional as shell scripts, and in my opinion on the following should be taken in the longrun:

  1. Rewirte cht.sh in python, and make it available for pip, so that the installation will look like:
pip install cht
cht --standalone-install

Maybe should be done anyway, not only for Windows. Disadvantage: one still need Python on Windows which is not default anyway

2 Rewrite cht.sh in Go, and make it available as a binary on github, so that the installation will look like file dowload.

  1. Rewrite cht.sh in PowerShell; not really ueful for all platforms except windows, but potentially could be more interesting (better integration etc) for Windows.

I personally tend to (1).

pyICU

I will disable it by default

chubin avatar Jan 10 '21 08:01 chubin

@chubin personally I love the idea of 1. It's simpler. I mean a small requirement like installing python isn't a big deal, it usually comes by default in Linux, as for Windows users this current way one would need curl (which is not default) and bash (not default as well). Python is very easy to install.

ndavd avatar Jan 10 '21 12:01 ndavd

  1. Rewrite cht.sh in PowerShell; not really ueful for all platforms except windows, but potentially could be more interesting (better integration etc) for Windows.

The cross-platform version of PowerShell is grossly underestimated. Having an object-based command-line is very useful.

Considering Linux already has the bash script and PowerShell can do everything the bash script does, I think this is the best option.

God-damnit-all avatar Apr 02 '22 12:04 God-damnit-all

Considering Linux already has the bash script and PowerShell can do everything the bash script does, I think this is the best option.

@ImportTaste I agree, we need a powershell equivalent something like -- cht.ps1.

  1. Rewrite cht.sh in PowerShell; not really ueful for all platforms except windows, but potentially could be more interesting (better integration etc) for Windows.

@chubin Well, that's a valid point that it's for only for windows. However, unfortunately, there are still more windows user out there than linux.

aniketgm avatar Aug 09 '23 15:08 aniketgm

pyICU I will disable it by default

Hello from Q4 2023, still enabled and causes trouble

evrial avatar Oct 21 '23 10:10 evrial