Add PyPi package functionality

pull/38/head
Kelvin DeCosta 6 years ago
parent 9b83571981
commit c19111c2c3

3
.gitignore vendored

@ -8,3 +8,6 @@
# Comma-Separated Values (CSV) Reports
*.csv
# Python Cache
__pycache__/

@ -17,8 +17,8 @@ $ git clone https://github.com/sdushantha/sherlock.git
# change the working directory to sherlock
$ cd sherlock
# install the requirements
$ pip3 install -r requirements.txt
# install the package
$ pip3 install .
```
## Usage

@ -0,0 +1,20 @@
from setuptools import setup
from sherlock import __version__, module_name
setup(
name = 'sherlock',
version = __version__,
description = module_name,
packages = ['sherlock'],
entry_points = {
'console_scripts': [
'sherlock = sherlock.__main__:main'
]
},
package_dir={'sherlock': 'sherlock'},
package_data={'sherlock' : ['data.json']},
install_requires=[
"requests",
"torrequest"
]
)

@ -0,0 +1,2 @@
__version__ = "0.1.0"
module_name = "Sherlock: Find Usernames Across Social Networks"

@ -13,9 +13,7 @@ from argparse import ArgumentParser, RawDescriptionHelpFormatter
import platform
from torrequest import TorRequest
module_name = "Sherlock: Find Usernames Across Social Networks"
__version__ = "0.1.0"
from sherlock import __version__, module_name
# TODO: fix tumblr
@ -81,7 +79,9 @@ def sherlock(username, verbose=False, tor=False, unique_tor=False):
print("\033[1;92m[\033[0m\033[1;77m*\033[0m\033[1;92m] Removing previous file:\033[1;37m {}\033[0m".format(fname))
print("\033[1;92m[\033[0m\033[1;77m*\033[0m\033[1;92m] Checking username\033[0m\033[1;37m {}\033[0m\033[1;92m on: \033[0m".format(username))
raw = open("data.json", "r", encoding="utf-8")
base = os.path.dirname(__file__)
data_file = os.path.join(base, "data.json")
raw = open(data_file, "r", encoding="utf-8")
data = json.load(raw)
# User agent is needed because some sites does not
Loading…
Cancel
Save