mirror of
				https://github.com/RicterZ/nhentai.git
				synced 2025-11-04 02:50:55 +01:00 
			
		
		
		
	setup.py and add command line support
This commit is contained in:
		
							
								
								
									
										2
									
								
								MANIFEST.in
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								MANIFEST.in
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,2 @@
 | 
				
			|||||||
 | 
					include README.md
 | 
				
			||||||
 | 
					include requirements.txt
 | 
				
			||||||
@@ -1,11 +1,11 @@
 | 
				
			|||||||
#!/usr/bin/env python
 | 
					#!/usr/bin/env python2.7
 | 
				
			||||||
#coding: utf-8
 | 
					#coding: utf-8
 | 
				
			||||||
 | 
					
 | 
				
			||||||
from hentai.cmdline import cmd_parser, banner
 | 
					from nhentai.cmdline import cmd_parser, banner
 | 
				
			||||||
from hentai.parser import dojinshi_parser, search_parser, print_dojinshi
 | 
					from nhentai.parser import dojinshi_parser, search_parser, print_dojinshi
 | 
				
			||||||
from hentai.dojinshi import Dojinshi
 | 
					from nhentai.dojinshi import Dojinshi
 | 
				
			||||||
from hentai.downloader import Downloader
 | 
					from nhentai.downloader import Downloader
 | 
				
			||||||
from hentai.logger import logger
 | 
					from nhentai.logger import logger
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
__version__ = '0.1'
 | 
					__version__ = '0.1'
 | 
				
			||||||
@@ -1,6 +1,6 @@
 | 
				
			|||||||
import Queue
 | 
					import Queue
 | 
				
			||||||
from constant import DETAIL_URL, IMAGE_URL
 | 
					from constant import DETAIL_URL, IMAGE_URL
 | 
				
			||||||
from hentai.logger import logger
 | 
					from nhentai.logger import logger
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class Dojinshi(object):
 | 
					class Dojinshi(object):
 | 
				
			||||||
@@ -36,7 +36,7 @@ class Dojinshi(object):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if __name__ == '__main__':
 | 
					if __name__ == '__main__':
 | 
				
			||||||
    test = Dojinshi(name='test hentai dojinshi', id=1)
 | 
					    test = Dojinshi(name='test nhentai dojinshi', id=1)
 | 
				
			||||||
    print test
 | 
					    print test
 | 
				
			||||||
    test.show()
 | 
					    test.show()
 | 
				
			||||||
    try:
 | 
					    try:
 | 
				
			||||||
@@ -6,7 +6,7 @@ import threading
 | 
				
			|||||||
import Queue
 | 
					import Queue
 | 
				
			||||||
import requests
 | 
					import requests
 | 
				
			||||||
from urlparse import urlparse
 | 
					from urlparse import urlparse
 | 
				
			||||||
from hentai.logger import logger
 | 
					from nhentai.logger import logger
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# global timeout
 | 
					# global timeout
 | 
				
			||||||
@@ -146,7 +146,7 @@ logger.setLevel(logging.DEBUG)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if __name__ == '__main__':
 | 
					if __name__ == '__main__':
 | 
				
			||||||
    logger.log(15, 'hentai')
 | 
					    logger.log(15, 'nhentai')
 | 
				
			||||||
    logger.info('info')
 | 
					    logger.info('info')
 | 
				
			||||||
    logger.warn('warn')
 | 
					    logger.warn('warn')
 | 
				
			||||||
    logger.debug('debug')
 | 
					    logger.debug('debug')
 | 
				
			||||||
@@ -3,7 +3,7 @@ import re
 | 
				
			|||||||
import requests
 | 
					import requests
 | 
				
			||||||
from bs4 import BeautifulSoup
 | 
					from bs4 import BeautifulSoup
 | 
				
			||||||
from constant import DETAIL_URL, SEARCH_URL
 | 
					from constant import DETAIL_URL, SEARCH_URL
 | 
				
			||||||
from hentai.logger import logger
 | 
					from nhentai.logger import logger
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def dojinshi_parser(id):
 | 
					def dojinshi_parser(id):
 | 
				
			||||||
							
								
								
									
										6
									
								
								setup.py
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								setup.py
									
									
									
									
									
								
							@@ -14,11 +14,13 @@ setup(
 | 
				
			|||||||
    description='nhentai.net dojinshis downloader',
 | 
					    description='nhentai.net dojinshis downloader',
 | 
				
			||||||
    url='https://github.com/RicterZ/nhentai',
 | 
					    url='https://github.com/RicterZ/nhentai',
 | 
				
			||||||
    include_package_data=True,
 | 
					    include_package_data=True,
 | 
				
			||||||
 | 
					    zip_safe=False,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    install_requires=requirements,
 | 
					    install_requires=requirements,
 | 
				
			||||||
    entry_points={
 | 
					    entry_points={
 | 
				
			||||||
        'console_scripts': [
 | 
					        'console_scripts': [
 | 
				
			||||||
            'nhentai = nhentai:main',
 | 
					            'nhentai = nhentai.command:main',
 | 
				
			||||||
        ]
 | 
					        ]
 | 
				
			||||||
    }
 | 
					    },
 | 
				
			||||||
 | 
					    license='MIT',
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
		Reference in New Issue
	
	Block a user