Skip to content

Commit

Permalink
Fix code documentation draft
Browse files Browse the repository at this point in the history
There is now same theme and layout than with Snippy. The
scale of the documentation is more compact but it tries
to follow same principles as with Snippy to get similar
look and feel.

Signed-off-by: Heikki Laaksonen <laaksonen.heikki.j@gmail.com>
  • Loading branch information
heilaaks committed Jun 9, 2019
1 parent b42ee90 commit e59cc6e
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 19 deletions.
9 changes: 9 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.napoleon',
]

# Add any paths that contain templates here, relative to this directory.
Expand All @@ -53,3 +55,10 @@
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']

# -- Options for HTML output -------------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'sphinx_rtd_theme'
25 changes: 21 additions & 4 deletions docs/source/development.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Installation

To install, run:

.. code:: text
.. code:: bash
pip install snippy-tldr --user
Expand Down Expand Up @@ -38,16 +38,33 @@ make test target.
Documentation
~~~~~~~~~~~~~

TODO
The documentation includes manual and automated documentation. Automated
documentation is extracted from source code docstrings.

.. code:: bash
# Create documents.
make docs
# Open the document in a web brower.
file:///<home>/devel/snippy-tldr/docs/build/html/development.html
Relasing
--------

.. code-block:: text
.. code-block:: bash
# Test PyPI installation before official release into PyPI.
> https://testpypi.python.org/pypi
make clean-all
python setup.py sdist bdist_wheel
twine check dist/*
twine upload --repository-url https://test.pypi.org/legacy/ dist/*
# Create a tag where the version follows semating versioning 2.0.0.
git tag -a 0.1.0 -m "Add new release 0.1.0"
git push -u origin 0.1.0
# Releast into PyPi.
make clean-all
python setup.py sdist bdist_wheel
twine upload dist/*
21 changes: 6 additions & 15 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
@@ -1,20 +1,11 @@
.. snippy-tldr documentation master file, created by
sphinx-quickstart on Sat Jun 8 22:36:09 2019.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to snippy-tldr's documentation!
=======================================
Snippy-tldr documentation
=========================

.. toctree::
:glob:
:maxdepth: 2
:caption: Contents:



Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
introduction
installation
development
11 changes: 11 additions & 0 deletions docs/source/installation.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Installation
============

To install, run:

.. code:: text
pip install snippy-tldr --user
# Export user local Python package bin to PATH if needed.
export PATH=${PATH}:~/.local/bin
7 changes: 7 additions & 0 deletions docs/source/introduction.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Introduction
============

Snippy-tldr is plugin to import tldr man pages into snippy_ tool. This is a
plugin that itself does not have any functionality without the snippy tool.

.. _snippy: https://github.com/heilaaks/snippy

0 comments on commit e59cc6e

Please sign in to comment.