{ "info": { "author": "Singapore-Tech-Entrepreneurs", "author_email": "tal@ste.sg", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Natural Language :: English", "Programming Language :: Python :: 3.6", "Topic :: Utilities" ], "description": "XComment\n========\n\n\nTable of Contents\n-----------------\n\n* `XComment`_\n\n * `Table of Contents`\n * `Installation`_\n * `Usage`_\n * `Processing files`_\n * `Processing directories`_\n * `Archives`_\n * `Logging`_\n * `Get supported language list`_\n * `To see full CLI specification, run`_\n * `Development`_\n * `Getting Up-and-Running Locally`_\n * `Setting Things Up on Ubuntu`_\n * `Deployment`_\n * `Pip registry`_\n * `Install dependencies`_\n * `Set pypi credentials`_\n * `Create distribution`_\n * `Upload`_\n * `Tips`_\n\nInstallation\n------------\n\n.. code-block:: shell\n\n $ pip install XComment\n\nUsage\n-----\n\nUse the project's CLI to interact with the script.\n\n\nProcessing files\n++++++++++++++++\n\nSay, you are working with the file `./tests/sources/HTML/index.html`.\n\nPrecondition: virtualenv is activated (of course).\n\nTo remove comments (output code without comments to output file) invoke\n\n```shell\n$ comments_remover ./tests/sources/HTML/input.html HTML ./\n```\nThis will take `./tests/sources/HTML/input.html`, designated as `HTML` file, and put the copy of the former (with HTML-specific comments removed, obviously) to `./` named `rc.input.html`. The latter is the name of the original file prefixed with `rc.` by default.\n\nTo highlight comments (outputs comments only to output file) invoke\n\n.. code-block:: shell\n\n $ comments_remover ./tests/sources/HTML/input.html HTML -p ./\n\n\nProcessing directories\n++++++++++++++++++++++\n\nIf on start been specified directory path, script will be processing directory recursively with all subdirs for sources by specified language.\n\n\nArchives\n++++++++\n\nFor processing archived sources use option -a\n\nExamples:\n\n.. code-block:: shell\n\n $ # remove comments\n $ comments_remover ./tmp/test.zip -a Python\n\n $ # highlight comments\n $ comments_remover ./tmp/test.zip -a -p Python\n\nLogging\n+++++++\n\n-l option enable logging (in stdout by default)\n\n-f < path > specify path to log file\n\nExample:\n\n.. code-block:: shell\n\n $ comments_remover ./tmp/test.py -l -f ./remove.log Python\n\nGet supported language list\n+++++++++++++++++++++++++++\n\nFor get list supported languages use -i option.\nResult list will returned in json format\n\n\n.. code-block:: shell\n\n $ comments_remover -i\n\n [\"PHP\", \"Python\", \"CSS\", \"HTML\", \"JavaScript\", \"ActionScript\", \"Ruby\",\n \"Assembly\", \"AppleScript\", \"Bash\", \"CSharp\", \"VB\", \"XML\", \"SQL\", \"C\"]\n\n\nTo see full CLI specification, run\n++++++++++++++++++++++++++++++++++\n\n\n.. code-block:: shell\n\n $ comments_remover\n\n\nDevelopment\n-----------\n\n\nGetting Up-and-Running Locally\n++++++++++++++++++++++++++++++\n\nTested with the following configuration:\n\n* Ubuntu 16.04 / 17\n* Python 3.6.\n\n*Note: the below occurences of `./` refer to the project root unless explicitly stated otherwise*.\n\n\nSetting Things Up on Ubuntu\n~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n#. Enter the shell.\n\n#. Install `pyenv` via [pyenv-installer](https://github.com/pyenv/pyenv-installer):\n\n .. code-block:: shell\n\n $ curl -L https://raw.githubusercontent.com/pyenv/pyenv-installer/master/bin/pyenv-installer | bash\n\n .. image:: ./docs/images/pyenv-installer.png\n\n#. Follow the instructions on how to initialize `pyenv` on shell startup, for instance:\n\n .. code-block:: shell\n\n $ echo 'export PATH=\"/root/.pyenv/bin:$PATH\"' >> ~/.bash_profile\n $ echo 'eval \"$(pyenv init -)\"' >> ~/.bash_profile\n $ echo 'eval \"$(pyenv virtualenv-init -)\"' >> ~/.bash_profile\n\n .. image:: ./docs/images/initialize-pyenv-with-shell.png\n\n#. Install Python 3.6.x via `pyenv`, say Python 3.6.2 (latest micro release versions are preferred):\n\n .. code-block:: shell\n \n $ pyenv install 3.6.2\n\n .. image:: ./docs/images/pyenv-install-3-6-2.png\n\n#. Create a virtualenv for the project:\n\n .. code-block:: shell\n\n $ pyenv virtualenv 3.6.2 comments_remover\n\n .. image:: ./docs/images/pyenv-virtualenv-3.6.2-comments_remover.pngA\n\n#. Switch to whatever directory you wish the project to reside in, say `~`:\n\n .. code-block:: shell\n\n $ cd ~\n\n .. image:: ./docs/images/cd-~.pngA\n\n#. Clone the project from GitHub:\n * either via SSH (the preferred way):\n\n .. code-block:: shell\n\n $ git clone git@github.com:Singapore-Tech-Entrepreneurs/comments_remover.git\n\n .. image:: ./docs/images/git-clone-gitatgithub-com-singapore-tech-entrepreneurs-comments-remover-git.png\n\n * or via HTTPS:\n\n .. code-block:: shell\n\n $ git clone https://github.com/Singapore-Tech-Entrepreneurs/comments_remover.git\n\n .. image:: ./docs/images/git-clone-https-github-com-singapore-tech-entrepreneurs-comments-remover-git.png\n\n#. Switch to the project directory:\n\n .. code-block:: shell\n\n $ cd comments_remover\n\n .. image:: ./docs/images/cd-comments_remover.png\n\n#. Activate the virtualenv:\n\n .. code-block:: shell\n\n $ pyenv activate comments_remover\n\n .. image:: ./docs/images/pyenv-activate-comments_remover.png\n\n#. Install project dependencies:\n\n .. code-block:: shell\n\n $ pip install -U -r ./requirements.txt\n\n .. image:: ./docs/images/pip-install-u-r-requirements-txt.png\n\n#. Install dependencies for testing:\n\n .. code-block:: shell\n\n $ pip install -U -r ./requirements-test.txt\n\n .. image:: ./docs/images/pip-install-u-r-requirements-test-txt.png\n\n#. (optional) Install [IPython](https://ipython.org/) interactive shell to speed up development:\n\n .. code-block:: shell\n\n $ pip install ipython==6.1.0\n\n .. image:: ./docs/images/pip-install-ipython-6-1-0.png\n \nTo run tests, simply\n\n.. code-block:: shell\n\n $ pytest ./\n\n.. image:: ./docs/images/pytest.png\n\nTo also see coverage report,\n\n.. code-block:: shell\n\n pytest --cov ./\n\n.. image:: ./docs/images/pytest-cov.png\n\nYou should be good to go now.\n\nDeployment\n++++++++++\n\nPip registry\n~~~~~~~~~~~~\n\nInstall dependencies\n********************\n\n.. code-block:: shell\n\n $ python install -r requirements-deploy.txt\n\nSet pypi credentials\n********************\n\n.. code-block:: shell\n\n $ export TWINE_USERNAME=\n $ export TWINE_PASSWORD=\n\nCreate distribution\n*******************\n\n.. code-block:: shell\n\n $ python setup.py sdist bdist_wheel\n\n\nUpload\n******\n\n.. code-block:: shell\n\n $ twine upload dist/XComment-x.y.z.tar.gz\n\nTips\n----\n\nIf you're not using [PyCharm](https://www.jetbrains.com/pycharm/) yet, make sure to at least consider this as an option. \nAlso check out [JetBrains Toolbox](https://www.jetbrains.com/toolbox/), a single tool to rule them all (the JetBrains products). \nTo stay up-to-date, follow [PyCharm Blog](https://blog.jetbrains.com/pycharm/).", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://packages.python.org/XComment", "keywords": "code comments removal xcomment", "license": "", "maintainer": "", "maintainer_email": "", "name": "XComment", "package_url": "https://pypi.org/project/XComment/", "platform": "", "project_url": "https://pypi.org/project/XComment/", "project_urls": { "Homepage": "http://packages.python.org/XComment" }, "release_url": "https://pypi.org/project/XComment/0.0.2/", "requires_dist": null, "requires_python": "", "summary": "A script to remove comments from code.", "version": "0.0.2" }, "last_serial": 3346367, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "a1ac5578f9f0ca0f313a5dc97345dcc3", "sha256": "1e16a91cdaa5431266150117c6a4f090a74d9e1030e4fa656e06be337268f5ed" }, "downloads": -1, "filename": "XComment-0.0.1.tar.gz", "has_sig": false, "md5_digest": "a1ac5578f9f0ca0f313a5dc97345dcc3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9350, "upload_time": "2017-11-19T12:18:33", "url": "https://files.pythonhosted.org/packages/ba/b6/9f615338691ff714d41b56700a07f95f2a84657a0fb4c427065c248aed8c/XComment-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "df2d1d45d930aa30e9790f2356417d74", "sha256": "f57bd7c3c89cef8a6a4b1393e6c18b24370b9db8a282659a10d460029e33c0d0" }, "downloads": -1, "filename": "XComment-0.0.2.tar.gz", "has_sig": false, "md5_digest": "df2d1d45d930aa30e9790f2356417d74", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9597, "upload_time": "2017-11-19T19:09:52", "url": "https://files.pythonhosted.org/packages/e8/6a/4adb8946005950baf270e7b86559ea5a847987925596b10490e8692a6fd8/XComment-0.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "df2d1d45d930aa30e9790f2356417d74", "sha256": "f57bd7c3c89cef8a6a4b1393e6c18b24370b9db8a282659a10d460029e33c0d0" }, "downloads": -1, "filename": "XComment-0.0.2.tar.gz", "has_sig": false, "md5_digest": "df2d1d45d930aa30e9790f2356417d74", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9597, "upload_time": "2017-11-19T19:09:52", "url": "https://files.pythonhosted.org/packages/e8/6a/4adb8946005950baf270e7b86559ea5a847987925596b10490e8692a6fd8/XComment-0.0.2.tar.gz" } ] }