1. Brian Mearns
  2. pytek

Commits

Brian Mearns  committed 1315797

Except I'm an idiot, and this is reST, not markdown.

Added some badges to sphinx docs and README. Corrected the release number. Oops. I hate that.

  • Participants
  • Parent commits cd74c48
  • Branches default

Comments (0)

Files changed (4)

File README.rst

View file
  • Ignore whitespace
 =================================================================
 
 .. # POST TITLE
+.. # BEGIN BADGES
+
+|readme-badges|
+
+.. |readme-badges| replace:: |license-badge| |drone.io-badge| 
+
+.. |license-badge| image:: http://img.shields.io/badge/license-GPLv3-brightgreen.svg
+    :alt: [GPLv3]
+    :target: https://www.gnu.org/licenses/gpl.html
+
+.. |drone.io-badge| image:: https://drone.io/bitbucket.org/bmearns/pytek/status.png
+    :alt: [drone.io status]
+    :target: https://drone.io/bitbucket.org/bmearns/pytek
 
 .. _pyserial: http://pyserial.sourceforge.net/
 .. _sphinx_rtd_theme: https://github.com/snide/sphinx_rtd_theme
 
+.. # END BADGES
+
+
 **PyTek** provides a python API for interacting with Tektronix oscilloscopes over a serial
 interface. It currently supports some basic commands for the TDS3000
 series of Digital Phosphor Oscilloscopes, especially *capturing waveforms*

File sphinx/source/conf.py

View file
  • Ignore whitespace
 .. _pyserial: http://pyserial.sourceforge.net/
 .. _tds3k_prog_man: http://www.tek.com/oscilloscope/tds3014b-manual/tds3000-tds3000b-tds3000c-series
 
+
+.. |version-badge| image:: http://img.shields.io/badge/version-%(VERSION_SHIELD)s-blue.svg
+    :alt: [version %(VERSION)s]
+    :target: https://bitbucket.org/bmearns/pytek/commits/tag/%(VERSION)s
+
 .. |DPO|    replace:: :abbr:`DPO (Digital Phosphor Oscilloscope)`
 .. |DPOs|   replace:: :abbr:`DPO's (Digital Phosphor Oscilloscopes)`
 .. |DSO|    replace:: :abbr:`DSO (Digital Storage Oscilloscope)`
 .. |oscopes|    replace:: oscilloscopes
 .. |PYTEK|      replace:: :doc:`PyTek <index>`
 
-"""
+""" % dict(
+    VERSION = pytek.version.tag_name(),
+    VERSION_SHIELD = pytek.version.tag_name().replace('-', '--').replace('_', '__').replace(' ', '_'),
+)
 
 # If your documentation needs a minimal Sphinx version, state it here.
 #needs_sphinx = '1.0'

File sphinx/source/index.rst

View file
  • Ignore whitespace
+
+.. include:: ../../README.rst
+    :start-after: .. # BEGIN BADGES
+    :end-before: .. # END BADGES
+
+
 =================================================================
 PyTek Documentation
 =================================================================
 Version
 ----------
 
+|version-badge|
+
 This documentation is for PyTek |release|.
 
 Project Resources

File src/pytek/version.py

View file
  • Ignore whitespace
 
 """
 
-RELEASE = 2
+RELEASE = 3
 """
 The current `Release Number`_.
 """