📜 ⬆️ ⬇️

ELibrary Record Manager



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


One fine morning, this question arose before me, since I could no longer navigate normally through arrays of directories and files. Having decided for myself to somehow sort the chaos, I installed an e-book manager (I will not give you the name, there are many options, Google will help everyone).
')
Unfortunately, the manager did not suit me, because when forming libraries, the manager operates with paths to files. It seems there is nothing critical in this, but if we move / copy / delete a file, then the appropriately configured library flies to all hell. Oh yeah, plus to everything, did you have to copy 100,500+ files to removable media? In order to avoid this pleasure, you have to put everything in the archive, which also takes time.

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

A few days later I got the simplest library manager, which stores files in the database and searches by filters.



You can add an entry, either from the menu, or Ctrl + N, or by dragging and dropping files onto the main window. First you need to select one or more files that will correspond to the record. Further it is necessary to fill in several fields: “title”, “author”, “subject”, “tags” and “description”. And if the fields “name”, “author” and “description” always have to be filled in by hand, then the fields of the topic and description are selected from the base 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 when added are compressed using the qCompress method, with level 6.



The button “Find” the grid is filled in accordance with the selected filters. Double clicking on the record or from the menu opens a directory with all the files present in it. If you double-click on the line with information on the file, it will be unpacked and the corresponding file will open. Files are unpacked into the temp directory of 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 will come in handy. And if interested, I can continue to expand the functionality.
Oh yeah link to github
src - directory with source codes and “clean” base ELIBRARY_clean.FDB
build_mingw_win32 is a directory with a build for Windows. The settings file stores database connection settings.

Source: https://habr.com/ru/post/227849/


All Articles