Skip to content

Commit

Permalink
Add misc files and correct CONTRIBUTING.md
Browse files Browse the repository at this point in the history
  • Loading branch information
guillermo-carrasco committed Nov 2, 2016
1 parent 229ce41 commit 52507ac
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ var/
*.egg-info/
.installed.cfg
*.egg
upload_pypi.sh

# PyInstaller
# Usually these files are written by a python script from a template
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ introduce a dependency with that network's SDK or require any kind of token.
To add your own network:

1. Create `social_ids/networks/<new_network>.py` and implement the method `get_id(handle)`
2. Add the new network to the dictionary `NETWORKS` in `social_ids/cli/get_ids.py`. Key must be the
network name in lowercase and value must be that network's implementation of the `get_id(handle)` method
2. Add the new network to the dictionary `networks` in `social_ids/cli/get_ids.py`. Key must be the
network name in lowercase and value must be that network's module implementation
3. Write tests for the new network and the CLI
4. Increase the minor version number in `setup.py` . That is, for example from 1.0.1 to 1.1.0

Expand Down
8 changes: 8 additions & 0 deletions clean.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Remove building leftovers
rm -rf build dist *egg-info htmlcov src

# Remove pyc files
find . -type f -name *pyc -exec rm {} +

# Remove __pycache__ directories
find . -type d -name __pycache__ -exec rm -rf {} +
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from setuptools import setup, find_packages

setup(name='social_ids',
version='1.0',
version='1.0.1',
description="Get user ids from social network handlers",
author='Guillermo Carrasco',
author_email='[email protected]',
Expand Down
2 changes: 1 addition & 1 deletion social_ids/networks/twitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ def get_id(handler):
req = requests.get(BASE_URL.format(handler=handler))

try:
return re.search(PATTERN.format(handler=handler), req.text).group(1)
return re.search(PATTERN.format(handler=handler), req.text, re.IGNORECASE).group(1)
except AttributeError:
return None

0 comments on commit 52507ac

Please sign in to comment.