From 3f6ea5c5368cefa7d02d4d14ccde7ebe32e23c90 Mon Sep 17 00:00:00 2001 From: Martin Baeuml Date: Wed, 7 Sep 2011 13:04:01 +0200 Subject: [PATCH] add example section to the documentation for tips & tricks --- doc/examples.rst | 14 ++++++++++++++ doc/index.rst | 1 + 2 files changed, 15 insertions(+) create mode 100644 doc/examples.rst diff --git a/doc/examples.rst b/doc/examples.rst new file mode 100644 index 0000000..395fcaa --- /dev/null +++ b/doc/examples.rst @@ -0,0 +1,14 @@ +.. highlight:: python + +======== +Examples +======== + +Adding every nth image to label file +------------------------------------ + +This can be achieved by a combination of ``find`` and ``awk``:: + + find shot01/ -iname "*.png" | sort | awk 'NR%5==1' | xargs sloth appendfiles shot1.json + + diff --git a/doc/index.rst b/doc/index.rst index 4471c17..cb9f6cf 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -40,6 +40,7 @@ Contents items inserters containers + examples api/index