From 4b1be15480e51e1874d434152432b19a357421f0 Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Wed, 16 Jun 2021 10:07:06 -0500 Subject: [PATCH] docs: Convert README to markdown pandoc 2.14, prettier 2.3.1, myst-parser 0.15.0 https://github.com/executablebooks/MyST-Parser/issues/388#issuecomment-862459958 pandoc --from rst --to gfm README.rst --markdown-headings=atx | \ sed s/"<"/"\("/g | sed s/">"/"\)"/g | \ sed s/"- "/"- "/g > tmp; mv tmp README.md prettier --parser=markdown -w README.md Inside of docs/index.md: ```{include} ../README.md ``` See also: https://github.com/executablebooks/MyST-Parser/issues/388#issuecomment-862459958 --- README.md | 81 +++++++++++++++++++++++++++++++++++++++ README.rst | 101 ------------------------------------------------- docs/index.md | 4 +- pyproject.toml | 2 +- 4 files changed, 83 insertions(+), 105 deletions(-) create mode 100644 README.md delete mode 100644 README.rst diff --git a/README.md b/README.md new file mode 100644 index 00000000..9c801559 --- /dev/null +++ b/README.md @@ -0,0 +1,81 @@ +`libvcs` - abstraction layer for vcs, powers +[vcspull](https://www.github.com/vcs-python/vcspull/). + +[![Python Package](https://img.shields.io/pypi/v/libvcs.svg)](http://badge.fury.io/py/libvcs) +[![Docs](https://github.com/vcs-python/libvcs/workflows/Publish%20Docs/badge.svg)](https://github.com/vcs-python/libvcs/actions?query=workflow%3A%22Publish+Docs%22) +[![Build Status](https://github.com/vcs-python/libvcs/workflows/tests/badge.svg)](https://github.com/vcs-python/libvcs/actions?query=workflow%3A%22tests%22) +[![Code Coverage](https://codecov.io/gh/vcs-python/libvcs/branch/master/graph/badge.svg)](https://codecov.io/gh/vcs-python/libvcs) +![License](https://img.shields.io/github/license/vcs-python/libvcs.svg) + +# Setup + +```sh +$ pip install libvcs +``` + +Open up python: + +```sh +$ python + +# or for nice autocomplete and syntax highlighting +$ pip install ptpython +$ ptpython +``` + +# Usage + +Create a +[Repo](https://libvcs.git-pull.com/api.html#creating-a-repo-object) +object of the project to inspect / checkout / update: + +```python +>>> from libvcs.shortcuts import create_repo_from_pip_url, create_repo + +# repo is an object representation of a vcs repository. +>>> r = create_repo(url='https://www.github.com/vcs-python/libtmux', +... vcs='git', +... repo_dir='/tmp/libtmux') + +# or via pip-style URL +>>> r = create_repo_from_pip_url( +... pip_url='git+https://www.github.com/vcs-python/libtmux', +... repo_dir='/tmp/libtmux') +``` + +Update / clone repo: + +```python +# it may or may not be checked out/cloned on the system yet +>>> r.update_repo() +``` + +Get revision: + +```python +>>> r.get_revision() +u'5c227e6ab4aab44bf097da2e088b0ff947370ab8' +``` + +# Donations + +Your donations fund development of new features, testing and support. +Your money will go directly to maintenance and development of the +project. If you are an individual, feel free to give whatever feels +right for the value you get out of the project. + +See donation options at . + +# More information + +- Python support: Python 2.7, >= 3.4, pypy +- VCS supported: git(1), svn(1), hg(1) +- Source: +- Docs: +- Changelog: +- API: +- Issues: +- Test Coverage: +- pypi: +- Open Hub: +- License: [MIT](https://opensource.org/licenses/MIT). diff --git a/README.rst b/README.rst deleted file mode 100644 index ee932a69..00000000 --- a/README.rst +++ /dev/null @@ -1,101 +0,0 @@ -``libvcs`` - abstraction layer for vcs, powers `vcspull`_. - -|pypi| |docs| |build-status| |coverage| |license| - -Setup ------ - -.. code-block:: sh - - $ pip install libvcs - -Open up python: - -.. code-block:: sh - - $ python - - # or for nice autocomplete and syntax highlighting - $ pip install ptpython - $ ptpython - -Usage ------ -Create a `Repo`_ object of the project to inspect / checkout / update: - -.. code-block:: python - - >>> from libvcs.shortcuts import create_repo_from_pip_url, create_repo - - # repo is an object representation of a vcs repository. - >>> r = create_repo(url='https://www.github.com/vcs-python/libtmux', - ... vcs='git', - ... repo_dir='/tmp/libtmux') - - # or via pip-style URL - >>> r = create_repo_from_pip_url( - ... pip_url='git+https://www.github.com/vcs-python/libtmux', - ... repo_dir='/tmp/libtmux') - -Update / clone repo: - -.. code-block:: python - - # it may or may not be checked out/cloned on the system yet - >>> r.update_repo() - -Get revision: - -.. code-block:: python - - >>> r.get_revision() - u'5c227e6ab4aab44bf097da2e088b0ff947370ab8' - -Donations ---------- -Your donations fund development of new features, testing and support. -Your money will go directly to maintenance and development of the project. -If you are an individual, feel free to give whatever feels right for the -value you get out of the project. - -See donation options at https://www.git-pull.com/support.html. - -More information ----------------- -- Python support: Python 2.7, >= 3.4, pypy -- VCS supported: git(1), svn(1), hg(1) -- Source: https://github.com/vcs-python/libvcs -- Docs: https://libvcs.git-pull.com -- Changelog: https://libvcs.git-pull.com/history.html -- API: https://libvcs.git-pull.com/api.html -- Issues: https://github.com/vcs-python/libvcs/issues -- Test Coverage: https://codecov.io/gh/vcs-python/libvcs -- pypi: https://pypi.python.org/pypi/libvcs -- Open Hub: https://www.openhub.net/p/libvcs -- License: `MIT`_. - -.. _MIT: https://opensource.org/licenses/MIT -.. _Documentation: https://libvcs.git-pull.com/ -.. _API: https://libvcs.git-pull.com/api.html -.. _pip: http://www.pip-installer.org/en/latest/ -.. _vcspull: https://www.github.com/vcs-python/vcspull/ -.. _Repo: https://libvcs.git-pull.com/api.html#creating-a-repo-object - -.. |pypi| image:: https://img.shields.io/pypi/v/libvcs.svg - :alt: Python Package - :target: http://badge.fury.io/py/libvcs - -.. |docs| image:: https://github.com/vcs-python/libvcs/workflows/Publish%20Docs/badge.svg - :alt: Docs - :target: https://github.com/vcs-python/libvcs/actions?query=workflow%3A"Publish+Docs" - -.. |build-status| image:: https://github.com/vcs-python/libvcs/workflows/tests/badge.svg - :alt: Build Status - :target: https://github.com/vcs-python/libvcs/actions?query=workflow%3A"tests" - -.. |coverage| image:: https://codecov.io/gh/vcs-python/libvcs/branch/master/graph/badge.svg - :alt: Code Coverage - :target: https://codecov.io/gh/vcs-python/libvcs - -.. |license| image:: https://img.shields.io/github/license/vcs-python/libvcs.svg - :alt: License diff --git a/docs/index.md b/docs/index.md index 4119b933..829d3244 100644 --- a/docs/index.md +++ b/docs/index.md @@ -2,9 +2,7 @@ # libvcs - vcs abstraction layer -```{eval-rst} -.. include:: ../README.rst - :start-line: 3 +```{include} ../README.md ``` ## Table of contents diff --git a/pyproject.toml b/pyproject.toml index 04b23ecc..cdf2ba26 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,7 +26,7 @@ classifiers = [ "Topic :: System :: Shells" ] homepage = "http://github.com/vcs-python/libvcs/" -readme = "README.rst" +readme = "README.md" [tool.poetry.urls] "Bug Tracker" = "https://github.com/vcs-python/libvcs/issues"