diff --git a/.travis.yml b/.travis.yml index ab02e22..b32235b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,6 +7,7 @@ env: - TOXENV=py26,coveralls - TOXENV=py27,coveralls - TOXENV=pypy,coveralls + - TOXENV=docs before_install: - python --version - virtualenv --version diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst new file mode 100644 index 0000000..cee82e8 --- /dev/null +++ b/CONTRIBUTING.rst @@ -0,0 +1,45 @@ +============ +Contributing +============ + +Report a Bug or Make a Feature Request +-------------------------------------- +Please go to the GitHub Issues page: https://github.com/kbandla/dpkt/issues. + +Checkout the Code +---------------- + +:: + + git clone https://github.com/kblandla/dpkt.git + + +Become a Developer +------------------ +dpkt uses the 'GitHub Flow' model: `GitHub Flow `_ + +- To work on something new, create a descriptively named branch off of master (ie: my-awesome) +- Commit to that branch locally and regularly push your work to the same named branch on the server +- When you need feedback or help, or you think the branch is ready for merging, open a pull request +- After someone else has reviewed and signed off on the feature, you can merge it into master + +Getting Started +~~~~~~~~~~~~~~~ + - Fork the repo on GitHub + - git clone git@github.com:your_name_here/dpkt.git + +New Feature or Bug +~~~~~~~~~~~~~~~~~~ + + :: + + $ git checkout -b my-awesome + $ git push -u origin my-awesome + $ ; git push + $ ; git push + $ tox (this will run all the tests) + + - Go to github and hit 'New pull request' + - Someone reviews it and says 'AOK' + - Merge the pull request (green button) + diff --git a/MANIFEST.in b/MANIFEST.in index e96d54c..2d5c155 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,2 +1,7 @@ include AUTHORS CHANGES README.rst LICENSE + +recursive-include docs * +prune docs/_build + +global-exclude __pycache__/* diff --git a/docs/Makefile b/docs/Makefile new file mode 100644 index 0000000..2687c75 --- /dev/null +++ b/docs/Makefile @@ -0,0 +1,153 @@ +# Makefile for Sphinx documentation +# + +# You can set these variables from the command line. +SPHINXOPTS = +SPHINXBUILD = sphinx-build +PAPER = +BUILDDIR = _build + +# Internal variables. +PAPEROPT_a4 = -D latex_paper_size=a4 +PAPEROPT_letter = -D latex_paper_size=letter +ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . +# the i18n builder cannot share the environment and doctrees with the others +I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . + +.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext + +help: + @echo "Please use \`make ' where is one of" + @echo " html to make standalone HTML files" + @echo " dirhtml to make HTML files named index.html in directories" + @echo " singlehtml to make a single large HTML file" + @echo " pickle to make pickle files" + @echo " json to make JSON files" + @echo " htmlhelp to make HTML files and a HTML help project" + @echo " qthelp to make HTML files and a qthelp project" + @echo " devhelp to make HTML files and a Devhelp project" + @echo " epub to make an epub" + @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" + @echo " latexpdf to make LaTeX files and run them through pdflatex" + @echo " text to make text files" + @echo " man to make manual pages" + @echo " texinfo to make Texinfo files" + @echo " info to make Texinfo files and run them through makeinfo" + @echo " gettext to make PO message catalogs" + @echo " changes to make an overview of all changed/added/deprecated items" + @echo " linkcheck to check all external links for integrity" + @echo " doctest to run all doctests embedded in the documentation (if enabled)" + +clean: + -rm -rf $(BUILDDIR)/* + +html: + $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." + +dirhtml: + $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." + +singlehtml: + $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml + @echo + @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." + +pickle: + $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle + @echo + @echo "Build finished; now you can process the pickle files." + +json: + $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json + @echo + @echo "Build finished; now you can process the JSON files." + +htmlhelp: + $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp + @echo + @echo "Build finished; now you can run HTML Help Workshop with the" \ + ".hhp project file in $(BUILDDIR)/htmlhelp." + +qthelp: + $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp + @echo + @echo "Build finished; now you can run "qcollectiongenerator" with the" \ + ".qhcp project file in $(BUILDDIR)/qthelp, like this:" + @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/pyspotify.qhcp" + @echo "To view the help file:" + @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/pyspotify.qhc" + +devhelp: + $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp + @echo + @echo "Build finished." + @echo "To view the help file:" + @echo "# mkdir -p $$HOME/.local/share/devhelp/pyspotify" + @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/pyspotify" + @echo "# devhelp" + +epub: + $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub + @echo + @echo "Build finished. The epub file is in $(BUILDDIR)/epub." + +latex: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo + @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." + @echo "Run \`make' in that directory to run these through (pdf)latex" \ + "(use \`make latexpdf' here to do that automatically)." + +latexpdf: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo "Running LaTeX files through pdflatex..." + $(MAKE) -C $(BUILDDIR)/latex all-pdf + @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." + +text: + $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text + @echo + @echo "Build finished. The text files are in $(BUILDDIR)/text." + +man: + $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man + @echo + @echo "Build finished. The manual pages are in $(BUILDDIR)/man." + +texinfo: + $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo + @echo + @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." + @echo "Run \`make' in that directory to run these through makeinfo" \ + "(use \`make info' here to do that automatically)." + +info: + $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo + @echo "Running Texinfo files through makeinfo..." + make -C $(BUILDDIR)/texinfo info + @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." + +gettext: + $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale + @echo + @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." + +changes: + $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes + @echo + @echo "The overview file is in $(BUILDDIR)/changes." + +linkcheck: + $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck + @echo + @echo "Link check complete; look for any errors in the above output " \ + "or in $(BUILDDIR)/linkcheck/output.txt." + +doctest: + $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest + @echo "Testing of doctests in the sources finished, look at the " \ + "results in $(BUILDDIR)/doctest/output.txt." diff --git a/docs/api/api_auto.rst b/docs/api/api_auto.rst new file mode 100644 index 0000000..3837c90 --- /dev/null +++ b/docs/api/api_auto.rst @@ -0,0 +1,545 @@ + +dpkt.ah module +-------------- + +.. automodule:: dpkt.ah + :members: + :undoc-members: + :show-inheritance: + +dpkt.aim module +--------------- + +.. automodule:: dpkt.aim + :members: + :undoc-members: + :show-inheritance: + +dpkt.aoe module +--------------- + +.. automodule:: dpkt.aoe + :members: + :undoc-members: + :show-inheritance: + +dpkt.aoeata module +------------------ + +.. automodule:: dpkt.aoeata + :members: + :undoc-members: + :show-inheritance: + +dpkt.aoecfg module +------------------ + +.. automodule:: dpkt.aoecfg + :members: + :undoc-members: + :show-inheritance: + +dpkt.arp module +--------------- + +.. automodule:: dpkt.arp + :members: + :undoc-members: + :show-inheritance: + +dpkt.asn1 module +---------------- + +.. automodule:: dpkt.asn1 + :members: + :undoc-members: + :show-inheritance: + +dpkt.bgp module +--------------- + +.. automodule:: dpkt.bgp + :members: + :undoc-members: + :show-inheritance: + +dpkt.cdp module +--------------- + +.. automodule:: dpkt.cdp + :members: + :undoc-members: + :show-inheritance: + +dpkt.crc32c module +------------------ + +.. automodule:: dpkt.crc32c + :members: + :undoc-members: + :show-inheritance: + +dpkt.decorators module +---------------------- + +.. automodule:: dpkt.decorators + :members: + :undoc-members: + :show-inheritance: + +dpkt.dhcp module +---------------- + +.. automodule:: dpkt.dhcp + :members: + :undoc-members: + :show-inheritance: + +dpkt.diameter module +-------------------- + +.. automodule:: dpkt.diameter + :members: + :undoc-members: + :show-inheritance: + +dpkt.dns module +--------------- + +.. automodule:: dpkt.dns + :members: + :undoc-members: + :show-inheritance: + +dpkt.dpkt module +---------------- + +.. automodule:: dpkt.dpkt + :members: + :undoc-members: + :show-inheritance: + +dpkt.dtp module +--------------- + +.. automodule:: dpkt.dtp + :members: + :undoc-members: + :show-inheritance: + +dpkt.esp module +--------------- + +.. automodule:: dpkt.esp + :members: + :undoc-members: + :show-inheritance: + +dpkt.ethernet module +-------------------- + +.. automodule:: dpkt.ethernet + :members: + :undoc-members: + :show-inheritance: + +dpkt.gre module +--------------- + +.. automodule:: dpkt.gre + :members: + :undoc-members: + :show-inheritance: + +dpkt.gzip module +---------------- + +.. automodule:: dpkt.gzip + :members: + :undoc-members: + :show-inheritance: + +dpkt.h225 module +---------------- + +.. automodule:: dpkt.h225 + :members: + :undoc-members: + :show-inheritance: + +dpkt.hsrp module +---------------- + +.. automodule:: dpkt.hsrp + :members: + :undoc-members: + :show-inheritance: + +dpkt.http module +---------------- + +.. automodule:: dpkt.http + :members: + :undoc-members: + :show-inheritance: + +dpkt.icmp module +---------------- + +.. automodule:: dpkt.icmp + :members: + :undoc-members: + :show-inheritance: + +dpkt.icmp6 module +----------------- + +.. automodule:: dpkt.icmp6 + :members: + :undoc-members: + :show-inheritance: + +dpkt.ieee80211 module +--------------------- + +.. automodule:: dpkt.ieee80211 + :members: + :undoc-members: + :show-inheritance: + +dpkt.igmp module +---------------- + +.. automodule:: dpkt.igmp + :members: + :undoc-members: + :show-inheritance: + +dpkt.ip module +-------------- + +.. automodule:: dpkt.ip + :members: + :undoc-members: + :show-inheritance: + +dpkt.ip6 module +--------------- + +.. automodule:: dpkt.ip6 + :members: + :undoc-members: + :show-inheritance: + +dpkt.ipx module +--------------- + +.. automodule:: dpkt.ipx + :members: + :undoc-members: + :show-inheritance: + +dpkt.llc module +--------------- + +.. automodule:: dpkt.llc + :members: + :undoc-members: + :show-inheritance: + +dpkt.loopback module +-------------------- + +.. automodule:: dpkt.loopback + :members: + :undoc-members: + :show-inheritance: + +dpkt.mrt module +--------------- + +.. automodule:: dpkt.mrt + :members: + :undoc-members: + :show-inheritance: + +dpkt.netbios module +------------------- + +.. automodule:: dpkt.netbios + :members: + :undoc-members: + :show-inheritance: + +dpkt.netflow module +------------------- + +.. automodule:: dpkt.netflow + :members: + :undoc-members: + :show-inheritance: + +dpkt.ntp module +--------------- + +.. automodule:: dpkt.ntp + :members: + :undoc-members: + :show-inheritance: + +dpkt.ospf module +---------------- + +.. automodule:: dpkt.ospf + :members: + :undoc-members: + :show-inheritance: + +dpkt.pcap module +---------------- + +.. automodule:: dpkt.pcap + :members: + :undoc-members: + :show-inheritance: + +dpkt.pim module +--------------- + +.. automodule:: dpkt.pim + :members: + :undoc-members: + :show-inheritance: + +dpkt.pmap module +---------------- + +.. automodule:: dpkt.pmap + :members: + :undoc-members: + :show-inheritance: + +dpkt.ppp module +--------------- + +.. automodule:: dpkt.ppp + :members: + :undoc-members: + :show-inheritance: + +dpkt.pppoe module +----------------- + +.. automodule:: dpkt.pppoe + :members: + :undoc-members: + :show-inheritance: + +dpkt.qq module +-------------- + +.. automodule:: dpkt.qq + :members: + :undoc-members: + :show-inheritance: + +dpkt.radiotap module +-------------------- + +.. automodule:: dpkt.radiotap + :members: + :undoc-members: + :show-inheritance: + +dpkt.radius module +------------------ + +.. automodule:: dpkt.radius + :members: + :undoc-members: + :show-inheritance: + +dpkt.rfb module +--------------- + +.. automodule:: dpkt.rfb + :members: + :undoc-members: + :show-inheritance: + +dpkt.rip module +--------------- + +.. automodule:: dpkt.rip + :members: + :undoc-members: + :show-inheritance: + +dpkt.rpc module +--------------- + +.. automodule:: dpkt.rpc + :members: + :undoc-members: + :show-inheritance: + +dpkt.rtp module +--------------- + +.. automodule:: dpkt.rtp + :members: + :undoc-members: + :show-inheritance: + +dpkt.rx module +-------------- + +.. automodule:: dpkt.rx + :members: + :undoc-members: + :show-inheritance: + +dpkt.sccp module +---------------- + +.. automodule:: dpkt.sccp + :members: + :undoc-members: + :show-inheritance: + +dpkt.sctp module +---------------- + +.. automodule:: dpkt.sctp + :members: + :undoc-members: + :show-inheritance: + +dpkt.sip module +--------------- + +.. automodule:: dpkt.sip + :members: + :undoc-members: + :show-inheritance: + +dpkt.sll module +--------------- + +.. automodule:: dpkt.sll + :members: + :undoc-members: + :show-inheritance: + +dpkt.smb module +--------------- + +.. automodule:: dpkt.smb + :members: + :undoc-members: + :show-inheritance: + +dpkt.snoop module +----------------- + +.. automodule:: dpkt.snoop + :members: + :undoc-members: + :show-inheritance: + +dpkt.ssl module +--------------- + +.. automodule:: dpkt.ssl + :members: + :undoc-members: + :show-inheritance: + +dpkt.ssl_ciphersuites module +---------------------------- + +.. automodule:: dpkt.ssl_ciphersuites + :members: + :undoc-members: + :show-inheritance: + +dpkt.stp module +--------------- + +.. automodule:: dpkt.stp + :members: + :undoc-members: + :show-inheritance: + +dpkt.stun module +---------------- + +.. automodule:: dpkt.stun + :members: + :undoc-members: + :show-inheritance: + +dpkt.tcp module +--------------- + +.. automodule:: dpkt.tcp + :members: + :undoc-members: + :show-inheritance: + +dpkt.telnet module +------------------ + +.. automodule:: dpkt.telnet + :members: + :undoc-members: + :show-inheritance: + +dpkt.tftp module +---------------- + +.. automodule:: dpkt.tftp + :members: + :undoc-members: + :show-inheritance: + +dpkt.tns module +--------------- + +.. automodule:: dpkt.tns + :members: + :undoc-members: + :show-inheritance: + +dpkt.tpkt module +---------------- + +.. automodule:: dpkt.tpkt + :members: + :undoc-members: + :show-inheritance: + +dpkt.udp module +--------------- + +.. automodule:: dpkt.udp + :members: + :undoc-members: + :show-inheritance: + +dpkt.vrrp module +---------------- + +.. automodule:: dpkt.vrrp + :members: + :undoc-members: + :show-inheritance: + +dpkt.yahoo module +----------------- + +.. automodule:: dpkt.yahoo + :members: + :undoc-members: + :show-inheritance: + diff --git a/docs/api/index.rst b/docs/api/index.rst new file mode 100644 index 0000000..7d44785 --- /dev/null +++ b/docs/api/index.rst @@ -0,0 +1,11 @@ + +API Reference +============= +The dpkt API reference section is currently a work in progress, please have patience as we fill in and improve the documentation. + +**dpkt Modules** + +.. toctree:: + :maxdepth: 4 + + api_auto diff --git a/docs/authors.rst b/docs/authors.rst new file mode 100644 index 0000000..238aa6b --- /dev/null +++ b/docs/authors.rst @@ -0,0 +1,7 @@ +******* +Authors +******* + +.. include:: ../AUTHORS + +If you want to contribute to dpkt, see :doc:`contributing`. diff --git a/docs/badges.rst b/docs/badges.rst new file mode 100644 index 0000000..0c71fdd --- /dev/null +++ b/docs/badges.rst @@ -0,0 +1,41 @@ + + +| |docs| |travis| |coveralls| |landscape| |version| +| |downloads| |wheel| |supported-versions| |supported-implementations| + +.. |docs| image:: https://readthedocs.org/projects/dpkt/badge/?style=flat + :target: https://readthedocs.org/projects/dpkt + :alt: Documentation Status + +.. |travis| image:: http://img.shields.io/travis/kbandla/dpkt/master.png?style=flat + :alt: Travis-CI Build Status + :target: https://travis-ci.org/kbandla/dpkt + +.. |coveralls| image:: http://img.shields.io/coveralls/kbandla/dpkt/master.png?style=flat + :alt: Coverage Status + :target: https://coveralls.io/r/kbandla/dpkt + +.. |landscape| image:: https://landscape.io/github/kbandla/dpkt/master/landscape.svg?style=flat + :target: https://landscape.io/github/kbandla/dpkt/master + :alt: Code Quality Status + +.. |version| image:: http://img.shields.io/pypi/v/dpkt.png?style=flat + :alt: PyPI Package latest release + :target: https://pypi.python.org/pypi/dpkt + +.. |downloads| image:: http://img.shields.io/pypi/dm/dpkt.png?style=flat + :alt: PyPI Package monthly downloads + :target: https://pypi.python.org/pypi/dpkt + +.. |wheel| image:: https://pypip.in/wheel/dpkt/badge.png?style=flat + :alt: PyPI Wheel + :target: https://pypi.python.org/pypi/dpkt + +.. |supported-versions| image:: https://pypip.in/py_versions/dpkt/badge.png?style=flat + :alt: Supported versions + :target: https://pypi.python.org/pypi/dpkt + +.. |supported-implementations| image:: https://pypip.in/implementation/dpkt/badge.png?style=flat + :alt: Supported implementations + :target: https://pypi.python.org/pypi/dpkt + diff --git a/docs/changelog.rst b/docs/changelog.rst new file mode 100644 index 0000000..ac7e237 --- /dev/null +++ b/docs/changelog.rst @@ -0,0 +1,4 @@ +********* +Changelog +********* + diff --git a/docs/conf.py b/docs/conf.py new file mode 100644 index 0000000..19e04ed --- /dev/null +++ b/docs/conf.py @@ -0,0 +1,75 @@ +# encoding: utf-8 + +"""dpkt documentation build configuration file""" + +from __future__ import unicode_literals + +import os +import re +import sys +import types +import mock + + +def get_version(filename): + init_py = open(filename).read() + metadata = dict(re.findall("__([a-z]+)__ = '([^']+)'", init_py)) + return metadata['version'] + + +# -- Workarounds to have autodoc generate API docs ---------------------------- + +sys.path.insert(0, os.path.abspath('..')) + + +# Mock any objects that we might need to +foo = mock.Mock() +foo.__version__ = '0.1.1' +sys.modules['foo'] = foo + + +# -- General configuration ---------------------------------------------------- +needs_sphinx = '1.0' +extensions = [ + 'sphinx.ext.autodoc', + 'sphinx.ext.extlinks', + 'sphinx.ext.intersphinx', + 'sphinx.ext.viewcode', + 'sphinxcontrib.napoleon' +] + +templates_path = ['_templates'] +source_suffix = '.rst' +master_doc = 'index' + +project = 'dpkt' +copyright = '2009-2015 Dug Song and contributors' + +release = get_version('../dpkt/__init__.py') +version = '.'.join(release.split('.')[:2]) + +exclude_patterns = ['_build'] + +pygments_style = 'sphinx' + +modindex_common_prefix = ['dpkt.'] + +autodoc_default_flags = ['members', 'undoc-members', 'inherited-members'] +autodoc_member_order = 'bysource' + + +# -- Options for HTML output -------------------------------------------------- +html_theme = 'default' +html_static_path = ['_static'] + +html_use_modindex = True +html_use_index = True +html_split_index = False +html_show_sourcelink = True + +htmlhelp_basename = 'dpkt' + +# -- Options for extlink extension -------------------------------------------- +extlinks = { + 'issue': ('https://github.com/kbandla/dpkt/issues/%s', '#'), +} diff --git a/docs/contributing.rst b/docs/contributing.rst new file mode 100644 index 0000000..3bdd7dc --- /dev/null +++ b/docs/contributing.rst @@ -0,0 +1 @@ +.. include:: ../CONTRIBUTING.rst \ No newline at end of file diff --git a/docs/examples.rst b/docs/examples.rst new file mode 100644 index 0000000..311ef34 --- /dev/null +++ b/docs/examples.rst @@ -0,0 +1,23 @@ + +Examples +======== +Current DPKG Examples +--------------------- +[@jonoberheide's](https://twitter.com/jonoberheide) old examples still +apply: + +- `dpkt Tutorial #1: ICMP + Echo `__ +- `dpkt Tutorial #2: Parsing a PCAP + File `__ +- `dpkt Tutorial #3: dns + spoofing `__ +- `dpkt Tutorial #4: AS Paths from + MRT/BGP `__ + +Jeff Silverman Docs/Code +------------------------ +`Jeff Silverman `__ has some +`code `__ and +`documentation `__. + diff --git a/docs/index.rst b/docs/index.rst new file mode 100644 index 0000000..9d28965 --- /dev/null +++ b/docs/index.rst @@ -0,0 +1,33 @@ +dpkt +==== +.. include:: badges.rst +dpkt is a python module for fast, simple packet creation / parsing, with definitions for the basic TCP/IP protocols + + +Getting Started +=============== +.. toctree:: + :maxdepth: 2 + + installation + quickstart + examples + +API Reference +============= +.. toctree:: + :maxdepth: 1 + + api/index + +About dpkt +========== +.. toctree:: + :maxdepth: 2 + + authors + changelog + plans + contributing + license + diff --git a/docs/installation.rst b/docs/installation.rst new file mode 100644 index 0000000..5b85a5e --- /dev/null +++ b/docs/installation.rst @@ -0,0 +1,5 @@ +============ +Installation +============ +How to install dpkt + diff --git a/docs/license.rst b/docs/license.rst new file mode 100644 index 0000000..56c7238 --- /dev/null +++ b/docs/license.rst @@ -0,0 +1,4 @@ + +License +======= +BSD 3-Clause License, as the upstream project diff --git a/docs/plans.rst b/docs/plans.rst new file mode 100644 index 0000000..a6b1ca3 --- /dev/null +++ b/docs/plans.rst @@ -0,0 +1,13 @@ +***************** +Development plans +***************** + +Current plans +============= + +- Be Awesome + +Future plans +============ + +- Maintain the Awesome diff --git a/docs/quickstart.rst b/docs/quickstart.rst new file mode 100644 index 0000000..2213a72 --- /dev/null +++ b/docs/quickstart.rst @@ -0,0 +1,20 @@ +========== +Quickstart +========== + +Grab some packets +----------------- +Lets first grab some packets:: + + import dpkt + blah + foo + + +Looking at Protocols +-------------------- +Next lets look at some protocols:: + + import dpkt + blah + foo diff --git a/docs/requirements.txt b/docs/requirements.txt new file mode 100644 index 0000000..0e91234 --- /dev/null +++ b/docs/requirements.txt @@ -0,0 +1,3 @@ +mock >= 1.0 +Sphinx >= 1.0 +sphinxcontrib-napoleon diff --git a/tox.ini b/tox.ini index 3df3ad4..ab0338b 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py26, py27 +envlist = py26, py27, docs [testenv] install_command = @@ -29,10 +29,7 @@ commands = coveralls [testenv:docs] -changedir=docs/ -deps = - sphinx -commands = - sphinx-build -b linkcheck ./ _build/ - sphinx-build -b html ./ _build/ +changedir=docs +deps = -rdocs/requirements.txt +commands = sphinx-build -b html -d {envtmpdir}/doctrees . {envtmpdir}/html