Skip to content

Commit

Permalink
Remove colorama printing
Browse files Browse the repository at this point in the history
- KiCad BOM interface window does not support color printing
  • Loading branch information
SchrodingersGat committed Mar 22, 2020
1 parent 64ffb6e commit e30c6e4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
11 changes: 5 additions & 6 deletions kibom/debug.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from __future__ import print_function

import sys
from colorama import Fore

# Various msg levels
MSG_MESSAGE = -1 # Display generic message (always displayed)
Expand Down Expand Up @@ -54,7 +53,7 @@ def message(*arg):
Display a message
"""

_msg(Fore.WHITE, "", *arg)
_msg(*arg)


def debug(*arg):
Expand All @@ -66,7 +65,7 @@ def debug(*arg):
if MSG_LEVEL < MSG_DEBUG:
return

_msg(Fore.LIGHTCYAN_EX, MSG_CODES[MSG_DEBUG], *arg)
_msg(MSG_CODES[MSG_DEBUG], *arg)


def info(*arg):
Expand All @@ -78,7 +77,7 @@ def info(*arg):
if MSG_LEVEL < MSG_INFO:
return

_msg(Fore.WHITE, MSG_CODES[MSG_INFO], *arg)
_msg(MSG_CODES[MSG_INFO], *arg)


def warning(*arg):
Expand All @@ -90,7 +89,7 @@ def warning(*arg):
if MSG_LEVEL < MSG_WARN:
return

_msg(Fore.YELLOW, MSG_CODES[MSG_WARN], *arg)
_msg(MSG_CODES[MSG_WARN], *arg)


def error(*arg, **kwargs):
Expand All @@ -104,7 +103,7 @@ def error(*arg, **kwargs):
if MSG_LEVEL < MSG_ERROR:
return

_msg(Fore.RED, MSG_CODES[MSG_ERROR], *arg)
_msg(MSG_CODES[MSG_ERROR], *arg)

ERR_COUNT += 1

Expand Down
7 changes: 2 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

from kibom.version import KIBOM_VERSION

with open("README.md", "r") as readme:
long_description = readme.read()
long_description = "KiBoM is a configurable BOM (Bill of Materials) generation tool for KiCad EDA. Written in Python, it can be used directly with KiCad software without the need for any external libraries or plugins. KiBoM intelligently groups components based on multiple factors, and can generate BoM files in multiple output formats. For futher information see the KiBom project page"


setuptools.setup(
name="kibom",
Expand All @@ -20,8 +20,6 @@

long_description=long_description,

long_description_content_type="text/markdown",

keywords="kicad, bom, electronics, schematic, bill of materials",

url="https://github.com/SchrodingersGat/KiBom",
Expand All @@ -32,7 +30,6 @@

install_requires=[
"xlsxwriter",
"colorama",
],

python_requires=">=2.7"
Expand Down

1 comment on commit e30c6e4

@set-soft
Copy link
Contributor

@set-soft set-soft commented on e30c6e4 Jul 14, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to https://pypi.org/project/colorama/:

Colorama makes this work on Windows, too, by wrapping stdout, stripping ANSI sequences it finds (which would appear as gobbledygook in the output), and converting them into the appropriate win32 calls to modify the state of the terminal.

Please sign in to comment.