Skip to content

Commit ae1baa6

Browse files
author
Aaron Gonzales
authored
search_tweets.py environment detection fix (#26)
* added proper env shebang for environment detection when using search_tweets script * updated docs to reflect bin installation of search_tweets.py * bumped version * updated base readme text
1 parent acfb609 commit ae1baa6

File tree

4 files changed

+18
-12
lines changed

4 files changed

+18
-12
lines changed

README.rst

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -232,8 +232,10 @@ are used to control credential behavior from the command-line app.
232232
Using the Comand Line Application
233233
=================================
234234

235-
The library includes an application, ``search_tweets.py``, in the
236-
``tools`` directory that provides rapid access to Tweets.
235+
The library includes an application, ``search_tweets.py``, that provides
236+
rapid access to Tweets. When you use ``pip`` to install this package,
237+
``search_tweets.py`` is installed globally. The file is located in the
238+
``tools/`` directory for those who want to run it locally.
237239

238240
Note that the ``--results-per-call`` flag specifies an argument to the
239241
API ( ``maxResults``, results returned per CALL), not as a hard max to
@@ -247,7 +249,7 @@ environment variables.
247249

248250
.. code:: bash
249251
250-
python search_tweets.py \
252+
search_tweets.py \
251253
--max-results 1000 \
252254
--results-per-call 100 \
253255
--filter-rule "beyonce has:hashtags" \
@@ -257,7 +259,7 @@ environment variables.
257259

258260
.. code:: bash
259261
260-
python search_tweets.py \
262+
search_tweets.py \
261263
--max-results 1000 \
262264
--results-per-call 100 \
263265
--filter-rule "beyonce has:hashtags" \
@@ -268,7 +270,7 @@ environment variables.
268270

269271
.. code:: bash
270272
271-
python search_tweets.py \
273+
search_tweets.py \
272274
--max-results 100 \
273275
--results-per-call 100 \
274276
--filter-rule "beyonce has:hashtags" \
@@ -323,7 +325,7 @@ Example:
323325

324326
::
325327

326-
python search_tweets.py \
328+
search_tweets.py \
327329
--config-file myapiconfig.config \
328330
--no-print-stream
329331

examples/base_readme.rst

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,10 @@ Or you can install the development version locally via
4848
Using the Comand Line Application
4949
=================================
5050

51-
The library includes an application, ``search_tweets.py``, in the ``tools`` directory that provides rapid access to Tweets.
51+
The library includes an application, ``search_tweets.py``, that provides rapid
52+
access to Tweets. When you use ``pip`` to install this package,
53+
``search_tweets.py`` is installed globally. The file is located in the
54+
``tools/`` directory for those who want to run it locally.
5255

5356
Note that the ``--results-per-call`` flag specifies an argument to the API
5457
( ``maxResults``, results returned per CALL), not as a hard max to number of
@@ -62,7 +65,7 @@ your credentials are set up correctly in the default location
6265

6366
.. code:: bash
6467
65-
python search_tweets.py \
68+
search_tweets.py \
6669
--max-results 1000 \
6770
--results-per-call 100 \
6871
--filter-rule "beyonce has:hashtags" \
@@ -73,7 +76,7 @@ your credentials are set up correctly in the default location
7376

7477
.. code:: bash
7578
76-
python search_tweets.py \
79+
search_tweets.py \
7780
--max-results 1000 \
7881
--results-per-call 100 \
7982
--filter-rule "beyonce has:hashtags" \
@@ -85,7 +88,7 @@ your credentials are set up correctly in the default location
8588

8689
.. code:: bash
8790
88-
python search_tweets.py \
91+
search_tweets.py \
8992
--max-results 100 \
9093
--results-per-call 100 \
9194
--filter-rule "beyonce has:hashtags" \
@@ -140,7 +143,7 @@ command-line arguments will either be *added* to the config file args or
140143

141144
Example::
142145

143-
python search_tweets.py \
146+
search_tweets.py \
144147
--config-file myapiconfig.config \
145148
--no-print-stream
146149

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
long_description=open('README.rst', 'r', encoding="utf-8").read(),
88
author_email='agonzales@twitter.com',
99
license='MIT',
10-
version='1.3.1',
10+
version='1.3.2',
1111
python_requires='>=3.3',
1212
install_requires=["requests", "tweet_parser", "pyyaml"],
1313
packages=find_packages(),

tools/search_tweets.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#!/usr/bin/env python
12
# Copyright 2017 Twitter, Inc.
23
# Licensed under the Apache License, Version 2.0
34
# http://www.apache.org/licenses/LICENSE-2.0

0 commit comments

Comments
 (0)