Skip to content

Commit

Permalink
fixing setup.py dependencies and tweaking usage strings
Browse files Browse the repository at this point in the history
  • Loading branch information
felipesanches committed Nov 2, 2017
1 parent df67875 commit b1e7187
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 52 deletions.
Empty file added Lib/gftools/__init__.py
Empty file.
8 changes: 6 additions & 2 deletions bin/gftools-build-font2ttf.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,15 @@
# $ gftools build-font2ttf font.otf font.ttf
from __future__ import print_function

import sys
import argparse
import fontforge
import logging
import os
import sys

try:
import fontforge
except:
sys.exit("To run this tool you'll need to install FontForge.")

log_format = '%(levelname)-8s %(message)s'
logger = logging.getLogger()
Expand Down
7 changes: 0 additions & 7 deletions bin/gftools-build-fontmetadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,6 @@
#
# gftools build-fontmetadata -h
#
# DEPENDENCIES
#
# The script depends on the PIL API (Python Imaging Library)
# If you have pip <https://pypi.python.org/pypi/pip> installed, run:
#
# $ sudo pip install pillow protobuf gftools

import argparse
import collections
import csv
Expand Down
17 changes: 0 additions & 17 deletions bin/gftools-check-font-version.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,7 @@
# limitations under the License.
#
"""
gftools check-font-version
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Check the version number of a family hosted on fonts.google.com.
`gftools check-font-version "Roboto"`
Comparison against a local family can be made using the -lc argument:
`gftools check-font-version "Roboto" -lc [/dir/Roboto-Regular.ttf, ...]`
Comparison against a url containing a zipped family can be made using
the -wc argument:
`gftools check-font-version "Roboto" -wc=http://roboto.com/roboto.zip`
"""
from __future__ import print_function
from argparse import ArgumentParser
Expand Down
6 changes: 4 additions & 2 deletions bin/gftools-check-gf-github.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
import requests
import re
from datetime import datetime
from argparse import ArgumentParser
from argparse import (ArgumentParser,
RawTextHelpFormatter)


def get_pagination_urls(request):
Expand Down Expand Up @@ -123,7 +124,8 @@ def iso8601_to_date(date_string):


def main():
parser = ArgumentParser(description=__doc__)
parser = ArgumentParser(description=__doc__,
formatter_class=RawTextHelpFormatter)
parser.add_argument('username',
help="Your Github username")
parser.add_argument('password',
Expand Down
28 changes: 12 additions & 16 deletions bin/gftools-check-name.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
import argparse
from argparse import RawTextHelpFormatter
import csv
import sys
from fontTools.ttLib import TTFont
import tabulate
import ntpath

description = """
gftools check-name
~~~~~~~~~~~~~~~~~~~~~~~~
"""
A Python script for printing nametables to stdout.
e.g:
Expand All @@ -39,12 +28,19 @@
Output in csv format
gftools check-name [fonts] --csv
"""
from argparse import (ArgumentParser,
RawTextHelpFormatter)
import csv
import sys
from fontTools.ttLib import TTFont
import tabulate
import ntpath

parser = argparse.ArgumentParser(description=description,
formatter_class=RawTextHelpFormatter)
parser = ArgumentParser(description=__doc__,
formatter_class=RawTextHelpFormatter)
parser.add_argument('fonts',
nargs="+",
help="Fonts in OpenType (TTF/OTF) format")
nargs="+",
help="Fonts in OpenType (TTF/OTF) format")
parser.add_argument('--csv', default=False, action='store_true')


Expand Down
18 changes: 10 additions & 8 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,15 @@ def gftools_scripts():
'Programming Language :: Python :: 2.7'
],
install_requires=[
# TODO: Review this:
#
# 'lxml',
# 'defusedxml',
# 'requests',
# 'unidecode',
# 'protobuf',
# 'bs4'
# 'fontforge', # needed by build-font2ttf script
# but there's no fontforge package on pypi
# see: https://github.com/fontforge/fontforge/issues/2048
'FontTools',
'Flask',
'pillow',
'protobuf',
'requests',
'tabulate',
'unidecode'
]
)

0 comments on commit b1e7187

Please sign in to comment.