parent
a612e975ee
commit
d325554921
Before Width: | Height: | Size: 159 KiB After Width: | Height: | Size: 159 KiB |
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 50 KiB |
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
@ -0,0 +1,41 @@
|
||||||
|
from setuptools import setup, find_packages
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
setup(name='wtfpython',
|
||||||
|
version='0.1.3',
|
||||||
|
description='What the f*ck Python!',
|
||||||
|
author="Satwik Kansal",
|
||||||
|
maintainer="Satwik Kansal",
|
||||||
|
maintainer_email='satwikkansal@gmail.com',
|
||||||
|
url='https://github.com/satwikkansal/wtfpython',
|
||||||
|
platforms='any',
|
||||||
|
license="WTFPL 2.0",
|
||||||
|
long_description="An interesting collection of subtle & tricky Python Snippets"
|
||||||
|
" and features.",
|
||||||
|
keywords="wtfpython gotchas snippets tricky",
|
||||||
|
packages=find_packages(),
|
||||||
|
entry_points = {
|
||||||
|
'console_scripts': ['wtfpython = wtf_python.main:load_and_read']
|
||||||
|
},
|
||||||
|
classifiers=[
|
||||||
|
'Development Status :: 4 - Beta',
|
||||||
|
|
||||||
|
'Environment :: Console',
|
||||||
|
'Environment :: MacOS X',
|
||||||
|
'Environment :: Win32 (MS Windows)',
|
||||||
|
|
||||||
|
'Intended Audience :: Science/Research',
|
||||||
|
'Intended Audience :: Developers',
|
||||||
|
'Intended Audience :: Education',
|
||||||
|
'Intended Audience :: End Users/Desktop',
|
||||||
|
|
||||||
|
'Operating System :: OS Independent',
|
||||||
|
|
||||||
|
'Programming Language :: Python :: 3',
|
||||||
|
'Programming Language :: Python :: 2',
|
||||||
|
|
||||||
|
'Topic :: Documentation',
|
||||||
|
'Topic :: Education',
|
||||||
|
'Topic :: Scientific/Engineering',
|
||||||
|
'Topic :: Software Development'],
|
||||||
|
)
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,35 @@
|
||||||
|
import pydoc
|
||||||
|
try:
|
||||||
|
from urllib.request import urlretrieve
|
||||||
|
except ImportError:
|
||||||
|
from urllib import urlretrieve
|
||||||
|
|
||||||
|
url = ("https://raw.githubusercontent.com/satwikkansal/"
|
||||||
|
"wtfpython/master/README.md")
|
||||||
|
file_name = "content.md"
|
||||||
|
|
||||||
|
|
||||||
|
def fetch_updated_doc():
|
||||||
|
try:
|
||||||
|
print("Fetching the latest version...")
|
||||||
|
urlretrieve(url, file_name)
|
||||||
|
print("Done!")
|
||||||
|
except Exception as e:
|
||||||
|
print(e)
|
||||||
|
print("Uh oh, failed to check for the latest version, "
|
||||||
|
"using the local version for now.")
|
||||||
|
|
||||||
|
|
||||||
|
def render_doc():
|
||||||
|
with open(file_name, 'r') as f:
|
||||||
|
content = f.read()
|
||||||
|
pydoc.pager(content)
|
||||||
|
|
||||||
|
|
||||||
|
def load_and_read():
|
||||||
|
fetch_updated_doc()
|
||||||
|
render_doc()
|
||||||
|
|
||||||
|
|
||||||
|
if __name__== "__main__":
|
||||||
|
load_and_read()
|
Binary file not shown.
|
@ -0,0 +1,8 @@
|
||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
import sys
|
||||||
|
|
||||||
|
from wtf_python.main import load_and_read
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
sys.exit(load_and_read())
|
Loading…
Reference in New Issue