{ "info": { "author": "Lilian Besson", "author_email": "naereen@crans.org", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: MacOS", "Operating System :: Microsoft :: Windows", "Operating System :: POSIX", "Operating System :: Unix", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Software Development :: User Interfaces", "Topic :: Terminals", "Topic :: Utilities" ], "description": "``generatewordcloud.py``\n========================\n\nA simple Python script to generate a square wordcloud from one (or more) text file(s).\nSupporting both Python 2 and 3 (2.7+ and 3.4+).\n|generatewordcloud in pypi|\n\n|generate-word-cloud example meta|\n\nBased on the great `word\\_cloud `__ module by `@amueller `__.\n\n\n|PyPI version|\n|PyPI license|\n|PyPI format|\n|PyPI pyversions|\n|PyPI implementation|\n|PyPI status|\n\n--------------\n\nHow to use it?\n--------------\n\n1. `Requirements `__\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nThe usual module `matplotlib `__ is needed for the plotting,\n`docopt `__ is needed for the command line interface,\nand `word\\_cloud `__ is needed for the actual work (generating the cloud of words after reading the files).\n\nThe required Python (2 or 3) modules can be installed with `pip `__, either directly:\n\n.. code:: bash\n\n # Directly:\n sudo pip install matplotlib docopt word_cloud\n\nOr with the `requirements.txt `__ file:\n\n.. code:: bash\n\n sudo pip install -r requirements.txt\n\n\n*Note*: if `ansicolortags `__ is\navailable, it will be used to print nice colors in the help and during the generation of word clouds.\n\n\n2. Installation\n~~~~~~~~~~~~~~~\n\nClone the repository, copy the `script (generate-word-cloud.py) <./generate-word-cloud.py>`__ somewhere in your ``PATH`` (e.g., ``~/.local/bin/``).\n\nYou can also just download the script itself:\n\n.. code:: bash\n\n $ wget https://raw.githubusercontent.com/Naereen/generate-word-cloud.py/master/generate-word-cloud.py\n $ cp generate-word-cloud.py /path/to/a/directory/in/your/PATH/\n\n\nNote: The script is *also* available from `PyPI `__ : `pypi.python.org/pypi/generatewordcloud `_.\nYou can install it using `pip `__.\n\n.. code:: bash\n\n $ sudo pip install generatewordcloud\n\n\n|PyPI version|\n|PyPI license|\n|PyPI format|\n|PyPI pyversions|\n|PyPI implementation|\n|PyPI status|\n\n\n3. Usage\n~~~~~~~~\n\nHelp:\n^^^^^\n\n.. code:: bash\n\n $ generate-word-cloud.py --help\n\nFrom one or two files\n^^^^^^^^^^^^^^^^^^^^^\n\nGenerate a wordcloud from two ``txt`` files in the current directory,\nsave it to ``wordcloud_txt.png``.\n\n.. code:: bash\n\n $ generate-word-cloud.py -o ./wordcloud_txt.png ./file1.txt ./file2.txt\n\nGenerate a wordcloud from the textfile ``hamlet.txt`` (~ 8000 lines),\nsaving to ``hamlet.png``:\n\n.. code:: bash\n\n $ generate-word-cloud.py -o ./hamlet.png ./hamlet.txt\n\n|generate-word-cloud example hamlet|\n\n(It should work on pretty big text files without any issue.)\n\n--------------\n\nOther examples\n--------------\n\nFrom a lot of Python scripts (~ 200)\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n|generate-word-cloud example python|\n\nFrom a lot of Bash scripts (~ 150)\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n|generate-word-cloud example bash|\n\nFrom a lot of LaTeX files (~ 180)\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n|generate-word-cloud example LaTeX|\n\nMeta example\n~~~~~~~~~~~~\n\nGenerate a wordcloud from the `README.md <./README.md>`__ and\n`generate-word-cloud.py <./generate-word-cloud.py>`__ files **of this\nvery project**, save it to ``wordcloud_meta.png``!\n\n.. code:: bash\n\n $ generate-word-cloud.py -o ./wordcloud_meta.png ./*.md ./*.py\n\n|generate-word-cloud example meta|\n\n--------------\n\nFeatures\n--------\n\n- [x] Support one or more input file(s), will cleanly skip any file it\n fails to find or fails to read,\n- [x] Custom output file, won't be overwritten (except with ``-f``\n flag),\n- [x] Nice command line interface\n (`argparse `__\n powered). I switched to `docopt `__\n after realizing how awesome it is!\n- [x] Has a command line option for every important parameter (max nb\n of words, width, height etc).\n- [x] Input filenames with spaces in their name were seen as several\n files (e.g. ``this file.txt``), FIXED with the switch to\n `docopt `__.\n\n--------------\n\nComplete documentation (``--help``)\n-----------------------------------\n\n::\n\n $ generate-word-cloud.py -h | --help\n Usage:\n generate-word-cloud.py [-s | --show] [-f | --force] [-o OUTFILE | --outfile=OUTFILE]\n [-t TITLE | --title=TITLE] [-m MAX | --max=MAX]\n [-w WIDTH | --width=WIDTH] [-H HEIGHT | --height=HEIGHT]\n INFILE...\n generate-word-cloud.py (-h | --help)\n generate-word-cloud.py (-v | --version)\n\n Options:\n -h --help Show this help message and exit.\n -v --version Show program's version number and exit.\n -s --show Show the image but do not save it [default False].\n -f --force Force to write the image, even if present (default is to ask before overwriting an existing file) [default False].\n -o OUTFILE --outfile=OUTFILE\n Filename for the generated image [default 'wordcloud.png'].\n -t TITLE --title=TITLE\n Title for the image [default None].\n -m MAX --max MAX\n Max number of words to display on the cloud word [default 150].\n -w WIDTH --width WIDTH\n Width of the generate image [default 400].\n -H HEIGHT --height HEIGHT\n Height of the generate image [default 300].\n INFILE A text file to read.\n\n--------------\n\nTODO\n----\n\n- [x] Start it, from `this example `__,\n- [x] Run it on some interesting examples, embed them here (as images),\n- [X] Check on weird encodings? (i.e., not UTF-8). It works fine!\n- [X] Test it against :closed\\_book: VERY large files (million of line)\n ? It works fine, slowly but fine.\n- [X] Test it against LOTS of files (several thousands) ? It\n works fine, slowly but fine.\n- [X] Publish it on PyPI: it is available at `pypi.python.org/pypi/generatewordcloud/ `_.\n- [ ] Write a small article about it for `my blog `__.\n\nKnows issues\n~~~~~~~~~~~~\n\n- [ ] Only tested on (X)Ubuntu (15.10), but it should work on other\n GNU/Linux distribution and Mac OS X (and probably Windows), if they\n support `docopt `__ and has both\n `docopt `__ and\n `word\\_cloud `__ installed.\n\n**Unknown issues?**\n~~~~~~~~~~~~~~~~~~~\n\n`Use the issue tracker `__ to notify me of a bug!\n\n--------------\n\nAbout\n-----\n\n*Why write this script?*\n~~~~~~~~~~~~~~~~~~~~~~~~\n\nThere already is a lot of `good cloud word generator online `__, e.g. `wordle.net `__.\n\n#. I wanted a way to visualize the major keywords of Bash and Python (my\n two `favorite programming languages `__) and of Markdown/Strapdown, reStructuredText and LaTeX (my favorite typeset documents system),\n#. The original project `word\\_cloud `__ seemed cool. And it is. Great job\n `@amueller `__ !\n#. `Clouds of words are interesting `__! And Python is awesome!\n\nAuthor\n~~~~~~\n\n `Lilian Besson (Naereen) `__.\n\nLicense ? |GitHub license|\n--------------------------\n\nThis plug-in is published under the terms of the `GPLv3 License `__ (file `LICENSE.txt `__), \u00a9 `Lilian Besson `__, 2016.\n\n|Maintenance|\n|Ask Me Anything !|\n|Analytics|\n|made-with-python|\n\n|ForTheBadge uses-badges|\n|ForTheBadge uses-git|\n\n|ForTheBadge built-with-love|\n\n\n.. |generatewordcloud in pypi| image:: https://img.shields.io/pypi/v/generatewordcloud.svg\n :target: https://pypi.python.org/pypi/generatewordcloud\n.. |PyPI version| image:: https://img.shields.io/pypi/v/generatewordcloud.svg\n :target: https://pypi.python.org/pypi/generatewordcloud/\n.. |PyPI license| image:: https://img.shields.io/pypi/l/generatewordcloud.svg\n :target: https://pypi.python.org/pypi/generatewordcloud/\n.. |PyPI format| image:: https://img.shields.io/pypi/format/generatewordcloud.svg\n :target: https://pypi.python.org/pypi/generatewordcloud/\n.. |PyPI pyversions| image:: https://img.shields.io/pypi/pyversions/generatewordcloud.svg\n :target: https://pypi.python.org/pypi/generatewordcloud/\n.. |PyPI implementation| image:: https://img.shields.io/pypi/implementation/generatewordcloud.svg\n :target: https://pypi.python.org/pypi/generatewordcloud/\n.. |PyPI status| image:: https://img.shields.io/pypi/status/generatewordcloud.svg\n :target: https://pypi.python.org/pypi/generatewordcloud/\n.. |generate-word-cloud example meta| image:: https://github.com/Naereen/generate-word-cloud.py/raw/master/wordcloud_meta.png\n.. |generate-word-cloud example hamlet| image:: https://github.com/Naereen/generate-word-cloud.py/raw/master/wordcloud_hamlet.png\n.. |generate-word-cloud example python| image:: https://github.com/Naereen/generate-word-cloud.py/raw/master/wordcloud_python.png\n.. |generate-word-cloud example bash| image:: https://github.com/Naereen/generate-word-cloud.py/raw/master/wordcloud_bash.png\n.. |generate-word-cloud example LaTeX| image:: https://github.com/Naereen/generate-word-cloud.py/raw/master/wordcloud_latex.png\n.. |GitHub license| image:: https://img.shields.io/github/license/Naereen/generate-word-cloud.py.svg\n :target: https://github.com/Naereen/generate-word-cloud.py/blob/master/LICENSE\n.. |Maintenance| image:: https://img.shields.io/badge/Maintained%3F-yes-green.svg\n :target: https://GitHub.com/Naereen/generate-word-cloud.py/graphs/commit-activity\n.. |Ask Me Anything !| image:: https://img.shields.io/badge/Ask%20me-anything-1abc9c.svg\n :target: https://GitHub.com/Naereen/ama\n.. |Analytics| image:: https://ga-beacon.appspot.com/UA-38514290-17/github.com/Naereen/generate-word-cloud.py/README.md?pixel\n :target: https://GitHub.com/Naereen/generate-word-cloud.py/\n.. |made-with-python| image:: https://img.shields.io/badge/Made%20with-Python-1f425f.svg\n :target: https://www.python.org/\n.. |ForTheBadge uses-badges| image:: http://ForTheBadge.com/images/badges/uses-badges.svg\n :target: http://ForTheBadge.com\n.. |ForTheBadge uses-git| image:: http://ForTheBadge.com/images/badges/uses-git.svg\n :target: https://GitHub.com/\n.. |ForTheBadge built-with-love| image:: http://ForTheBadge.com/images/badges/built-with-love.svg\n :target: https://GitHub.com/Naereen/", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/Naereen/generate-word-cloud.py", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Naereen/generate-word-cloud.py", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "generatewordcloud", "package_url": "https://pypi.org/project/generatewordcloud/", "platform": "Windows,Windows Cygwin,GNU/Linux,MacOS", "project_url": "https://pypi.org/project/generatewordcloud/", "project_urls": { "Download": "https://github.com/Naereen/generate-word-cloud.py", "Homepage": "https://github.com/Naereen/generate-word-cloud.py" }, "release_url": "https://pypi.org/project/generatewordcloud/0.3/", "requires_dist": null, "requires_python": null, "summary": "A simple Python (2 or 3) script to generate a PNG word-cloud image from a bunch of text files. Based on word_cloud.", "version": "0.3" }, "last_serial": 2402408, "releases": { "0.2": [ { "comment_text": "", "digests": { "md5": "b97b841259a6124909c83ad9daca5325", "sha256": "edba7b2994e94d9d9beaf4c79a6e53580aff6ede950cb54c38abf02c3c238e63" }, "downloads": -1, "filename": "generatewordcloud-0.3.tar.gz", "has_sig": true, "md5_digest": "b97b841259a6124909c83ad9daca5325", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7566, "upload_time": "2016-10-16T14:38:43", "url": "https://files.pythonhosted.org/packages/42/41/5fe8ec846d0e13522ffdf376b616accee85d29d25b62747151bb0df81b29/generatewordcloud-0.3.tar.gz" } ], "0.3": [] }, "urls": [] }