added update, install, and some quickstart

Signed-off-by: Evan.Mattiza <emattiza@gmail.com>
This commit is contained in:
Evan.Mattiza
2017-05-29 01:03:35 -05:00
parent c0f1bd709f
commit d8cbdede28
4 changed files with 102 additions and 9 deletions
+7 -9
View File
@@ -66,20 +66,18 @@ Release v\ |version|. (:ref:`Installation <install>`)
UTC
# Range of hours in a day:
>>> maya.interval(start=maya.now(), end=maya.now().add(days=1), interval=60*60)
>>> maya.interval(
... start=maya.now(),
... end=maya.now().add(days=1),
... interval=60*60)
<generator object intervals at 0x105ba5820>
Table of Contents
-----------------
.. toctree::
:maxdepth: 2
:caption: Contents:
user/install
user/quickstart
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
+30
View File
@@ -0,0 +1,30 @@
.. _install:
Installation
=============
Pip Install Maya
----------------
To install maya, simply use::
$ pip install maya
Source Code
-----------
Maya is actively developed on `Github
<https://github.com/kennethreitz/maya.git>`_
You can either clone the public repository::
$ git clone git://github.com/kennethreitz/maya.git
Or, download the `tarball <https://github.com/kennethreitz/maya/tarball/master>`_::
$ curl -OL https://github.com/kennethreitz/maya/tarball/master
# optionally, zipball is also available (for Windows users).
Once you have a copy of the source, you can embed it in your own Python
package, or install it into your site-packages easily::
$ python setup.py install
+38
View File
@@ -0,0 +1,38 @@
.. _quickstart:
Quickstart
==========
.. module::maya
Ready for a simple datetime tool? This doc provides some tools to use in your
busy workflow.
First, make sure that Maya is:
- :ref:`Installed <install>`
- :ref:`Up to date <update>`
Parse a Date
------------
Parsing a date from a string with Maya is 🍰!
First, you'll need to import maya::
>>> import maya
There are currently two ways to make sense of datetime:
- ``maya.parse``
- ``maya.when``
A simple answer is that you should use parse on machine output, and when on human input.
Use as follows::
>>> recent_win = maya.parse('2016-11-02T20:00PM')
>>> old_win = maya.when('October 14, 1908')
>>> grandpas_date = maya.when('108 years ago')
+27
View File
@@ -0,0 +1,27 @@
.. _update:
Community Updates
=================
If you'd like to stay up to date on the community and development of Maya,
there are several options:
GitHub
------
The best way to track the development of Maya is through
`the GitHub repo <https://github.com/kennethreitz/Maya>`_.
Twitter
-------
The author, Kenneth Reitz, often tweets about new features and releases of Maya.
Follow `@kennethreitz <https://twitter.com/kennethreitz>`_ for updates.
Release and Version History
===========================
.. include:: ../../HISTORY.rst