Sherlock: Formatting on windows Powershell very off

Created on 25 Dec 2018  路  9Comments  路  Source: sherlock-project/sherlock

[+] Unsplash: https://unsplash.com/@User
[*] Saved: User.txt

That's how all the lines look like in windows powershell. I guess the print is designed for a linux platform?

bug

Most helpful comment

Yeah these are ANSI codes for colored output. I've had success with https://github.com/tartley/colorama

All 9 comments

Yeah these are ANSI codes for colored output. I've had success with https://github.com/tartley/colorama

I have heard that Hue is very good.
Which one should we use? Hue or Colorama?

Hue's README says:

Note: Windows versions below windows 10 do not support ANSI escape sequences so the colors will not be printed in command prompt.

Colorama can also be used to wrap other color libraries on Windows (it will do nothing on other platforms), so you can use both, actually. However, this will only work if you can force Hue to print colors on old Windows versions.

Would recommend Colorama 11/10. Actually a very simple fix if it is used.

[Colorama] has the happy side-effect that existing applications or libraries which use ANSI sequences to produce colored output on Linux or Macs can now also work on Windows, simply by calling colorama.init()

Though, I have heard that Colorama is a tad bit slower than Hue.

hue works perfectly
run pip install huepy
add from huepy import * to the importing part of the sherlock.py file

I personally think Colorama's style are better than Hue's style. Below are the comparison of two libraries.

Hue

from hue import *
print red('This string is red')

Colorama

from colorama import Fore
print Fore.RED + 'This string is red'

The point here, if use Hue, the code might end up like print(red('This string is red')). On the other hand, if we use Colorama the code likeliest be like print(Fore.RED + 'This string is red'). Unless the code are not going to change to something more readable, I reckon this would not matter.

Closed via #71

Looks like there's still issues in some shells

Closing this issue as it has been fixed. There is also an option not not have colors which was introduced in #463

Was this page helpful?
0 / 5 - 0 ratings

Related issues

hoadlck picture hoadlck  路  3Comments

termashacker69 picture termashacker69  路  6Comments

PythonB picture PythonB  路  7Comments

fntkg picture fntkg  路  4Comments

senthilnayagam picture senthilnayagam  路  4Comments