Open alllexx88 opened 7 years ago
Hi,
Woo, impressive library !
I don't see any problem to handle a huge amount of books, even if with 60K+ a "real" database engine should be better (like mysql / postgresql)
As silex-cops is a frontend for Calibre, all object mapping are related to the database schema.
In order to make it compatible with myrulib one should modify a pretty big amount of data in the entity & repository classes but it is not impossible :)
As silex-cops is a frontend for Calibre, all object mapping are related to the database schema.
Thanks for making this clear 😃 I don't have much experience with php (though its syntax is very close to C), and even though I'm an apt learner, and used to dealing with new things, I just don't have the time now to dive deeper here to understand silex-cops internals 😞 It's much easier for me to write a script (bash, or python is better here, I think) to populate an empty calibre database from myrulib database. It's doable, and not too hard.
... even if with 60K+ a "real" database engine should be better (like mysql / postgresql)
As a feature request (sorry for the offtopic), it'd be good if silex-cops could handle mysql and postgresql. I mean, making a copy of metadata.db to a 'real' database, and syncing it on metadata.db (timestamp) change.
I really like silex-cops design, and, in general, I think it's better to not restrict it to being a Calibre frontend only. But there's always room for improvement 😄
Thanks 👍
Actually, as I use Doctrine DBAL abstraction layer, it could be very easy to switch to mysql or postgresql as long as the table structures are strictly the same ;) If you manage to import your data, I can make a mysql branch for you
Btw there is no restriction to test current sqlite engine against a 60K+ book collection
@mduplouy It turned out to not be trivial, since myrulib object mapping is rather different from calibre, but I've written a conversion script. Yet it takes a really long while to complete the conversion (62800 books to process). Good that I can make my Synology do this in a screen session for as long as it needs to 😄 I log SQL INSERT commands along the way too, to transfer to 'real' db easily if need be. I'll let you know how well silex-cops manages the library on Synology NAS when conversion is done 😃
Would ne nice if you coule provide a download link for the script so i can give it a try ans make some profiling :-)
The problem's that it's pretty database-specific 😞 myrulib, unlike calibre, doesn't use many-to-many relations between authors and books -- it's one to many instead. So, in case a book has more than one author, it creates new
(I've commented it a bit, and edited to be more readable, but it's still pretty raw) (had to remove books and series create/update triggers from empty calibre database, cause I don't have title_sort() implemented)
https://gist.github.com/alllexx88/c4b2c1b96d2f6addbfffed4d763c05c6
P.S. My lib will take another ~72hrs to complete conversion... well, no surprise: a lot of string matching has to be done, even though sed
is highly efficient in this
maybe a gist would do the trick for your script :)
actually I was talking about the SQL script, which I guess should not be so huge in bzip2 compressed format
Let me know when it's over, I'm quite curious about the result
Sorry, you're right about gist 🆗
It's at ~46% now. I sure will let you know, I'm very interested in making it work well. Especially if you add mysql support, since then there's a big chance I can have it set up in my University building... P.S. To make colleagues and students happy 😆
P.P.S. Yeah, I'll upload the SQL script when it's done generating. It's actually INSERT statements only, since I use an empty Calibre database (with some removed triggers) as a starting point.
I'm pretty confident with the mysql handling, the only tricky part is the trigger within the database provider and the backoffice :+1: all the rest is pure sql
Nice for the script, so I can play it many times to regenerate a clean database
And new translations shouldn't be a problem too if needed :smile:
Sounds great 👍 The great things about silex-cops are that it 1) needs so few dependencies (I can do what I want at home, but making admins at work install something "alien" to them is much more difficult), 2) code readability (given I have time to know php and silex good enough, I can mod it myself if need be), 3) I love your license :lol: 4) the design is both intuitive, and looks gorgeous... so as soon as the conversion is complete, and I have the time (going to have a hard long working day on Monday, when the conversion completes:( ), I'll definitely give it a go 😄
nice to hear, i'll make an issue for mysql / postgresql support and a dedicated branch
feel free to fork and do whatever the fuck you want to :+1:
Hi! I have a huge djvu/pdf/ps/chm/txt.bz2 library (62k+ books) with a MyRuLib database. Is such a large library managable for silex-cops? At least in theory? If so, which calibre metadata.db tables and fields are needed for silex-cops? Here's MyRuLib database schema:
I can share the database itself, but it weights ~16.2MB when compressed with WinRAR.
Also, if adding myrulib database format support to silex-cops directly isn't a hassle, it'd be great, since further library updates are likely to come with upgraded myrulib databases.
Thanks!