Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Firefox history: add append mode #51

Open
novoid opened this issue Jul 21, 2018 · 3 comments
Open

Firefox history: add append mode #51

novoid opened this issue Jul 21, 2018 · 3 comments

Comments

@novoid
Copy link
Owner

novoid commented Jul 21, 2018

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.

@DerBeutlin
Copy link
Contributor

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?

@novoid
Copy link
Owner Author

novoid commented Sep 1, 2018

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.

@DerBeutlin
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants