python: move the usage example to quickstart.rst
authorJustus Winter <4winter@informatik.uni-hamburg.de>
Fri, 24 Feb 2012 00:18:54 +0000 (01:18 +0100)
committerJustus Winter <4winter@informatik.uni-hamburg.de>
Fri, 24 Feb 2012 00:18:54 +0000 (01:18 +0100)
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
bindings/python/docs/source/index.rst
bindings/python/docs/source/quickstart.rst [new file with mode: 0644]

index fc3179b46196067d4cf6104c06f1b00c4494639d..dec9697fd42f33d7d2e2b6b0cf9ebc0c00517de5 100644 (file)
@@ -15,25 +15,13 @@ Within :mod:`notmuch`, the classes :class:`Database`, :class:`Query` provide mos
 
 This page contains the main API overview of notmuch |release|.
 
 
 This page contains the main API overview of notmuch |release|.
 
-Notmuch can be imported as::
-
- import notmuch
-
-or::
-
- from notmuch import Query, Database
-
- db = Database('path',create=True)
- msgs = Query(db,'from:myself').search_messages()
-
- for msg in msgs:
-    print (msg)
 
 More information on specific topics can be found on the following pages:
 
 .. toctree::
    :maxdepth: 1
 
 
 More information on specific topics can be found on the following pages:
 
 .. toctree::
    :maxdepth: 1
 
+   quickstart
    status_and_errors
    notmuch
 
    status_and_errors
    notmuch
 
diff --git a/bindings/python/docs/source/quickstart.rst b/bindings/python/docs/source/quickstart.rst
new file mode 100644 (file)
index 0000000..609f42e
--- /dev/null
@@ -0,0 +1,19 @@
+Quickstart and examples
+=======================
+
+.. todo:: write a nice introduction
+.. todo:: improve the examples
+
+Notmuch can be imported as::
+
+    import notmuch
+
+or::
+
+    from notmuch import Query, Database
+
+    db = Database('path', create=True)
+    msgs = Query(db, 'from:myself').search_messages()
+
+    for msg in msgs:
+        print(msg)