source: stamper/docs/_build/html/using.html@ 61:8fe64b5932b9

0.1
Last change on this file since 61:8fe64b5932b9 was 48:e1a22d078bbb, checked in by Borja Lopez <borja@…>, 10 years ago

Do not use argparse sphinx integration in the docs.

File size: 16.6 KB
RevLine 
[42]1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
4
5<html xmlns="http://www.w3.org/1999/xhtml">
6 <head>
7 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
8
9 <title>How to use it &mdash; Stamper 0.1 documentation</title>
10
11 <link rel="stylesheet" href="_static/default.css" type="text/css" />
12 <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
13
14 <script type="text/javascript">
15 var DOCUMENTATION_OPTIONS = {
16 URL_ROOT: './',
17 VERSION: '0.1',
18 COLLAPSE_INDEX: false,
19 FILE_SUFFIX: '.html',
20 HAS_SOURCE: true
21 };
22 </script>
23 <script type="text/javascript" src="_static/jquery.js"></script>
24 <script type="text/javascript" src="_static/underscore.js"></script>
25 <script type="text/javascript" src="_static/doctools.js"></script>
26 <link rel="author" title="About these documents" href="about.html" />
27 <link rel="top" title="Stamper 0.1 documentation" href="index.html" />
28 <link rel="prev" title="Installation instructions" href="install.html" />
29 </head>
30 <body>
31 <div class="related">
32 <h3>Navigation</h3>
33 <ul>
34 <li class="right" style="margin-right: 10px">
35 <a href="genindex.html" title="General Index"
36 accesskey="I">index</a></li>
37 <li class="right" >
38 <a href="install.html" title="Installation instructions"
39 accesskey="P">previous</a> |</li>
40 <li><a href="index.html">Stamper 0.1 documentation</a> &raquo;</li>
41 </ul>
42 </div>
43
44 <div class="document">
45 <div class="documentwrapper">
46 <div class="bodywrapper">
47 <div class="body">
48
49 <div class="section" id="how-to-use-it">
50<h1><a class="toc-backref" href="#id4">How to use it</a><a class="headerlink" href="#how-to-use-it" title="Permalink to this headline"></a></h1>
51<div class="contents topic" id="contents">
52<p class="topic-title first">Contents</p>
53<ul class="simple">
54<li><a class="reference internal" href="#how-to-use-it" id="id4">How to use it</a><ul>
55<li><a class="reference internal" href="#recording-time" id="id5">Recording time</a><ul>
56<li><a class="reference internal" href="#recording-consecutive-stamps" id="id6">Recording consecutive stamps</a></li>
57</ul>
58</li>
59<li><a class="reference internal" href="#retrieving-information-from-the-existing-stamps" id="id7">Retrieving information from the existing stamps</a><ul>
60<li><a class="reference internal" href="#total-times" id="id8">Total times</a></li>
61<li><a class="reference internal" href="#per-day-details" id="id9">Per day details</a></li>
62<li><a class="reference internal" href="#timeline" id="id10">Timeline</a></li>
[44]63<li><a class="reference internal" href="#charts" id="id11">Charts</a></li>
[42]64</ul>
65</li>
[44]66<li><a class="reference internal" href="#stamps-full-list-of-arguments" id="id12">stamps - full List of arguments</a></li>
67<li><a class="reference internal" href="#date-based-filtering" id="id13">Date-based filtering</a></li>
[42]68</ul>
69</li>
70</ul>
71</div>
72<div class="section" id="recording-time">
73<h2><a class="toc-backref" href="#id5">Recording time</a><a class="headerlink" href="#recording-time" title="Permalink to this headline"></a></h2>
74<p>To start recording time:</p>
75<div class="highlight-python"><div class="highlight"><pre><span class="n">stamp</span>
76</pre></div>
77</div>
78<p>To stop recording time:</p>
79<div class="highlight-python"><div class="highlight"><pre>stamp ID DESCRIPTION
80</pre></div>
81</div>
82<p>where:</p>
83<ul class="simple">
84<li><strong>ID</strong> is a string <strong>without spaces</strong> identifying a customer, project,
85group of tasks or any other thing you want to use to group your stamps</li>
86<li><strong>DESCRIPTION</strong> is a description of what you did</li>
87</ul>
88<p>for example:</p>
89<div class="highlight-python"><div class="highlight"><pre>stamp stamper writing documentation
90</pre></div>
91</div>
92<p>or:</p>
93<div class="highlight-python"><div class="highlight"><pre>stamp stamper implementing per-month line charts
94</pre></div>
95</div>
96<div class="section" id="recording-consecutive-stamps">
97<h3><a class="toc-backref" href="#id6">Recording consecutive stamps</a><a class="headerlink" href="#recording-consecutive-stamps" title="Permalink to this headline"></a></h3>
98<p>Imagine you start working on a project, you <em>stamp</em> your start:</p>
99<div class="highlight-python"><div class="highlight"><pre><span class="n">stamp</span>
100</pre></div>
101</div>
102<p>and then you finish a given task, so you <em>stamp</em> it:</p>
103<div class="highlight-python"><div class="highlight"><pre>stamp stamper writing installation instructions
104</pre></div>
105</div>
106<p>but then, you keep yourself working on the same project, but on some other
107task. You don&#8217;t have to <em>stamp</em> the start time again, you simply <em>stamp</em> again
108when you finish the work on that other task:</p>
109<div class="highlight-python"><div class="highlight"><pre>stamp stamper writing usage instructions
110</pre></div>
111</div>
112<div class="admonition note">
113<p class="first admonition-title">Note</p>
114<p class="last">This apply also for changing to another project, you don&#8217;t have to <em>stamp</em>
115the start time again, just keep stamping the end times. In such a situation,
116Stamper will take the end time of a recorded stamp as the start time of the
117next one.</p>
118</div>
119</div>
120</div>
121<div class="section" id="retrieving-information-from-the-existing-stamps">
122<h2><a class="toc-backref" href="#id7">Retrieving information from the existing stamps</a><a class="headerlink" href="#retrieving-information-from-the-existing-stamps" title="Permalink to this headline"></a></h2>
123<div class="section" id="total-times">
124<h3><a class="toc-backref" href="#id8">Total times</a><a class="headerlink" href="#total-times" title="Permalink to this headline"></a></h3>
125<ul>
126<li><p class="first">Get a list of total times stamped per <strong>ID</strong>:</p>
127<div class="highlight-python"><div class="highlight"><pre><span class="n">stamps</span>
128</pre></div>
129</div>
130</li>
131<li><p class="first">Get the total times stamped for a given <strong>ID</strong>, for example, <strong>stamper</strong>:</p>
132<div class="highlight-python"><div class="highlight"><pre>stamps stamper
133</pre></div>
134</div>
135</li>
136<li><p class="first">Get the total times stamped for the <strong>ID</strong> <strong>stamper</strong> during the last
137week:</p>
138<div class="highlight-python"><div class="highlight"><pre>stamps stamper 1w
139</pre></div>
140</div>
141<div class="admonition seealso">
142<p class="first admonition-title">See also</p>
143<p class="last"><em>1w</em> is a date-based filter. You can learn more about those filters
144in the <a class="reference internal" href="#date-based-filtering"><em>Date-based filtering</em></a> documentation below.</p>
145</div>
146</li>
147</ul>
148</div>
149<div class="section" id="per-day-details">
150<h3><a class="toc-backref" href="#id9">Per day details</a><a class="headerlink" href="#per-day-details" title="Permalink to this headline"></a></h3>
151<ul>
152<li><p class="first">Get a list of detailed per-day times:</p>
153<div class="highlight-python"><div class="highlight"><pre><span class="n">stamps</span> <span class="o">-</span><span class="n">v</span>
154</pre></div>
155</div>
156</li>
157<li><p class="first">Get details for a given <strong>ID</strong>, for example, <strong>stamper</strong>:</p>
158<div class="highlight-python"><div class="highlight"><pre>stamps -v stamper
159</pre></div>
160</div>
161</li>
162<li><p class="first">Get details for a given month, for example, <em>august 2014</em>:</p>
163<div class="highlight-python"><div class="highlight"><pre>stamps -v 2014-08-01--2014-09-01
164</pre></div>
165</div>
166<div class="admonition seealso">
167<p class="first admonition-title">See also</p>
168<p class="last"><em>2014-08-01&#8211;2014-09-01</em> is a date-based filter. You can learn more about
169those filters in the <a class="reference internal" href="#date-based-filtering"><em>Date-based filtering</em></a> documentation below.</p>
170</div>
171</li>
172</ul>
173</div>
174<div class="section" id="timeline">
175<h3><a class="toc-backref" href="#id10">Timeline</a><a class="headerlink" href="#timeline" title="Permalink to this headline"></a></h3>
176<p>You can get a <em>timeline</em> of all the stamped stamps:</p>
177<div class="highlight-python"><div class="highlight"><pre><span class="n">stamps</span> <span class="o">-</span><span class="n">t</span>
178</pre></div>
179</div>
180<p>This <em>timeline</em> will show each stamp in a line, in a similar way to what bebu&#8217;s
181stamp <a class="footnote-reference" href="#id3" id="id1">[1]</a> stores in its text-based file:</p>
182<div class="highlight-python"><div class="highlight"><pre>2014-08-12 12:33 start
1832014-08-12 12:51 stamper writing installation instructions
1842014-08-12 13:11 stamper writing usage documentation
1852014-08-13 09:33 start
1862014-08-13 12:12 stamper adding missing tests for the cli tools
187</pre></div>
188</div>
189<p>You can filter the timeline by <strong>ID</strong>:</p>
190<div class="highlight-python"><div class="highlight"><pre>stamps -t stamper
191</pre></div>
192</div>
193<p>And/or by date:</p>
194<div class="highlight-python"><div class="highlight"><pre>stamps -t 2m
195
196.. seealso::
197
198 *2m* is a date-based filter. You can learn more about those filters
199 in the :ref:`date_based_filtering` documentation below.
200</pre></div>
201</div>
202</div>
[44]203<div class="section" id="charts">
204<h3><a class="toc-backref" href="#id11">Charts</a><a class="headerlink" href="#charts" title="Permalink to this headline"></a></h3>
205<p>You can generate some nice charts from your stamps. So far only bar charts
206showing the total time per day can be generated, but you can filter them by
207<strong>ID</strong> and/or date. Some examples:</p>
208<ul>
209<li><p class="first">Render a chart of all the times already stamped, by <strong>ID</strong>:</p>
210<div class="highlight-python"><div class="highlight"><pre><span class="n">stamps</span> <span class="o">-</span><span class="n">g</span>
211</pre></div>
212</div>
213</li>
214<li><p class="first">Render a chart of the stamps for the last 4 days:</p>
215<div class="highlight-python"><div class="highlight"><pre>stamps -g 4d
216</pre></div>
217</div>
218</li>
219<li><p class="first">Render a chart of the stamps for the <strong>ID</strong> <em>stamper</em> for the last week:</p>
220<div class="highlight-python"><div class="highlight"><pre>stamps -g stamper 1w
221</pre></div>
222</div>
223</li>
224</ul>
225<div class="admonition note">
226<p class="first admonition-title">Note</p>
227<p class="last">The charts will be saved into <strong>~/.workstamps-charts</strong>, in <a class="reference external" href="http://en.wikipedia.org/wiki/Scalable_Vector_Graphics">SVG</a> format.
228The name of the chart will be generated based on the current date and
229time, and a <em>symbolic link</em> called <strong>chart-latest.svg</strong> will be created,
230pointing to the latest chart generated.</p>
231</div>
232</div>
233</div>
234<div class="section" id="stamps-full-list-of-arguments">
235<h2><a class="toc-backref" href="#id12">stamps - full List of arguments</a><a class="headerlink" href="#stamps-full-list-of-arguments" title="Permalink to this headline"></a></h2>
[48]236<p>You can get the full list of arguments from the command line:</p>
[44]237<div class="highlight-python"><div class="highlight"><pre><span class="n">stamps</span> <span class="o">-</span><span class="n">h</span>
238</pre></div>
239</div>
240<p>or:</p>
241<div class="highlight-python"><div class="highlight"><pre><span class="n">stamps</span> <span class="o">--</span><span class="n">help</span>
242</pre></div>
243</div>
[42]244</div>
245<div class="section" id="date-based-filtering">
[44]246<span id="id2"></span><h2><a class="toc-backref" href="#id13">Date-based filtering</a><a class="headerlink" href="#date-based-filtering" title="Permalink to this headline"></a></h2>
[42]247<p>Most of the results returned by the <em>stamps</em> tool can be filtered using the
248following date-based filters:</p>
249<ul>
250<li><p class="first"><strong>YYYY-MM-DD</strong>: Limit the results to only those stamps stamped on this date:</p>
251<div class="highlight-python"><div class="highlight"><pre>stamps -v 2014-08-13
252</pre></div>
253</div>
254<div class="highlight-python"><div class="highlight"><pre>stamps -t stamper 2014-08-13
255</pre></div>
256</div>
257</li>
258<li><p class="first"><strong>YYYY-MM-DD*</strong>: Limit the results to only those stamps stamped <strong>after this
259date</strong>. For example, this will show per-day details for stamps stamped after
260the first of august, 2014:</p>
261<div class="highlight-python"><div class="highlight"><pre>stamps -v 2014-08-01*
262</pre></div>
263</div>
264</li>
265<li><p class="first"><strong>*YYYY-MM-DD</strong>: Limit the results to only those stamps stamped <strong>before this
266date</strong>. For example this will show the total time stamped for project stamper
267before the first of january, 2014:</p>
268<div class="highlight-python"><div class="highlight"><pre>stamps stamper *2014-01-01
269</pre></div>
270</div>
271</li>
272<li><p class="first"><strong>YYYY-MM-DD&#8211;YYYY-MM-DD</strong>: Limit the results to only those stamps stamped in
273a date <strong>between those dates</strong>. For example, this will show the <em>timeline</em> for
274july, 2014:</p>
275<div class="highlight-python"><div class="highlight"><pre>stamps -t 2014-07-01--2014-08-01
276</pre></div>
277</div>
278</li>
279<li><p class="first"><strong>nD|W|M|Y</strong>: Limit the results to only those stamps stamped since n <em>days</em>
280(<strong>D</strong>), <em>weeks</em> (<strong>W</strong>), <em>months</em> (<strong>M</strong>) or <em>years</em> (<strong>Y</strong>) ago.
281For example, this will show the details for the last month:</p>
282<div class="highlight-python"><div class="highlight"><pre>stamps -v 1m
283</pre></div>
284</div>
285<div class="admonition note">
286<p class="first admonition-title">Note</p>
287<p class="last">It does not matter if you provide <em>d|w|m|y</em> or <em>D|W|M|Y</em>. The filters are
288handled in a case-insensitive way.</p>
289</div>
290</li>
291</ul>
292<table class="docutils footnote" frame="void" id="id3" rules="none">
293<colgroup><col class="label" /><col /></colgroup>
294<tbody valign="top">
295<tr><td class="label"><a class="fn-backref" href="#id1">[1]</a></td><td><a class="reference external" href="http://repos.betabug.ch/stamp">http://repos.betabug.ch/stamp</a></td></tr>
296</tbody>
297</table>
298</div>
299</div>
300
301
302 </div>
303 </div>
304 </div>
305 <div class="sphinxsidebar">
306 <div class="sphinxsidebarwrapper">
307 <h3><a href="index.html">Table Of Contents</a></h3>
308 <ul>
309<li><a class="reference internal" href="#">How to use it</a><ul>
310<li><a class="reference internal" href="#recording-time">Recording time</a><ul>
311<li><a class="reference internal" href="#recording-consecutive-stamps">Recording consecutive stamps</a></li>
312</ul>
313</li>
314<li><a class="reference internal" href="#retrieving-information-from-the-existing-stamps">Retrieving information from the existing stamps</a><ul>
315<li><a class="reference internal" href="#total-times">Total times</a></li>
316<li><a class="reference internal" href="#per-day-details">Per day details</a></li>
317<li><a class="reference internal" href="#timeline">Timeline</a></li>
[44]318<li><a class="reference internal" href="#charts">Charts</a></li>
[42]319</ul>
320</li>
[44]321<li><a class="reference internal" href="#stamps-full-list-of-arguments">stamps - full List of arguments</a></li>
[42]322<li><a class="reference internal" href="#date-based-filtering">Date-based filtering</a></li>
323</ul>
324</li>
325</ul>
326
327 <h4>Previous topic</h4>
328 <p class="topless"><a href="install.html"
329 title="previous chapter">Installation instructions</a></p>
330 <h3>This Page</h3>
331 <ul class="this-page-menu">
332 <li><a href="_sources/using.txt"
333 rel="nofollow">Show Source</a></li>
334 </ul>
335<div id="searchbox" style="display: none">
336 <h3>Quick search</h3>
337 <form class="search" action="search.html" method="get">
338 <input type="text" name="q" />
339 <input type="submit" value="Go" />
340 <input type="hidden" name="check_keywords" value="yes" />
341 <input type="hidden" name="area" value="default" />
342 </form>
343 <p class="searchtip" style="font-size: 90%">
344 Enter search terms or a module, class or function name.
345 </p>
346</div>
347<script type="text/javascript">$('#searchbox').show(0);</script>
348 </div>
349 </div>
350 <div class="clearer"></div>
351 </div>
352 <div class="related">
353 <h3>Navigation</h3>
354 <ul>
355 <li class="right" style="margin-right: 10px">
356 <a href="genindex.html" title="General Index"
357 >index</a></li>
358 <li class="right" >
359 <a href="install.html" title="Installation instructions"
360 >previous</a> |</li>
361 <li><a href="index.html">Stamper 0.1 documentation</a> &raquo;</li>
362 </ul>
363 </div>
364 <div class="footer">
365 &copy; Copyright 2014, Fco. de Borja Lopez Rio, Oscar M. Lage.
366 Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.2.
367 </div>
368 </body>
369</html>
Note: See TracBrowser for help on using the repository browser.