![]() |
#16 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,343
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
1) My database is hosed -- what do I do? 2) What did you do? 3) I was testing an Excel macro that changes the author names in the DB to base64. 4) Oh... Updating calibre's database from outside of calibre is a bad idea. Unfortunately I don't see any way to prevent it, other than hope that the missing trigger functions would abort the update. |
|
![]() |
![]() |
![]() |
#17 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,065
Karma: 858115
Join Date: Jan 2011
Device: Kobo Clara, Kindle Paperwhite 10
|
I hear you and can imagine the potential headaches. I wasn't even thinking about updating calibredb from outside. I was researching if there might be a better way for me to work with the calibredb data only for the purpose of printing or saving a formatted table of metadata, as opposed to the unformatted catalog.csv.
|
![]() |
![]() |
Advert | |
|
![]() |
#18 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Quote:
Code:
Echo ON Echo Calibre metadata.db test ... Echo .output test1.txt > sqlscript.scr Echo SELECT title FROM books; >> sqlscript.scr Echo .quit >> sqlscript.scr SQLITE3 METADATA.DB < sqlscript.scr |
|
![]() |
![]() |
![]() |
#19 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,065
Karma: 858115
Join Date: Jan 2011
Device: Kobo Clara, Kindle Paperwhite 10
|
Thanks, Starson. I think I'll go with something like that, at least using SQLite shell.
|
![]() |
![]() |
![]() |
#20 | |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 146
Karma: 2594
Join Date: May 2009
Device: Kindle PW,Sony 700, Sony 950 (Daily Edition),Nook Color,iPad
|
Quote:
1st. I start a new Access database and link to the text(csv) file, you only have to do this once since every time the file is changed it is pointed to since you are linking and not importing (set up a folder so they are in the same place so you can keep track of) 2nd. In Excel set up a data connetion to that Access database, then you can run any query anytime you want on it, as far as Excel is concerned it is a database |
|
![]() |
![]() |
Advert | |
|
![]() |
#21 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,065
Karma: 858115
Join Date: Jan 2011
Device: Kobo Clara, Kindle Paperwhite 10
|
M-M, thanks. I'll look doing something like that.
|
![]() |
![]() |
![]() |
#22 |
Connoisseur
![]() ![]() ![]() ![]() ![]() Posts: 54
Karma: 442
Join Date: Oct 2010
Location: Detroit
Device: iPad
|
Another approach may be to use one of the myriad SQLite GUI's available out there.
I use http://www.sqliteexpert.com/ But there are many others available check out:- http://www.sqlite.org/cvstrac/wiki?p=ManagementTools |
![]() |
![]() |
![]() |
#23 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,065
Karma: 858115
Join Date: Jan 2011
Device: Kobo Clara, Kindle Paperwhite 10
|
@garcle, woohoo!, gui's for a Mac user, thanks, I didn't know about them. sqliteexpert isn't available for OS X. Your other link helped. I downloaded free SQLiteStudio which seems easy enough for a (adjectives deleted) Mac user such as myself to use to get me started.
@anyone, I have some newbie questions. 1. On OSX 10.6.6 on a 2 year old intel mac, does it matter if I use 32 bit or 64 bit apps? I gather 64 bit is better but really don't understand why. 2. Re SQLite, if I want to create my own DBs, can I do it with the SQLite that's part of the calibre install, or do I need to DL another copy of SQLite, or set up something so the one instance can deal with multiple different DBs simultaneously? What solution would not interfere with calibre? 3. Re my noobness with unix system admin and Mac OS X unix in specific. Can anyone recommend any good books or web sites for me to learn from? (I had many problems trying to install MySQL (and then PostgreSQL) last night until I stopped when I realized I'd better learn what I'm doing first.) 4. Re MySQL or PostgreSQL, I got also got confused about using the server version vs using the non-server version. (I assume I don't need both.) I'm a hobbyist, not an enterprise. Any help for my confusion? |
![]() |
![]() |
![]() |
#24 | ||
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Quote:
Quote:
I'd avoid changing anything in metadata.db. You won't cause problems if you just read it for any data you want. |
||
![]() |
![]() |
![]() |
#25 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,065
Karma: 858115
Join Date: Jan 2011
Device: Kobo Clara, Kindle Paperwhite 10
|
Starson, thanks for the clarification. For now I'm going to put this SQL thing on hold until I learn enough system admin on OSX to do complicated installs (for me anyway) like mySQL, and learn enough to build from source (such as the ODBC for SQLite discussed above.) I still want to get that ODBC working for me on OS X, and do pretty-table printing and referencing from Excel.
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Defining Metadata with "calibredb add" command line function. | macr0t0r | Calibre | 3 | 03-01-2012 07:36 PM |
metadata query | turbotoes | Calibre | 2 | 12-27-2010 06:19 AM |
Bash Script/SQL Query for ISBN in filename? | zenrhino | Calibre | 1 | 09-26-2010 08:55 AM |
Editing the date in metadata query | Cyclops | Calibre | 11 | 09-22-2010 11:58 AM |
SQL Queries | iain_benson | Calibre | 9 | 06-04-2009 06:08 PM |