Commit 2dab3dbb authored by Bram Schoenmakers's avatar Bram Schoenmakers

Merge pull request #49 from MinchinWeb/windows-cmd-2

Windows cmd 2 -- add color to output on Windows
parents dfb8dd77 9650361b
*.pyc *.pyc
*.sw? *.sw?
build
dist
install install
.coverage .coverage
# Distribution / packaging
.Python
env/
env*/
build/
develop-eggs/
dist/
eggs/
lib/
lib64/
parts/
sdist/
var/
*.egg-info/
.installed.cfg
*.egg
# Sublime Text
*.sublime-*
sudo: false # run on new infrastructure
language: python language: python
python: python:
- "2.7" - "2.7"
...@@ -9,6 +10,10 @@ install: ...@@ -9,6 +10,10 @@ install:
- "pip install icalendar" - "pip install icalendar"
- "pip install pylint" - "pip install pylint"
script: "./run-tests.sh" script: "./run-tests.sh"
# Cache Dependencies
cache:
directories:
- $HOME/travis/.cache/pip
notifications: notifications:
webhooks: webhooks:
urls: urls:
......
from setuptools import setup, find_packages from setuptools import setup, find_packages
import os
import re
import codecs
import sys
here = os.path.abspath(os.path.dirname(__file__))
def read(*parts):
# intentionally *not* adding an encoding option to open
return codecs.open(os.path.join(here, *parts), 'r').read()
def find_version(*file_paths):
version_file = read(*file_paths)
version_match = re.search(r"^VERSION = ['\"]([^'\"]*)['\"]",
version_file, re.M)
if version_match:
return version_match.group(1)
raise RuntimeError("Unable to find version string.")
conditional_dependencies = {
"colorama>=0.2.5": "win32" in sys.platform,
}
setup( setup(
name = "topydo", name = "topydo",
packages = find_packages(exclude=["test"]), packages = find_packages(exclude=["test"]),
version = "0.5", version = find_version('topydo', 'lib', 'Version.py'),
description = "A command-line todo list application using the todo.txt format.", description = "A command-line todo list application using the todo.txt format.",
author = "Bram Schoenmakers", author = "Bram Schoenmakers",
author_email = "me@bramschoenmakers.nl", author_email = "me@bramschoenmakers.nl",
url = "https://github.com/bram85/topydo", url = "https://github.com/bram85/topydo",
install_requires = [ install_requires = [
'six >= 1.9.0', 'six >= 1.9.0',
], ] + [p for p, cond in conditional_dependencies.items() if cond],
extras_require = { extras_require = {
'ical': ['icalendar'], 'ical': ['icalendar'],
'prompt-toolkit': ['prompt-toolkit >= 0.39'], 'prompt-toolkit': ['prompt-toolkit >= 0.39'],
......
...@@ -20,6 +20,10 @@ import sys ...@@ -20,6 +20,10 @@ import sys
import getopt import getopt
from topydo.cli.CLIApplicationBase import MAIN_OPTS, error from topydo.cli.CLIApplicationBase import MAIN_OPTS, error
from topydo.cli.CLI import CLIApplication from topydo.cli.CLI import CLIApplication
# enable color on windows CMD
if "win32" in sys.platform:
import colorama
colorama.init()
def main(): def main():
""" Main entry point of the CLI. """ """ Main entry point of the CLI. """
......
...@@ -78,7 +78,7 @@ class ListCommand(ExpressionCommand): ...@@ -78,7 +78,7 @@ class ListCommand(ExpressionCommand):
Prints the todos in the right format. Prints the todos in the right format.
Defaults to normal text output (with possible colors and other pretty Defaults to normal text output (with possible colors and other pretty
printing. If a format was specified on the commandline, this format is printing). If a format was specified on the commandline, this format is
sent to the output. sent to the output.
""" """
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment