Commit Graph

5545 Commits

Author SHA1 Message Date
Matthias Beyer b713718693 Minify code with helper macro 2018-04-30 14:15:34 +02:00
Matthias Beyer 58a6eea573 Remove the edit command
The edit command of imag-diary gets removed by this patch.

The rationale is that imag-edit is way more powerful and thus, not every
other imag module should implement an edit command. Chaining
`imag-diary list` and `imag edit -I` is encouraged.

We still need the edit functionality in imag-diary, as `imag diary
create` shall spawn an editor, still. We only remove the ability for
editing of existing entries with this patch.
2018-04-30 14:04:16 +02:00
Matthias Beyer 76966bcd6c
Merge pull request #1467 from matthiasbeyer/libimagentryfilter/failable
libimagentryfilter: failable
2018-04-29 14:21:09 +02:00
Matthias Beyer fc92cfc36f Move header filters to FailableFilter 2018-04-29 11:43:32 +02:00
Matthias Beyer 30ac77d626 Add error module 2018-04-29 11:43:32 +02:00
Matthias Beyer e08ec34893 Remove empty module 2018-04-29 11:43:32 +02:00
Matthias Beyer ecf1768a8d
Merge pull request #1466 from matthiasbeyer/update-filters
Update dependency: filters: 0.2 -> 0.3
2018-04-29 11:43:19 +02:00
Matthias Beyer 6d21d8eb49 Update dependency: filters: 0.2 -> 0.3 2018-04-29 10:46:36 +02:00
Matthias Beyer 0976cab014
Merge pull request #1464 from matthiasbeyer/libimagentrygps/32-bit-gps-values
libimagentrygps: 32 bit gps values
2018-04-29 00:35:21 +02:00
Matthias Beyer dbb39475d9 Upgrade variables to 64 bit 2018-04-28 23:27:12 +02:00
Matthias Beyer 93c3bb5862 Upgrade variables to 64 bit 2018-04-28 23:27:12 +02:00
Matthias Beyer f493b4b8c3 Fix: Allow second to be missing 2018-04-28 23:18:02 +02:00
Matthias Beyer 5870fa0785 Fix: Use 16 bit variables for GPS degree/minute/second 2018-04-28 23:18:02 +02:00
Matthias Beyer 1dd5cb5565
Merge pull request #1459 from matthiasbeyer/libimagcontact/email-properties
libimagcontact/imag-contact: Email properties
2018-04-28 13:46:52 +02:00
Matthias Beyer 713621337f Adapt for new libimagcontact interface 2018-04-27 16:57:48 +02:00
Matthias Beyer 5f3b7b31e7 Add support for storing email properties
We have to move the `Email` type at the bottom of the DeserVcard type
because it contains a table and we must emit tables as last values when
de/serializing.

Maybe this will shoot us in the foot later, but only with TOML I guess.
We'll see. For now, this is good.

For that we need to update a dependency: vobject -> 0.5
2018-04-27 16:57:37 +02:00
Matthias Beyer bfd536d3fb
Merge pull request #1460 from matthiasbeyer/imag-contact/warn-if-no-extension
Set extension or warn if none there
2018-04-27 14:46:39 +02:00
Matthias Beyer ead8413c12
Merge pull request #1451 from matthiasbeyer/libimagcategory/rewrite-with-linking
libimagcategory: rewrite with linking
2018-04-27 14:18:38 +02:00
Matthias Beyer 932ba3e7d4 Set extension or warn if none there
In case of auto-generating the file name, we should add an extension.
If we do not auto-generate the file name, we should warn that the
extension for the file is missing.
2018-04-27 13:58:46 +02:00
Matthias Beyer 82867f3ff6 Fix tests for new interface 2018-04-27 13:24:59 +02:00
Matthias Beyer 493fa0226c
Merge pull request #1453 from matthiasbeyer/imag-contact/create-uid
Fix: Generate UID when creating a contact
2018-04-26 16:16:33 +02:00
Matthias Beyer 47c4a360f7
Merge pull request #1454 from matthiasbeyer/imag-contact/do-not-require-fields
Fix: Make most fields optional
2018-04-26 16:14:48 +02:00
Matthias Beyer ad9eb62376 Fix: Generate UID when creating a contact 2018-04-26 14:43:21 +02:00
Matthias Beyer 07e804a7c8 Fix: Make most fields optional 2018-04-26 14:01:53 +02:00
Matthias Beyer f0969db47c Rewrite
This patch rewrites the whole libimagcategory and brings it to a nice
standard (the code before was rather messy).

Now, categories are represented by an entry in the store and all entries
which have this category are linked to that entry.
2018-04-26 12:05:28 +02:00
Matthias Beyer 9fc9e7fe17 Outsource iterator in iter module 2018-04-26 12:05:28 +02:00
Matthias Beyer ab15d89e64 Rewrite CategoryRegister as CategoryStore 2018-04-26 12:05:28 +02:00
Matthias Beyer 5f305ef7a7 Add module for category handling 2018-04-26 12:05:28 +02:00
Matthias Beyer c26f1aae2a This module should be named "entry" 2018-04-26 11:20:40 +02:00
Matthias Beyer f321aa82a1 Make sure category is linked when setting it 2018-04-26 11:20:09 +02:00
Matthias Beyer 0bacfb0a88
Merge pull request #1446 from matthiasbeyer/travis-clippy
Travis: clippy
2018-04-26 10:25:45 +02:00
Matthias Beyer 2b250bd8c8 Revert "Add clippy job"
This reverts commit 8ae689863d.
2018-04-25 21:39:56 +02:00
Matthias Beyer ea80a5a09b Derive Default for InMemoryFileAbstraction, remove constructor 2018-04-25 19:15:07 +02:00
Matthias Beyer 6a34e7a8fd Derive Default for FSFileAbstraction, reduces boilerplate 2018-04-25 19:15:07 +02:00
Matthias Beyer bf363c4748 Use "if let" if matching on a single pattern 2018-04-25 19:15:07 +02:00
Matthias Beyer f1142c414d Use ok_or_else() instead of ok_or() 2018-04-25 19:15:07 +02:00
Matthias Beyer 22170a0d55 Do not String::from(String) 2018-04-25 19:13:51 +02:00
Matthias Beyer 6f5590713a Use single quotes here 2018-04-25 19:13:51 +02:00
Matthias Beyer 44521a7c8c Dont use "return" keyword at end of function 2018-04-25 19:13:51 +02:00
Matthias Beyer dc18e650bb Collapse nested if-else-if 2018-04-25 19:13:51 +02:00
Matthias Beyer 67675b2ab2 Remove unecessary clone 2018-04-25 19:13:51 +02:00
Matthias Beyer a25f650ca0 Be more ergonomic here 2018-04-25 19:13:51 +02:00
Matthias Beyer 84249e3fb5 Be less verbose when constructing an object
The rust compiler does some fancy things for us: It automatically finds
the right fields if the name of the variable and the file is the same.

Lets use that to reduce boilerplate with this patch.
2018-04-25 19:13:50 +02:00
Matthias Beyer 154c2e482b Change generate_variants() helper to use base by ref 2018-04-25 19:13:50 +02:00
Matthias Beyer 42c4186dec Use or_else() instead of or() 2018-04-25 19:13:50 +02:00
Matthias Beyer 2b10ab0b36
Merge pull request #1450 from matthiasbeyer/libimagcontact/not-based-on-libimagentryref
libimagcontact: not based on libimagentryref
2018-04-25 14:59:37 +02:00
Matthias Beyer d6f8751f6e Reimplement imag-contact 2018-04-25 13:45:00 +02:00
Matthias Beyer a83d10fb1e Remove feature usage 2018-04-25 13:45:00 +02:00
Matthias Beyer 80c07171aa Make sure we can deserialize
Use default values when field is not there when we deserialize. This
does automatically the right thing.
2018-04-25 13:45:00 +02:00
Matthias Beyer 56c1b78d93 Add getters for DeserVcard helper type 2018-04-25 13:45:00 +02:00