Memacs icon indicating copy to clipboard operation
Memacs copied to clipboard

Firefox history: add append mode

Open novoid opened this issue 5 years ago • 3 comments

Somebody might volunteer for coding the append mode, where output is written to a file (instead of stdout as it is now) and new entries are compared with existing ones.

In append mode, only non-existing entries are appended. This is helpful when Firefox SQLite DB is a sliding window and Memacs output file should cover the whole story.

novoid avatar Jul 21 '18 13:07 novoid

So the idea is to parse the old orgmode file? Because one could also just store all entries in a database/pickled python dictionary(stored in the orgmode folder or the memacs folder) and then append the new entries to that but rewrite the orgmode file every time. That way one would not have to write/use a parser to get the data and the org file is not vulnerable to change. On the other hand one would need to take care of the database/dictionary instead of the orgfile.

What is your opinion?

DerBeutlin avatar Sep 01 '18 19:09 DerBeutlin

So far, the append mode of existing modules is using the "parse the existing/old orgmode result files and take a look on the IDs"-approach. I can't remember the discussion when we decided to go that way. Most probably it was because we wanted to avoid any state-keeping outside of source and target files. With these DBs you have to worry about inconsistencies between: DB and existing orgmode files, DB within itself (data corruption,...). Since we had those unique IDs (hashes from data), the comparison of IDs was more elegant to us, I guess. The git-principle: data = hash = checksum = identifier.

novoid avatar Sep 01 '18 19:09 novoid

Oh I wasn't aware of append modes in other modules! Then I will take a look at it, thanks!!

DerBeutlin avatar Sep 01 '18 20:09 DerBeutlin