View Single Post
Old 08-20-2014, 10:24 PM   #599
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
The annotations files are something that annoy me and I keep thinking I should do something about them. I will occasionally delete them, but when I do, I delete all of them. Providing a clean-up of them is a good idea. Automating running of it is fairly simple as I already have code to run jobs.

But, I don't think deleting the empty annotation files will change anything. If the file is empty, it should mean that the book has been opened and there are currently no annotation made on it. Other than someone creating the file manually, I don't think there is a way to have an empty file there and have annotations in the database. Are you seeing something happening when these files are there?

My thoughts for an annotation file clean-up might have options to:

- Remove all annotations files
- Remove all annotations files for books that are no longer on the device
- Remove all annotations files for books that do not have annotations in the database
- Remove all annotations files for books that do have annotations in the database
- Remove empty annotations files

The first is easy and is what I would probably use. The second is sensible and not to hard. I'm not sure how useful the others are. The third and fourth options possibly shouldn't be run automatically. Maybe they should be run against selected books. And in that case, I would consider options choose whether to remove the files or the database entries.

I'm won't be doing anything immediately. I don't want to touch anything until calibre 2.0 is released and settled in a little bit. But, I'll think about it and take any ideas that people have.
davidfor is offline   Reply With Quote