modfication de setup.py pour permettre d'avoir la commande vdm fonctionnel dans /bin
This commit is contained in:
parent
3881cda577
commit
51d120df26
BIN
VDMAPI/Display/__init__.pyc
Normal file
BIN
VDMAPI/Display/__init__.pyc
Normal file
Binary file not shown.
@ -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
BIN
VDMAPI/Display/console.pyc
Normal file
Binary file not shown.
BIN
VDMAPI/Display/i3.pyc
Normal file
BIN
VDMAPI/Display/i3.pyc
Normal file
Binary file not shown.
BIN
VDMAPI/Display/kivyDisplay.pyc
Normal file
BIN
VDMAPI/Display/kivyDisplay.pyc
Normal file
Binary file not shown.
BIN
VDMAPI/Display/tkinter.pyc
Normal file
BIN
VDMAPI/Display/tkinter.pyc
Normal file
Binary file not shown.
@ -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
|
14
VDMAPI/__main__.py
Normal file
14
VDMAPI/__main__.py
Normal 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()
|
BIN
dist/VDM API-1.0.tar.gz
vendored
BIN
dist/VDM API-1.0.tar.gz
vendored
Binary file not shown.
BIN
dist/VDM API-1.1.tar.gz
vendored
BIN
dist/VDM API-1.1.tar.gz
vendored
Binary file not shown.
BIN
dist/VDM_API-1.0-py2.py3-none-any.whl
vendored
BIN
dist/VDM_API-1.0-py2.py3-none-any.whl
vendored
Binary file not shown.
BIN
dist/VDM_API-1.1-py2.py3-none-any.whl
vendored
BIN
dist/VDM_API-1.1-py2.py3-none-any.whl
vendored
Binary file not shown.
BIN
dist/VDM_API-1.1-py3-none-any.whl
vendored
Normal file
BIN
dist/VDM_API-1.1-py3-none-any.whl
vendored
Normal file
Binary file not shown.
7
generateWheel.md
Executable file
7
generateWheel.md
Executable 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
|
6
setup.py
6
setup.py
@ -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',
|
||||
], )
|
||||
]
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user