2015-10-30 22:52:43 +00:00
|
|
|
# imag
|
|
|
|
|
|
|
|
Imag is a CLI PIM suite with a nice API-ish commandline interface, so you can
|
|
|
|
integrate it in your tools of coice (Editor, MUA, RSS reader, etc etc).
|
|
|
|
|
2015-11-30 15:24:41 +00:00
|
|
|
## Modules
|
2015-10-30 22:52:43 +00:00
|
|
|
|
2015-11-30 15:24:41 +00:00
|
|
|
All the modules have access to a shared store (which lives in `~/.imag/store/`
|
|
|
|
by default). Files are named after a schema:
|
2015-10-30 22:52:43 +00:00
|
|
|
|
2015-11-30 15:24:41 +00:00
|
|
|
~/.imag/store/<module_name>-<hashtype>-<hash>.imag
|
2015-10-30 22:52:43 +00:00
|
|
|
|
2015-11-30 15:24:41 +00:00
|
|
|
Where module name is "bookmark" for example. The hashtype is "UUID" by default
|
|
|
|
and the "hash" is a UUID then. Other types are possible as well:
|
2015-10-30 22:52:43 +00:00
|
|
|
|
2015-11-30 15:24:41 +00:00
|
|
|
- SHA1
|
|
|
|
- SHA512
|
2015-10-30 22:52:43 +00:00
|
|
|
|
2015-11-30 15:24:41 +00:00
|
|
|
for example (though it might not be a good idea to use SHA hashes,
|
|
|
|
see [Linking](#Linking))
|
2015-10-30 22:52:43 +00:00
|
|
|
|
2015-11-30 15:24:41 +00:00
|
|
|
Some modules might not want to store content there, for example you don't want
|
|
|
|
to put your icalendar files in there. So the calendar module just crawls through
|
|
|
|
your ical files and puts the scanned meta-information into the store. Of course,
|
|
|
|
if the content of the ical file changes, the store entry does not. It still
|
|
|
|
points (via its JSON content for example) to the same file. So changes are not
|
|
|
|
tracked (We can argue here whether we want to copy the contents to the store for
|
|
|
|
ical and vcard files, but we cannot argue on for example music files).
|
|
|
|
|
|
|
|
If a (for example ical-)file gets removed, the store entry gets invalid and has
|
|
|
|
to be garbage-collected.
|
|
|
|
|
|
|
|
> The current model is not fixed yet. I'm thinking about copying .ical and
|
|
|
|
> .vcard, basically all text files, to the store.
|
|
|
|
> This is not possible for media files like music or movies, though. Also this
|
|
|
|
> is not feasible for documents like .pdf or similar.
|
2015-10-30 22:52:43 +00:00
|
|
|
|
|
|
|
Each of the following modules has a short description including a table what
|
|
|
|
core features are required to get it working.
|
|
|
|
|
2015-11-30 15:24:41 +00:00
|
|
|
### Linking
|
|
|
|
|
|
|
|
The UUID/SHA hashes in the file names can be used to connect two store entries.
|
|
|
|
For example, an entry from the wiki could refer to a contact by a UUID, because
|
|
|
|
the file for the contact has a UUID in its name. These UUIDs are constant and
|
|
|
|
should not change.
|
|
|
|
|
|
|
|
A link chain like this
|
|
|
|
|
|
|
|
Wiki -> Shopping List -> Calendar Entry
|
|
|
|
| |
|
|
|
|
| v
|
|
|
|
| Contact -> Calendar Entry -> Bookmark
|
|
|
|
v
|
|
|
|
Wiki Entry -> Bookmark
|
|
|
|
|
|
|
|
is totally possible. Scenario: You have a Wiki entry of a recipe you like to
|
|
|
|
cook. The recipe is linked to a shopping list, where you want to buy the
|
|
|
|
ingredients. Of course, you want to do this on a specific date (calendar entry).
|
|
|
|
And you want to do this with your Girlfriend, so she (as a contact) is linked to
|
|
|
|
the calendar entry. Her Birthday is linked to her Contact and for her Birthday,
|
|
|
|
you saw something on amazon, so you bookmarked it and linked it to the calendar
|
|
|
|
entry.
|
|
|
|
On the other hand, the Shopping list has links to some other Wiki entry, because
|
|
|
|
it contains Kiwi, and you have notes about Kiwi, how to cook them properly. You
|
|
|
|
saw this on some website, so you linked to the website from your wiki entry, of
|
|
|
|
course.
|
2015-10-30 22:52:43 +00:00
|
|
|
|
2015-11-30 16:03:50 +00:00
|
|
|
### Header
|
|
|
|
|
|
|
|
So each file in the store has a certain format:
|
|
|
|
|
|
|
|
---
|
|
|
|
<header>
|
|
|
|
---
|
|
|
|
<content>
|
|
|
|
|
|
|
|
The header contains some structured data (either JSON or YAML), the module uses
|
|
|
|
to store data closely related to the content.
|
|
|
|
|
|
|
|
For example, the bookmark-module will use the header only and store URL and tags
|
|
|
|
in some JSON format. The Wiki module might use the Header for storing some meta
|
|
|
|
information about the wiki article (tags, category, maybe even links to other
|
|
|
|
store entries) and the content is the wiki article content written down by the
|
|
|
|
user.
|
|
|
|
|
|
|
|
The content is just text entered from the user. In the best case, the module
|
|
|
|
should't touch the content at all.
|
|
|
|
|
|
|
|
Here is a short overview what are the modules like:
|
|
|
|
|
|
|
|
| Module | Indexer | Header | Hdr-Format | Content |
|
|
|
|
| :---------------- | ------- | ------- | ---------- | ------- |
|
|
|
|
| Bookmarks | | X | JSON | |
|
|
|
|
| Contacts | X | X | JSON | |
|
|
|
|
| Calendar | X | X | JSON | |
|
|
|
|
| Notes | | X | YAML | X |
|
|
|
|
| Mail | X | X | JSON | |
|
|
|
|
| Wiki | | X | YAML | X |
|
|
|
|
| Todo | | X | YAML | |
|
|
|
|
| Shoppinglist | | X | YAML | |
|
|
|
|
| Bibliography | X | X | JSON | |
|
|
|
|
| News | X | X | JSON | |
|
|
|
|
| Image | X | X | JSON | |
|
|
|
|
| Movie | X | X | JSON | |
|
|
|
|
| Music | X | X | JSON | |
|
|
|
|
|
|
|
|
Explanation:
|
|
|
|
|
|
|
|
- An "Indexer" Module does only index some data and store the indexed meta
|
|
|
|
information in the store
|
|
|
|
- "Header" means that the header part of a store entry is used
|
|
|
|
- "Hdr-Format" Which format is chosen for the header. Basically: YAML if the
|
|
|
|
user might want to edit the header, otherwise JSON (pretty).
|
|
|
|
- "Content" means that the content part of a store entry is used
|
|
|
|
|
2015-10-30 22:52:43 +00:00
|
|
|
### Bookmarks
|
|
|
|
|
|
|
|
Bookmarks should be stored in a simple format:
|
|
|
|
|
|
|
|
```json
|
|
|
|
{ "URL": "https://github.com", "tags": ["ducks", "r", "great"]}
|
|
|
|
```
|
|
|
|
|
2015-11-30 16:03:50 +00:00
|
|
|
| Required core feature | Purpose |
|
|
|
|
| :------------------------------------ | :------------ |
|
|
|
|
| XDG-open (Browser) | External program |
|
2015-10-30 22:52:43 +00:00
|
|
|
|
|
|
|
### Contacts
|
|
|
|
|
|
|
|
Contacts are just read and indexed by `imag`, to create an internal index of
|
|
|
|
them and to be able to refer to.
|
|
|
|
|
2015-11-30 16:03:50 +00:00
|
|
|
| Required core feature | Purpose |
|
|
|
|
| :------------------------------------ | :------------ |
|
|
|
|
| vcard file format parsing | Data access |
|
|
|
|
| XDG-open (Mail program) | External Program |
|
2015-10-30 22:52:43 +00:00
|
|
|
|
|
|
|
### Calendar
|
|
|
|
|
|
|
|
Calendar are just read and indexed by `imag`, to create an internal index of
|
|
|
|
them and to be able to refer to.
|
|
|
|
|
|
|
|
| Required core feature | Purpose |
|
2015-11-08 16:38:16 +00:00
|
|
|
| :------------------------------------ | :------------ |
|
2015-10-30 22:52:43 +00:00
|
|
|
| ical file format parsing | Data access |
|
|
|
|
|
2015-11-30 15:46:13 +00:00
|
|
|
### Notes
|
|
|
|
|
|
|
|
Just plain text notes.
|
|
|
|
|
2015-11-30 16:03:50 +00:00
|
|
|
| Required core feature | Purpose |
|
|
|
|
| :------------------------------------ | :------------ |
|
|
|
|
| Linking to other store entries | Data Link |
|
|
|
|
| XDG-open (Editor) | External Program |
|
2015-11-30 15:46:13 +00:00
|
|
|
|
2015-10-30 22:52:43 +00:00
|
|
|
### Mail
|
|
|
|
|
|
|
|
`imag` should be able to index all your mail and make them accessible through
|
|
|
|
its interfaces, so you can link contacts, calendar entries, wiki pages, todo
|
|
|
|
notes, etc etc. to your mail.
|
|
|
|
|
|
|
|
Some of these things (like linking contacts, calendar entries) should be
|
|
|
|
linked automatically.
|
|
|
|
|
2015-11-30 16:03:50 +00:00
|
|
|
| Required core feature | Purpose |
|
|
|
|
| :------------------------------------ | :------------ |
|
|
|
|
| Parser: Maildir | Data access |
|
|
|
|
| Parser: mbox | Data access |
|
|
|
|
| XDG-open (Mail program) | External Program |
|
|
|
|
| XDG-open (Editor) | External Program |
|
2015-10-30 22:52:43 +00:00
|
|
|
|
|
|
|
### Personal Wiki
|
|
|
|
|
|
|
|
`imag` should contain a complete personal wiki software. It should contain of
|
|
|
|
simple markdown files which have a YAML header, nothing too special for the
|
|
|
|
first step.
|
|
|
|
|
2015-11-30 16:03:50 +00:00
|
|
|
| Required core feature | Purpose |
|
|
|
|
| :------------------------------------ | :------------ |
|
|
|
|
| Parser: Markdown | Data parsing |
|
|
|
|
| XDG-open (Editor) | External Program |
|
|
|
|
| XDG-open (Mail program) | External Program |
|
|
|
|
| XDG-open (Browser) | External Program |
|
2015-10-30 22:52:43 +00:00
|
|
|
|
2015-11-30 15:24:22 +00:00
|
|
|
Some more ideas:
|
|
|
|
|
|
|
|
- Extract URLs and put them into store as Bookmarks
|
|
|
|
|
2015-10-30 22:52:43 +00:00
|
|
|
### Todo-List
|
|
|
|
|
|
|
|
`imag` should also contain a full todo-tool. I'm thinking about integrating
|
|
|
|
taskwarrior through a wrapper here.
|
|
|
|
|
2015-11-30 16:03:50 +00:00
|
|
|
| Required core feature | Purpose |
|
|
|
|
| :------------------------------------ | :------------ |
|
|
|
|
| Library: taskwarrior | Implementation |
|
|
|
|
| XDG-open (Editor) | External Program |
|
2015-10-30 22:52:43 +00:00
|
|
|
|
|
|
|
### Shoppinglist
|
|
|
|
|
|
|
|
Simply dot-and-tick lists.
|
|
|
|
|
2015-11-30 16:03:50 +00:00
|
|
|
| Required core feature | Purpose |
|
|
|
|
| :------------------------------------ | :------------ |
|
|
|
|
| Module: Todo-List | Implementation |
|
|
|
|
| XDG-open (Editor) | External Program |
|
2015-10-30 22:52:43 +00:00
|
|
|
|
2015-11-30 16:03:50 +00:00
|
|
|
- Sub-form of the Todo-List module
|
2015-11-30 15:30:20 +00:00
|
|
|
|
2015-10-30 22:52:43 +00:00
|
|
|
### Bibliography management
|
|
|
|
|
|
|
|
BibTex would be the first step, maybe we should be able to add the actual PDFs
|
|
|
|
here as well... didn't waste too much thoughts on this by now. If we have the
|
|
|
|
PDF data, we need git-annex.
|
|
|
|
|
2015-11-30 16:03:50 +00:00
|
|
|
| Required core feature | Purpose |
|
|
|
|
| :------------------------------------ | :------------ |
|
|
|
|
| BibTex parsing | Data parsing |
|
|
|
|
| Backend: git-annex | Data parsing |
|
|
|
|
| XDG-open (Editor) | External Program |
|
|
|
|
| XDG-open (PDF viewer) | External Program |
|
|
|
|
| XDG-open (Office suite) | External Program |
|
2015-10-30 22:52:43 +00:00
|
|
|
|
|
|
|
### News (RSS)
|
|
|
|
|
|
|
|
Just indexing, reading news is not task of `imag` and so isn't syncing.
|
|
|
|
|
|
|
|
| Required core feature | Purpose |
|
2015-11-08 16:38:16 +00:00
|
|
|
| :------------------------------------ | :------------ |
|
2015-11-30 16:03:50 +00:00
|
|
|
| Parser: RSS | Data parsing |
|
|
|
|
| Parser: Atom | Data parsing |
|
2015-10-30 22:52:43 +00:00
|
|
|
|
2015-11-30 15:30:20 +00:00
|
|
|
### Image
|
|
|
|
|
|
|
|
Just indexing photos.
|
|
|
|
|
2015-11-30 16:03:50 +00:00
|
|
|
| Required core feature | Purpose |
|
|
|
|
| :------------------------------------ | :------------ |
|
|
|
|
| Backend: git-annex | Data parsing |
|
|
|
|
| Image metadata reading | Data parsing |
|
|
|
|
| XDG-open (Image viewer) | External Program |
|
2015-11-30 15:30:20 +00:00
|
|
|
|
|
|
|
### Video
|
|
|
|
|
|
|
|
Just indexing movies.
|
|
|
|
|
2015-11-30 16:03:50 +00:00
|
|
|
| Required core feature | Purpose |
|
|
|
|
| :------------------------------------ | :------------ |
|
|
|
|
| Backend: git-annex | Data parsing |
|
|
|
|
| Movie metadata reading | Data parsing |
|
|
|
|
| XDG-open (Movie viewer) | External Program |
|
2015-11-30 15:30:20 +00:00
|
|
|
|
|
|
|
### Music
|
|
|
|
|
|
|
|
Just indexing music.
|
|
|
|
|
2015-11-30 16:03:50 +00:00
|
|
|
| Required core feature | Purpose |
|
|
|
|
| :------------------------------------ | :------------ |
|
|
|
|
| Backend: git-annex | Data parsing |
|
|
|
|
| Music metadata reading | Data parsing |
|
|
|
|
| XDG-open (Music player) | External Program |
|
2015-11-30 15:30:20 +00:00
|
|
|
|
2015-11-08 16:35:11 +00:00
|
|
|
# License
|
|
|
|
|
|
|
|
This code is released under terms of GNU GPLv2.
|
|
|
|
|