Skip to content

Commit

Permalink
update setup
Browse files Browse the repository at this point in the history
  • Loading branch information
ppwwyyxx committed Jan 4, 2016
1 parent 46b574a commit 84e5617
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 16 deletions.
3 changes: 3 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
recursive-include sopaper *.py
recursive-include sopaper *.dic
recursive-exclude webapi *
4 changes: 4 additions & 0 deletions manage/reinstall.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

yes | pip2 uninstall sopaper
pip2 install . --user
21 changes: 14 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
from distutils.core import setup
setup(
#from distutils.core import setup
from setuptools import setup
kwargs = dict(
name = 'sopaper',
packages = ['sopaper'], # this must be the same as the name above
version = '0.1',
description = 'Automatically search and download paper',
author = 'Yuxin Wu',
author_email = 'ppwwyyxxc@gmail.com',
url = 'https://github.com/ppwwyyxx/sopaper', # use the URL to the github repo
download_url = 'https://github.com/ppwwyyxx/sopaper/tarball', # I'll explain this in a second
keywords = ['paper', 'academic', 'crawler'], # arbitrary keywords
classifiers = [],
url = 'https://github.com/ppwwyyxx/sopaper',
download_url = 'https://github.com/ppwwyyxx/sopaper/tarball/0.1',
keywords = ['Utility'],
packages = ['sopaper', 'sopaper.fetcher',
'sopaper.lib', 'sopaper.searcher'],
entry_points={
'console_scripts': ['sopaper = sopaper.__main__:main']
},
include_package_data=True,
install_requires=['termcolor', 'requests', 'beautifulsoup4']
)
setup(**kwargs)
File renamed without changes.
5 changes: 3 additions & 2 deletions sopaper/lib/pdfutil.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python2
# -*- coding: UTF-8 -*-
# File: pdfutil.py
# Date: Wed Jul 08 22:54:42 2015 +0800
# Date: Mon Jan 04 02:39:11 2016 +0000
# Author: Yuxin Wu <ppwwyyxxc@gmail.com>

from ..lib.textutil import filter_nonascii, parse_file_size
Expand All @@ -24,7 +24,8 @@ def is_exe(path):
if is_exe(exe):
break
else:
log_info('pdftk not installed. I don\'t know if pdf file is valid!')
log_info('pdftk not installed. Not sure if pdf file is valid!')
return True
f = tempfile.NamedTemporaryFile(delete=False)
f.write(buf)
f.close()
Expand Down
10 changes: 3 additions & 7 deletions sopaper/ukconfig.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python2
# -*- coding: UTF-8 -*-
# File: ukconfig.py
# Date: Wed Jul 08 22:51:48 2015 +0800
# Date: Mon Jan 04 02:33:47 2016 +0000
# Author: Yuxin Wu <ppwwyyxxc@gmail.com>

download_method = 'wget'
Expand All @@ -11,12 +11,8 @@
FILE_SIZE_MAXIMUM = 100000000 # at most 100mb

import os
LOG_DIR = os.path.join(os.path.dirname(__file__),
'../soalog/')
try:
os.mkdir(LOG_DIR)
except:
pass

LOG_DIR = None

# this lib is not required for command line script
USE_MAGIC_LIB = False
Expand Down

0 comments on commit 84e5617

Please sign in to comment.