ELibrary Record Manager

    Probably everyone on the hard drive accumulates a huge number of all kinds of books, notes, notes and so on. Of course, all this is in various formats fb2, pdf, doc, or maybe several files or a series of books belong to one logical record. How to store all this?

    One fine morning, just such a question arose in front of me, since I could no longer properly navigate through arrays of directories and files. Having decided for myself to somehow sort the chaos, I installed an e-book manager (I won’t give a name, there are a lot of options, Google can help everyone).

    Unfortunately, the manager didn’t work for me, because when creating libraries the manager operates on paths to files. There seems to be nothing critical about this, but if we move / copy / delete a file, then an appropriately configured library will go to hell. Oh yes, plus everything, did you have to copy 100,500+ files to removable media? To avoid this pleasure, you have to put everything in the archive, which also takes time.

    I had to invent a bike for myself. Firstly, it was decided that all files will be stored in the database, and secondly, that the embedded FireBird 2.5 database will be used. And of course, all this is in Orthodox C ++ / Qt 5.3.0.

    After a few days, I got the simplest library manager that stores files in a database and searches through filters.

    You can add a record either from the menu, or Ctrl + N, or by dragging files to the main window. First you need to select one or more files that will be related to the record. Next, you need to fill in several fields: “title”, “author”, “subject”, “tags” and “description”. Moreover, if the fields “name”, “author” and “description” always have to be filled in manually, then the subject and description fields are selected from the database directory, if the value for filling is not found, then a new one is added. Optionally, you can still upload files to the record with the "+ files" button. Files are added by the qCompress method, with level 6, when added.

    Using the “Find” button, the grid is filled in accordance with the selected filters. Double-clicking on a record or from a menu opens a directory with all the files present in it. If you double-click on a line with information on a file, the corresponding file will be unpacked and opened. Files are unpacked into the temp directory ELibrary, after closing the directory with all files is deleted.

    Well, that’s all, the post does not claim to be in the top, but I hope someone comes in handy. And if I am interested, I can continue to expand the functionality.
    Oh yes, the link to GitHub
    src is the directory with the sources and the "clean" base ELIBRARY_clean.FDB
    build_mingw_win32 is the directory with the build for Windows. The settings file contains database connection settings.

    Also popular now: