[Python-modules-commits] [gtts] 06/07: merge patched into master

Ethan Ward ethanward-guest at moszumanska.debian.org
Tue Jul 25 17:07:38 UTC 2017


This is an automated email from the git hooks/post-receive script.

ethanward-guest pushed a commit to branch master
in repository gtts.

commit c096a8ce1674cb8ef01cbc264eb035c26de4665a
Merge: 99e40bd 3f1d694
Author: Ethan Ward <ethan.ward at mycroft.ai>
Date:   Tue Jul 25 12:05:20 2017 -0500

    merge patched into master

 bin/gtts-cli                                |  4 --
 bin/gtts-cli.py                             | 52 ----------------
 debian/.git-dpm                             |  4 +-
 debian/patches/0001-Remove-CLI-binary.patch | 94 +++++++++++++++++++++++++++++
 debian/patches/series                       |  1 +
 setup.py                                    |  2 +-
 6 files changed, 98 insertions(+), 59 deletions(-)

diff --cc debian/.git-dpm
index 51dffc2,0000000..2a2bf81
mode 100644,000000..100644
--- a/debian/.git-dpm
+++ b/debian/.git-dpm
@@@ -1,8 -1,0 +1,8 @@@
 +# see git-dpm(1) from git-dpm package
- d64fb298ae4d2b7ac08056a2af8dd9f9111d474f
- d64fb298ae4d2b7ac08056a2af8dd9f9111d474f
++3f1d694863933d1be25ab47809cbc5aae7ba60ab
++3f1d694863933d1be25ab47809cbc5aae7ba60ab
 +d64fb298ae4d2b7ac08056a2af8dd9f9111d474f
 +d64fb298ae4d2b7ac08056a2af8dd9f9111d474f
 +gtts_1.2.0.orig.tar.gz
 +ce859512748e0edff72c175585e919eb331edee2
 +8477
diff --cc debian/patches/0001-Remove-CLI-binary.patch
index 0000000,0000000..7df89f0
new file mode 100644
--- /dev/null
+++ b/debian/patches/0001-Remove-CLI-binary.patch
@@@ -1,0 -1,0 +1,94 @@@
++From 3f1d694863933d1be25ab47809cbc5aae7ba60ab Mon Sep 17 00:00:00 2001
++From: Ethan Ward <ethan.ward at mycroft.ai>
++Date: Tue, 25 Jul 2017 12:05:13 -0500
++Subject: Remove CLI binary
++
++---
++ bin/gtts-cli    |  4 ----
++ bin/gtts-cli.py | 52 ----------------------------------------------------
++ setup.py        |  2 +-
++ 3 files changed, 1 insertion(+), 57 deletions(-)
++ delete mode 100755 bin/gtts-cli
++ delete mode 100755 bin/gtts-cli.py
++
++diff --git a/bin/gtts-cli b/bin/gtts-cli
++deleted file mode 100755
++index dc25393..0000000
++--- a/bin/gtts-cli
+++++ /dev/null
++@@ -1,4 +0,0 @@
++-#!/bin/bash
++-DIR="$( cd "$( dirname "$0" )" && pwd )"
++-PYTHON=$(which python)
++-exec $PYTHON $DIR/gtts-cli.py "$@" 
++diff --git a/bin/gtts-cli.py b/bin/gtts-cli.py
++deleted file mode 100755
++index f3657d0..0000000
++--- a/bin/gtts-cli.py
+++++ /dev/null
++@@ -1,52 +0,0 @@
++-#! /usr/bin/python
++-
++-from __future__ import print_function
++-from gtts import gTTS
++-from gtts import __version__
++-import sys
++-import argparse
++-import os
++-import codecs
++-
++-def languages():
++-    """Sorted pretty printed string of supported languages"""
++-    return ", ".join(sorted("{}: '{}'".format(gTTS.LANGUAGES[k], k) for k in gTTS.LANGUAGES))
++-
++-# Args
++-desc = "Creates an mp3 file from spoken text via the Google Text-to-Speech API ({v})".format(v=__version__)
++-parser = argparse.ArgumentParser(description=desc, formatter_class=argparse.RawTextHelpFormatter)
++-
++-text_group = parser.add_mutually_exclusive_group(required=True)
++-text_group.add_argument('text', nargs='?', help="text to speak")      
++-text_group.add_argument('-f', '--file', help="file to speak")
++-
++-parser.add_argument("-o", '--destination', help="destination mp3 file", action='store')
++-parser.add_argument('-l', '--lang', default='en', help="ISO 639-1/IETF language tag to speak in:\n" + languages())
++-parser.add_argument('--slow', action="store_true", help="slower read speed")
++-parser.add_argument('--debug', action="store_true")
++-
++-args = parser.parse_args()
++-
++-try:
++-    if args.text:
++-        if args.text == "-":
++-            text = sys.stdin.read()
++-        else:
++-            text = args.text
++-    else:
++-        with codecs.open(args.file, "r", "utf-8") as f:
++-            text = f.read()
++-
++-    # TTSTF (Text to Speech to File)
++-    tts = gTTS(text=text, lang=args.lang, slow=args.slow, debug=args.debug)
++-
++-    if args.destination:
++-        tts.save(args.destination)
++-    else:
++-        tts.write_to_fp(os.fdopen(sys.stdout.fileno(), "wb"))
++-except Exception as e:
++-    if args.destination:
++-        print(str(e))
++-    else:
++-        print("ERROR: ", e, file=sys.stderr)
++-        
++diff --git a/setup.py b/setup.py
++index 533fdbb..da41d5b 100644
++--- a/setup.py
+++++ b/setup.py
++@@ -12,7 +12,7 @@ setup(
++     author_email='pndurette at gmail.com',
++     url='https://github.com/pndurette/gTTS',
++     packages=['gtts'],
++-    scripts=['bin/gtts-cli', 'bin/gtts-cli.py'],
+++    #scripts=['bin/gtts-cli', 'bin/gtts-cli.py'],
++     license='MIT',
++     description='Create an mp3 file from spoken text via the Google TTS (Text-to-Speech) API',
++     long_description=open('README.md').read(),
diff --cc debian/patches/series
index 0000000,0000000..fb64075
new file mode 100644
--- /dev/null
+++ b/debian/patches/series
@@@ -1,0 -1,0 +1,1 @@@
++0001-Remove-CLI-binary.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/gtts.git



More information about the Python-modules-commits mailing list