modfication de setup.py pour permettre d'avoir la commande vdm fonctionnel dans /bin

This commit is contained in:
antoine 2017-01-11 00:37:54 +01:00
parent 3881cda577
commit 51d120df26
15 changed files with 36 additions and 10 deletions

BIN
VDMAPI/Display/__init__.pyc Normal file

Binary file not shown.

View File

@ -9,4 +9,4 @@ class console(object):
def render(self):
lstAllVDM = self.v.get()
for i, vdm in enumerate(lstAllVDM):
print(str(i)+" : "+vdm)
print(str(i)+" : "+vdm.strip())

BIN
VDMAPI/Display/console.pyc Normal file

Binary file not shown.

BIN
VDMAPI/Display/i3.pyc Normal file

Binary file not shown.

Binary file not shown.

BIN
VDMAPI/Display/tkinter.pyc Normal file

Binary file not shown.

View File

@ -5,7 +5,7 @@ class MyHTMLParser(HTMLParser):
def __init__(self):
super(MyHTMLParser, self).__init__()
self.vdm = []
self.save = False
self.save = 0
def _searchClass(self, listTuple, className="post article"):
for v in listTuple:
@ -14,13 +14,16 @@ class MyHTMLParser(HTMLParser):
return False
def handle_starttag(self, tag, attrs):
if tag == "p" and self._searchClass(attrs, className="content"):
self.save = True
if tag == "p" and self._searchClass(attrs, className="block"):
self.save = 1
if tag == "a" and self.save == 1:
self.save = 2
def handle_data(self, data):
if self.save:
self.vdm.append(data)
self.save = False
if self.save == 2:
self.vdm.append(data.strip())
self.save = 0
def getText(self):
return self.vdm
return self.vdm

14
VDMAPI/__main__.py Normal file
View File

@ -0,0 +1,14 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
import re
import sys
from VDMAPI.VDM import VDM
def main():
for i, vdm in enumerate(VDM().get()):
print(str(i)+" : "+vdm.strip())
if __name__ == '__main__':
main()

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
dist/VDM_API-1.1-py3-none-any.whl vendored Normal file

Binary file not shown.

7
generateWheel.md Executable file
View File

@ -0,0 +1,7 @@
#!/bin/sh
pip uninstall VDM-API
pip wheel --wheel-dir=dist ./
pip install dist/VDM_API-1.1-py3-none-any.whl
# python setup.py sdist generate tar.gz archive setupable with pip

View File

@ -37,7 +37,7 @@ setup(
install_requires=[],
entry_points={
'console_scripts': [
'vdm = VDMAPI:main',
'vdm = VDMAPI.__main__:main',
]
},
classifiers=[
@ -51,5 +51,7 @@ setup(
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Topic :: Software Development :: Libraries :: Python Modules',
], )
]
)