diff --git a/novel-stats.py b/novel_stats/novel_stats.py similarity index 97% rename from novel-stats.py rename to novel_stats/novel_stats.py index 57496c9..59e2bfa 100755 --- a/novel-stats.py +++ b/novel_stats/novel_stats.py @@ -31,7 +31,8 @@ def count_words(line): return count -def main(arguments): +def main(): + arguments = sys.argv[1:] filename = arguments[0] chapter_number = None chapter_word_count = 0 @@ -70,4 +71,4 @@ def main(arguments): if __name__ == '__main__': - main(sys.argv[1:]) + main() diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..b1ef599 --- /dev/null +++ b/setup.py @@ -0,0 +1,30 @@ +from setuptools import find_packages, setup + +VERSION = '0.1.0' + + +setup( + name='novel-stats', + version=VERSION, + description='Produce word count statistics for a novel written in Markdown format.', + author='Dan Helfman', + author_email='witten@torsion.org', + url='https://projects.torsion.org/witten/novel-stats', + classifiers=[ + 'Development Status :: 4 - Beta', + 'Environment :: Console', + 'Intended Audience :: Other Audience', + 'License :: OSI Approved :: GNU General Public License v3 (GPLv3)', + 'Programming Language :: Python', + 'Topic :: Office/Business', + 'Topic :: Text Processing :: Markup', + ], + packages=find_packages(exclude=['tests*']), + entry_points={ + 'console_scripts': [ + 'novel-stats = novel_stats.novel_stats:main', + ] + }, + install_requires=(), + include_package_data=True, +)