time-sheet 0.5.5 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +41 -0
- data/lib/time_sheet/table_printer.rb +2 -0
- data/lib/time_sheet/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dbb94daa084b68389e2fc8f28fc599bd87fd5d9016c876b7b0ba04fa508bd298
|
4
|
+
data.tar.gz: 21e136b14b65c75ce3210b314a650778015093cbab530af1ceb10ff244534c0a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ebcad92e2658984db81e9f1e9edd2dc616aa342e838254c86b3e6717dd065d171d69d4d7a63ebf03744cc1670ab74637426d86aa32d9180f82d466c22e934676
|
7
|
+
data.tar.gz: e19d852e99883432284fe5953bdf684e0056bb6e814f024c42d1a5272abaf95dfd1ae56e061eb94ee3a8dc4620c9dde7f424a167e3c4df6f17350a57fd930a51
|
data/README.md
CHANGED
@@ -15,6 +15,47 @@ The gem bundles an executable which includes a help command, just run
|
|
15
15
|
`time-sheet.rb --help`. As an example spreadsheet, have a look at
|
16
16
|
[the sheet we use for tests](https://github.com/moritzschepp/time-sheet/raw/master/spec/data/time_log.xls).
|
17
17
|
|
18
|
+
### Processing data with other tools
|
19
|
+
|
20
|
+
You can simply let the tool output a full list of time entries that are easy to
|
21
|
+
process with other tools. For example a python script `process.py` like this
|
22
|
+
|
23
|
+
~~~python
|
24
|
+
import sys
|
25
|
+
from io import StringIO
|
26
|
+
import datetime
|
27
|
+
import pandas as pd
|
28
|
+
|
29
|
+
data = sys.stdin.readlines()
|
30
|
+
data = StringIO("\n".join(data))
|
31
|
+
df = pd.read_csv(data,
|
32
|
+
sep='|',
|
33
|
+
names=['date', 'start', 'end', 'minutes', 'project', 'activity', 'description'],
|
34
|
+
converters={
|
35
|
+
'date': lambda x: datetime.datetime.strptime(x, '%Y-%m-%d').date(),
|
36
|
+
'start': lambda x: datetime.datetime.strptime(x, '%H:%M').time(),
|
37
|
+
'end': lambda x: datetime.datetime.strptime(x, '%H:%M').time()
|
38
|
+
}
|
39
|
+
)
|
40
|
+
|
41
|
+
# ... your processing
|
42
|
+
~~~
|
43
|
+
|
44
|
+
could be used to read the data into a pandas dataframe like this:
|
45
|
+
|
46
|
+
~~~bash
|
47
|
+
time-sheet.rb --trim | ./process.py
|
48
|
+
~~~
|
49
|
+
|
50
|
+
Attention: unfortunately, the python debugger `pdb` (as well as `ipdb`) doesn't
|
51
|
+
work out of the box with scripts that make use of data via STDIN. If you want to
|
52
|
+
use it, you have to
|
53
|
+
|
54
|
+
~~~python
|
55
|
+
sys.stdin = open('/dev/tty')
|
56
|
+
ipdb.set_trace()
|
57
|
+
~~~
|
58
|
+
|
18
59
|
## Contributing
|
19
60
|
|
20
61
|
Bug reports and pull requests are welcome on GitHub at https://github.com/moritzschepp/time-sheet
|
data/lib/time_sheet/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: time-sheet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Moritz Schepp
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-04-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: spreadsheet
|