On 28-05-2016 17:23:55, Martin Blais wrote:
> As Filippo suggests, each transaction has a unique hash you can derive from
> it, but I'd like to hear more about your use case: I was going to suggest
> that if you want the user to be able to tag some particular transactions
> with a id, you can use metadata, tags or links for that. So when you say
> "so I can identify transactions in some way" what do you mean exactly?
> What's the task you're trying to accomplish?
So here's my use case (plus a bit of story):
I write a commandline PIM suite[0]. I "write" it by re-using tools, collecting
their data (creating references to the data, not duplicating it), to be able to
refer from data of one tool to data of another tool:
Beancount Transaction ABC <<-- some kind of ref -->> Taskwarrior task XYZ
The references are stored in a "store" (not in the data of the respective tool
itself).
I collect this data by using the APIs of the tooks (taskwarrior -> hook api,
beancount -> plugin API, etc.)
(sidenote: This is also why I choose beancount and not ledger-cli or hledger
- because they do not have an API.
I choose beancount because of available features (fava beeing one big
reason))
What I plan on doing: My tool stores hashes to each transaction. The user can
use this hashes to "link" the transactions.
I will provide scripts and tooling to re-find the transactions.
One problem I haven't figured out yet: Does the hash of a transaction change if
the transaction
* gets moved to another file/location in a file
* gets changes (naming of the involved accounts, date, tags, other data)
? This would be kind of critical, as this would result in dangling "pointers"
(hashes) in my database.
I'm rather sure that the listed changes result in a change of the hash, don't
they? I'm not sure how to wrap around these issues.
It is no option for me that the user has to put in the required metadata to
generate references, as this would
* cause users to re-write large parts of their beancount data
* add noise in the beancount data which shouldn't be there
Besides the above: The tool I'm writing is far from usable, but I make steady
progress. I plan on implementing all aspects of personal information management
and I target plain-text and console only.
Feel free to ask me questions.
[0]:
https://github.com/matthiasbeyer/imag