Giter Site home page Giter Site logo

Comments (6)

tiemay avatar tiemay commented on June 28, 2024

A couple other things worth mentioning: both Calibre and Calibre's ebook viewer have a button to clear the lists mentioned above, after doing so I'm left with:

"gui_view_history": [], 

and

"viewer_open_history": []

So if the cleaner results like that, hopefully that means it's pretty safe, though I don't know if that's the only thing those built in "clear recent" functions do, and I haven't yet tested what happens if you clear the lists manually while Calibre or Calibre's ebook viewer are open — that might get messy.

And I'll mention this, but I don't think it's important: in "gui_view_history", the number which accompanies the name of each book is the order the book was imported to Calibre. Notice how Calibre Quick Start Guide has number one, that's because it was the first book imported (it comes with Calibre by default).

from cleanerml.

az0 avatar az0 commented on June 28, 2024

How about this?

action command="json" search="file" path="~/Calibre Library/metadata_db_prefs_backup.json" address="gui_view_history"
action command="json" search="file" path="~/.config/calibre/viewer.json" address="viewer_open_history"

from cleanerml.

tiemay avatar tiemay commented on June 28, 2024

The one for "viewer_open_history" is working, but the "gui_view_history" one isn't changing metadata_db_prefs_backup.json at all.

from cleanerml.

az0 avatar az0 commented on June 28, 2024

It is working here.

First, make sure Calibre is completely closed. (See pull request #92--perhaps you could add the same for Linux.)

Second, do you see a line like this in the BleachBit log?
Clean file 4.1kB /home/user/Calibre Library/metadata_db_prefs_backup.json

from cleanerml.

tiemay avatar tiemay commented on June 28, 2024

Derp derp, my mistake, I forgot my Calibre library wasn't in the default location ><. A significat number of Calibre users may not use the default location either. It looks like the library location information is primarily stored in ~/.config/calibre/global.py e.g.

# library path
# Path to directory in which your library of books is stored
library_path = u'/home/hololinuxmint/Calibre Library'

Do we have a way of parsing that information to find a custom located library? If not, it might be a good idea to add a warning letting people know that their library needs to be in the default location "~/Calibre Library" for those options to work.

This might warrent opening a new issue, but I'll ask here first. So the recents list for Calibre's ebook viewer is being cleared fine, but that's still not the case with Calibre's recents list even though the JSON files are being cleared fine. This is because the metadata_db_prefs_backup.json file is what it sounds like, that file is just a backup of what's in ~/Calibre Library/metadata.db. The real recents list is in that db on the preferences table, with the key gui_view_history and a val being the same 2D array in the JSON file (pics). Do we have a way of clearing that data?

As for the running check, I'll look into that after #92 is merged so as to avoid a merge conflict.

from cleanerml.

cfoellmann avatar cfoellmann commented on June 28, 2024

I can say that my library is NOT in the default location and I really think the default is pretty much a bad idea (just my opinion) because your user profile can blow up in size signifcantly.

The possiblity to parse (text) file content would help in this case and there will be "a lot" more cases this feature could help.

from cleanerml.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.