mirror of
https://github.com/satwikkansal/wtfpython
synced 2024-12-21 12:20:09 +01:00
* Fix .gitignore issue
* Add pypi package 🚀
This commit is contained in:
parent
a612e975ee
commit
d325554921
0
.gitignore
vendored
Executable file → Normal file
0
.gitignore
vendored
Executable file → Normal file
0
.npmignore
vendored
Executable file → Normal file
0
.npmignore
vendored
Executable file → Normal file
0
images/tic-tac-toe/after_board_initialized.png
vendored
Executable file → Normal file
0
images/tic-tac-toe/after_board_initialized.png
vendored
Executable file → Normal file
Before Width: | Height: | Size: 159 KiB After Width: | Height: | Size: 159 KiB |
0
images/tic-tac-toe/after_row_initialized.png
vendored
Executable file → Normal file
0
images/tic-tac-toe/after_row_initialized.png
vendored
Executable file → Normal file
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 50 KiB |
0
mixed_tabs_and_spaces.py
Executable file → Normal file
0
mixed_tabs_and_spaces.py
Executable file → Normal file
0
package.json
vendored
Executable file → Normal file
0
package.json
vendored
Executable file → Normal file
BIN
wtfpython-pypi/__pycache__/main.cpython-35.pyc
vendored
Normal file
BIN
wtfpython-pypi/__pycache__/main.cpython-35.pyc
vendored
Normal file
Binary file not shown.
2190
wtfpython-pypi/content.md
vendored
Normal file
2190
wtfpython-pypi/content.md
vendored
Normal file
File diff suppressed because it is too large
Load Diff
BIN
wtfpython-pypi/main.pyc
vendored
Normal file
BIN
wtfpython-pypi/main.pyc
vendored
Normal file
Binary file not shown.
41
wtfpython-pypi/setup.py
Normal file
41
wtfpython-pypi/setup.py
Normal file
@ -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'],
|
||||
)
|
0
wtfpython-pypi/wtf_python/__init__.py
Normal file
0
wtfpython-pypi/wtf_python/__init__.py
Normal file
BIN
wtfpython-pypi/wtf_python/__init__.pyc
vendored
Normal file
BIN
wtfpython-pypi/wtf_python/__init__.pyc
vendored
Normal file
Binary file not shown.
BIN
wtfpython-pypi/wtf_python/__pycache__/__init__.cpython-35.pyc
vendored
Normal file
BIN
wtfpython-pypi/wtf_python/__pycache__/__init__.cpython-35.pyc
vendored
Normal file
Binary file not shown.
BIN
wtfpython-pypi/wtf_python/__pycache__/main.cpython-35.pyc
vendored
Normal file
BIN
wtfpython-pypi/wtf_python/__pycache__/main.cpython-35.pyc
vendored
Normal file
Binary file not shown.
35
wtfpython-pypi/wtf_python/main.py
Normal file
35
wtfpython-pypi/wtf_python/main.py
Normal file
@ -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()
|
BIN
wtfpython-pypi/wtf_python/main.pyc
vendored
Normal file
BIN
wtfpython-pypi/wtf_python/main.pyc
vendored
Normal file
Binary file not shown.
8
wtfpython-pypi/wtfpython
vendored
Normal file
8
wtfpython-pypi/wtfpython
vendored
Normal file
@ -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…
x
Reference in New Issue
Block a user