Miskatonic University Press

How to install Zotero 7 on Windows

zotero

I didn’t see any short videos showing how to install Zotero 7 on Windows, so I made one: How to install Zotero 7 on Windows. There are a lot of great videos out there showing how to install and use Zotero (mostly done by librarians) but they’re longer and cover much more than just the installation. I was after something quick I can send out before a Zotero workshop.

Here it is at the Internet Archive. It is licensed with a CC BY 4.0 license, so you can use, share and adapt it, but must give credit.

Video on Internet Archive

It shows just the basics in 05:40 and I hope it’s useful to others. It could be better, and if I redo it I’ll record the audio using a proper microphone, but it’s good enough for next week, which is when I need it.

I wish there was one like this for Macs …

Technical details

For my future reference, here’s how I did it.

I run Ubuntu, so I needed a Windows machine. Library IT loaned me a clean Windows laptop with some basic applications installed but that wasn’t locked down. I installed OBS and used that to record the video. It took a few takes, of course, but I ended up with a recording that was good except for some stuff at the beginning and a short chunk in the middle.

I avoid handling video and I have almost no experience with any editor, so I fell back on the magnificently powerful and arcane command line program ffmpeg. You can do pretty much anything with audio or video with ffmpeg, but by Jove, its incantations can be complex.

From OBS I had saved a video named zotero-on-windows-raw.mkv (the suffix means it uses the Mastroska format, but don’t ask me about video containers). To pull out the two sections I wanted, I ran this to extract them into two new files. -ss means “start at this timestamp” and -to means “go up to this timestamp.”

ffmpeg -i zotero-on-windows-raw.mkv -ss 00:48 -to 05:39 zotero-1.mkv
ffmpeg -i zotero-on-windows-raw.mkv -ss 06:12 -to 07:01 zotero-2.mkv

To combine them, first I made demux-list.txt:

file './zotero-1.mkv'
file './zotero-2.mkv'

Then I combined the two videos into one with:

ffmpeg -f concat -safe 0 -i demux-list.txt -c copy zotero-combined.mkv

There’s probably some way to tell ffmpeg to do all this with one command but this worked.

With the video ready, I made a .srt SubRip subtitles file, and refined it until I was happy. I ran this to watch the video with the captions:

vlc zotero-combined.mkv --sub-file zotero.srt

The subtitles file looks like this:

1
00:00:01 --> 00:00:05
This short video will show how to install Zotero on a Windows computer,

2
00:00:05 --> 00:00:08
and how to connect it with three web browsers:

3
00:00:08 --> 00:00:12
Chrome, Firefox, and Edge.

I looked at Sacha Chua’s subed Emacs mode, but it seemed like too much to be getting into for this simple demonstration. Maybe next time.

The audio track needed work but in the end I decided to leave it as is.

Finally, I wanted to “burn” the subtitles into the video so they would always show. This is supposed to work but didn’t:

ffmpeg -i zotero-combined.mkv -vf subtitles=zotero.srt zotero-with-subtitles.mkv

No matter what I tried it would give errors like this:

Parsed_subtitles_0 @ 0x6174c4ac0e80] Unable to open zotero.srt
[AVFilterGraph @ 0x6174c4abf840] Error initializing filters
[vost#0:0/libx264 @ 0x6174c4acd080] Error initializing a simple filtergraph
Error opening output file zotero-with-subtitles.mkv
Error opening output files: Invalid data found when processing input

I tried all sorts of things, including converting the video to other formats and turning the subtitles into the .ass format, which is a real thing. (Whether ffmpeg had been compiled --with-libass needed to be checked.) Nothing worked. I thought perhaps it was a character encoding problem, so I added a smiley emoji so the file would be seen as UTF-8, but that didn’t help. I even installed Kdenlive, a video editor, but it couldn’t handle the SRT file. It’s a mystery.

Happily, I found this answer on Stack Overflow about mkvmerge and it worked perfectly:

sudo apt install mkvtoolnix
mkvmerge -o zotero-combined-subtitled.mkv zotero-combined.mkv zotero.srt

Lastly, I tweaked the metadata a bit:

ffmpeg -i zotero-combined-subtitled.mkv -metadata title="How to install Zotero 7 on Windows" -metadata language="en" -c copy zotero-7-how-to-install-on-windows.mkv

And with that it was ready. Next time I’ll try a graphical video editor. Many thanks to everyone who understands video and makes these tools to handle it!

In C on Bandcamp

terry.riley

The Great Eastern

great.eastern radio

I’m listening to The Great Eastern again. It’s not well known now, but it’s a masterpiece. It ran on CBC Radio in the late 1990s and every episode, plus background material and some scripts, is available on The Great Eastern web site. The shows are also available from the Internet Archive, but I realized it should be easier for everyone to get the show, so I made this:

RSS RSS feed for The Great Eastern.

Put that into your podcast program and it will get every episode of the show for you (from the Internet Archive, so as not to put a strain on the site made by Gerry Porter; I was sorry to learn he died in 2016).

I’ve written about the show before, and refer you to this post from 2014 for more background.

The Great Eastern, “Newfoundland’s cultural magazine,” was a show on the BCN (Broadcasting Corporation of Newfoundland), which CBC Radio picked up sometimes to carry across Canada. The show was hosted by Paul Moth and featured book reviews with Kathleen Hanrahan, a political panel, documentaries (there’s a great one on Economology), music, interviews and features on artists such as Ned Brocklehurst and Hugh Kuva, promos for other shows (such as “Look It’s” and children’s program “Uncle Jack’s Shack”), and more. The BCN (“coal-fired radio” built with Krupps-Funkenscheit technology) broadcast in Newfoundland at 520 on the long wave and had a rich history; every episode had a “From the Vault” feature where Director of Radio Ish Lundrigan would play some tape from the station archives, sometimes from old episodes of The Great Eastern when it was hosted by Ron Gellately. The show was firmly grounded in Newfoundland culture and history, often featuring people from the University of Newfoundland at St. John’s (the UNSJ) and in later seasons having a special on Oougoubomba, Newfoundland’s failed African colonial experiment. The listener gets a good picture of life in St. John’s, with its popular local candy Furlong Knobs, restaurants such as Chez Ed, and the fancy Hotel Palmer Hotel. Canadians could participate in the “What’s That Noise from Newfoundland?” contest.

My wrinkly Great Eastern t-shirt
My wrinkly Great Eastern t-shirt

But none of this is real. Well, almost none. St. John’s and Newfoundland are real. There was a Broadcasting Corporation of Newfoundland. The musicians and bands played were real. Pretty much everything else was made up. The Great Eastern writers and performers built a complete alternate Newfoundland universe (one where Canada is treated as a separate nation) and played it absolutely straight. To fully appreciate The Great Eastern you need to be ready to play the game. Accept it as true.

It is incredibly funny, going from very smart and biting satire to rude schoolboy jokes.

If you listen to podcasts and like long-form narrative shows, and are willing to enter an unfamiliar but fascinating world—Newfoundland—you should try this show. It was nineties radio and sounds like it (it’s mono, not stereo) but that shouldn’t put you off, and the sound design within that constraint is outstanding. (Always listen right to the end of a show, for community announcements from Rita Molloy or an update from weather watchdog Erling Biggs.)

Cover of Strangers & Others: The Great Eastern
Cover of Strangers & Others: The Great Eastern

It will take a while to go through all the episodes. Enjoy. While I’m at it, I’m enjoying reading Strangers and Others: The Great Eastern by Stan Dragland. I was at the Toronto book launch in 2016 and my copy is signed by Dragland and Paul Moth (“yours in coal-fired radio”).

(Paul Moth was played by Mack Furlong, one of the writers along with Edward Riche and Steven Palmer, both of whom also performed. Steven Palmer is now a history professor at the University of Windsor.)

CBC disliked the show because it was “too dense.” It wanted something that didn’t require so much attention, that was a little “less foreground.” The Great Eastern addresses this. And it does require attention, but it deserves it, and rewards it. Attend to the shows as you would an audiobook or straight radio drama and you will get all the more from it. Dragland’s book brings a lot of this out. You don’t need to catch all the details, but if you do, your appreciation will grow to match the levels of old admirers like me.

For example, the regular political panel is there right in the first episode, with J. Richard Candow, Ariel Flint and Carl Johnson. Johnson is always on the phone from some other location and hardly ever gets a word in. The way he’s a second behind the others, and usually ignored, is hilarious. But there’s an obscure gag: he is “Valdmanis Chair in Political Economy at UNSJ.” This would be an endowed chair at a non-existent university, named after Alfred Valdmanis, the Nazi-collaborating Latvian who was made Director General of Economic Development in 1950 and put in charge of industrializing Newfoundland. By 1954 he was in jail for corruption. (For more, see Alfred Valdmanis and the Politics of Survival by Gerhard P. Bassler.) Valdmanis is real but seems fictional. Ari Uldmanis, BCN’s Director of Engineering, is fictional but seems real, though whether you’re suspicious of his German accent and how he emigrated to Newfoundland after World War Two is up to you.

Librarian and archivist readers will appreciate this, from season four episode two, in a promotion for BCN’s “University of the Air.”

Shhh! This Monday at ten, pay a visit to the information desk when University of the Air presents Dr. Dana Burton’s “Introduction to Library Science:” “The Joy of Reference,” “Put a Hold on This,” and “Mummy, What’s a Card Catalogue?” Dr. Burton also looks at library administration in the current fiscal climate: outstanding fines and the use of goon squads, turning user data into direct marketing millions, and profitable things to do with those old books that nobody reads any more. Lost in the stacks? Don’t get all dewey-eyed and decimal about it. You’re overdue for University of the Air’s “Introduction to Library Science,” this Monday at ten o’clock, only on BCN 520.

Turning user data into direct marketing millions. That is one damned fine throwaway gag from 1997.

If I’m ever in St. John’s I’ll go to Memorial University (which is real) and look at the fonds for the show in the university archives. Notes from the description of the collection say:

The Great Eastern aired until 1999, when, during the Corporation’s cost-cutting process, CBC’s Variety Department offered to move the show to the afternoon as part of Definitely Not the Opera, considered by the creators to be “a soulless program that none of us had any respect for.” The writers decided to move on “after the most rewarding creative experience of our lives.”

It’s all there for you to enjoy.

For background, check The Great Eastern on Wikipedia, and it’s worth looking into the history of Newfoundland and Labrador. The province only joined Canada in 1949; before that it had been a British colony then a dominion of the Empire. In the Great Depression the unelected Commission of Government was set up—I think this is referred to as “the dictatorship” in the show—and stayed in power until a slim majority of people voted in a 1948 referendum to join Canada. The Great Eastern has several references to Joey Smallwood “surrendering to the Canadians.” All this, and the way the show was done with a completely straight face, led to confusion among Canadian listeners about how much of it was real. Who’s to say?

Robert Hughes and Marcel Duchamp

marcel.duchamp quotes

A quote from Robert Hughes from Things I Didn’t Know: A Memoir (New York: Alfred A Knopf, 2006), p. 326.

I did a program with Marcel Duchamp, to go with his retrospective at the Tate. In the course of this I asked Duchamp if he would mind signing my catalog. Obligingly, the old gentleman did so. “So is this a readymade now?” I asked. (A “readymade” was a class of object, more or less invented by Duchamp, which is chosen by an artist for its esthetic or other interest and designated, by that artist, to be a work of art. Examples: the famous porcelain urinal exhibited by Duchamp in New York as Fountain, or the spiky bottle-drying rack.) “Oh no, Monsieur Hughes,” he retorted gently. “You chose it.”

Framework 912: framework:afield

art framework listening.to.art field.recordings

I’m delighted that episode 912 of the wonderful radio show framework is a contribution by me: it’s an instalment of the framework:afield series that runs on alternate weeks. The episode is made of selections of some of my favourite recordings from Listening to Art, with a few voiceovers with quotes. (See also the notes and bibliography.) It’s best heard on headphones or full range speakers.

Waveforms of field recordings used
Waveforms of field recordings used

Many, many thanks to Patrick McGinley for running it. It’s an honour to be part of the series. If you don’t already listen to the show, do try it. You’ll hear great things. See this 2021 piece in The Wire for more about it.

I’ve done a few introductions to regular episodes, and in 2019 France Audio Montage was part of framework:afield as episods #691 and #693.

(Disclosure: I am also a regular donor to the show. That gets me the voiceover-free edition of the regular show, which comes out a couple of days early. I listen to it, then get the broadcast edition when it’s out and listen to it as well.)

Stickers from AnneArchy

vagaries

I got some great stuff from AnneArchy, a radical solo operation out of Michigan selling small hand-made stickers, buttons and bookmarks, including these:

Various stickers (with a Canadian quarter for scale)
Various stickers (with a Canadian quarter for scale)

My order was lost by Canada Post, but Anne was quick to help me get it sorted out—she was able to claim for the loss, then sent me a replacement with another shipper, and even included a free bookmark (“Ban Bigotry, Not Books”). The packaging and ephemera are lovely and done with great care.

Everything is designed, printed, cut and assembled by Anne, all with home equipment. The cutting is done with a Silhouette machine. These things were new to me, and I spent a while looking at videos of them and Cricuts, and what they can do is amazing. (Mind you, it’s a world of proprietary software and hardware, so I’m not going to buy one.) They get used a lot by stationery and planner people who want to make their own inserts for Filofaxes and the like. The Toronto Public Library has a high-quality cutter at its fabrication studio and I am going to try it.

I got multiples of several and will be giving them away to friends and colleagues. Have a look at what’s available. If you like books and libraries (or cats and hot water bottles), and don’t like bigots and authoritarians interfering in your life, you’ll find something you want.

Edward Ardizzone, On the Illustrating of Books

art edward.ardizzone

I saw a mention of “On the Illustrating of Books” (PLA Quarterly, 1957, vol. 1 no 3.) by Edward Ardizzone and was delighted to find it, and the rest of volume one, openly available from the Private Libraries Association (“an international society of book collectors – collectors of rare books, fine books, single authors, special subjects, and, above all collectors of books for the simple pleasures of reading and ownership”).

This wonderful short article has much wisdom.

The training of the born illustrator, if any, is academic in the true sense, which is the learning of the right way to draw things rather than the particular way to draw a particular thing.

The born illustrator’s method of drawing is usually what I call the empirical one, a matter of trial and error. For example, should he want to draw something and is not entirely certain how to do so, instead of finding the object and drawing directly from life, he is more likely to practice drawing it, doing it over and over again, until it looks right on paper. This gives his drawing that personal quality which is usually his.

Just as the author’s world, if he is a novelist, is not reality but a semblance of it, so must the illustrator’s world not be reality but a semblance of it created specially to fit the author’s.

The truth is that it is not the illustrator’s job to supplant the reader’s imagination but rather to help it, and to give it ground to work on. It follows, I think, that dramatic scenes are best avoided. It is the view from the window, the picnic in the fields, the mystery of the empty room, rather than sudden death or violent action that should be the illustrator’s subjects. In any case violence is usually better described in words, and it is not the illustrator’s business to dot the i’s and cross the t’s of the author

Mark Fisher marginalia

quotes

I read a York University Libraries copy of Mark Fisher’s Capitalist Realism: Is There No Alternative? (Zero Books, 2009). Right near the end he says (pp. 79–80):

New forms of industrial action need to be instituted against managerialism. For instance, in the case of teachers and lecturers, the tactic of strikes (or even of marking bans) should be abandoned, because they only hurt students and members (at the college where I used to work, one-day strikes were pretty much welcomed by management because they saved on the wage bill whilst causing negligible disruption to the college). What is needed is the strategic withdrawal of forms of labour which will only be noticed by management: all of the machineries of self-surveillance that have no effect whatsoever on the delivery of education, but which managerialism could not exist without.

Two different earlier readers had been writing penciled notes in the margins through the book. To the “pretty much welcomed” line, one added:

Then maybe you need bigger strikes! & the ability to negotiate back-to-work protocol that gets you those lost wages! ’Course you’ll still have to cover all the material!

See also the labour disruptions section in Wikipedia’s entry on York University.

Books and chapters in Zotero

zotero

Last week I had two questions about book-chapter relations in Zotero. Is there a good way of handling them and making it easier to cite different chapters from the same book? This question arises in research fields where it’s common to publish edited collections, where editors oversee an entire book but each chapter is written by different authors. It’s rare to see these kinds of books in regular bookstores and libraries, but in academic libraries we see them a lot. It’s equivalent to citing poems or short stories collected in an anthology.

Can we manage this nicely in Zotero? Not really, it turns out. In your head, you know the chapters are part of the book. Structurally, the book contains the chapters. Maybe the print book is sitting on the table in front of you and physically the covers contain the chapters. In Zotero, however, the chapters and the book are at the same level: they are all equal items in the library. This makes part-whole relations more difficult.

I asked about this on Mastodon last week and got some good replies, so I’m writing this to document what I understand of it all, which isn’t much. Any mistakes I’ve made, or things I’ve overlooked, please let me know. This won’t fix anything for anyone, but I thought it was still worth noting.

Citing book sections

Let’s start with citing. You might want to cite just one chapter from one of these edited collections. Citation style guides have rules for this—see for example the Chicago Manual of Style’s sample citations for a chapter or other part of an edited book. You might want to cite two or three chapters from one book—each deserves its own citation because it’s an individual work—and CMOS 18 14.10 (paywalled), “Several contributions to the same multiauthor book,” says:

If two or more contributions to the same multiauthor book are cited, the book itself, as well as the specific contributions, may be listed in the bibliography. The entries for the individual contributions may then cross-refer to the book’s editor, thus avoiding clutter. In notes, details of the book may be given the first time it is mentioned, with subsequent references in shortened form.

It gives this example, with notes:

  1. William H. Keating, “Fort Dearborn and Chicago,” in Prairie State: Impressions of Illinois, 1673–1967, by Travelers and Other Observers, ed. Paul M. Angle (University of Chicago Press, 1968), 84–85.

  2. Sara Clarke Lippincott, “Chicago,” in Angle, Prairie State, 363.

And then bibliography:

Draper, Joan E. “Paris by the Lake: Sources of Burnham’s Plan of Chicago.” In Zukowsky, Chicago Architecture.

Harrington, Elaine. “International Influences on Henry Hobson Richardson’s Glessner House.” In Zukowsky, Chicago Architecture.

Zukowsky, John, ed. Chicago Architecture, 1872–1922: Birth of a Metropolis. Prestel-Verlag in association with the Art Institute of Chicago, 1987.

Very readable! That is nice. For author-date style, it says:

In a reference list, individual components of a multiauthor work should not be listed separately and then cross-referenced to the work as a whole (a departure from advice in previous editions that recognizes the difficulty of cross-linking references in electronic journals and similar publications). Instead, list only the multiauthor work as a whole. Components can then be mentioned in the text and cited to the collection.

This new approach (the eighteenth edition came out in September) should make things easier one day, at least for Chicago style, but I’m not going to get into that.

Example bibliography of book and chapter

Let’s start with an example I cooked up. Here’s a sample book, titled THIS IS A BOOK, as seen in Zotero. Notice it has an Editor, and Item Type is Book.

That book has a chapter, Chapter One. Here the Item Type is Book Section, and the chapter has an Author while the book has an Editor. The publication information (publisher, date, location) is the same.

There’s nothing inherent in this that says the chapter is in the book. There’s no relation between the two. We know the chapter is in the book, but Zotero doesn’t. It can make a proper Chicago citation for one chapter (exported with Zotero’s Chicago style, seventeenth edition because the update to the eighteenth is being worked on):

Sample, Marjorie Q. “Chapter One.” In THIS IS A BOOK, edited by Reginald Example, 2d ed. Toronto: Example Press, 1976.

But if I do the chapter and book, I get this, with a full citation for both the chapter and the book:

Example, Reginald, ed. THIS IS A BOOK. 2d ed. Toronto: Example Press, 1976.

Sample, Marjorie Q. “Chapter One.” In THIS IS A BOOK, edited by Reginald Example, 2d ed. Toronto: Example Press, 1976.

There’s no way to have Zotero do a short citation for the chapter and a full one for the book, as far as I can tell.

I messed around with making a stub version of the chapter item, with little information so that Zotero had to make a short citation because it didn’t have more to use, but I couldn’t get it working. I’d end up with something like this (where “n.d.” means “no date”):

Sample, Marjorie Q. “Chapter One.” In THIS IS A BOOK, edited by Example, n.d.

If you know how to get Zotero to handle citations this way, I’d love to hear how you did it. I hope I haven’t overlooked something obvious, but is everyone who’s managing this problem doing these citations by hand the hard way, or with a huge kludge?

It seems about all we can do in Zotero is tie the chapter and book together as related items. Here’s the Related tab for the book.

If I click on the plus sign (out of screenshot) Zotero pops up a menu and I can pick an item to relate. If I choose the chapter, we get this:

Clicking on “Chapter One” under Related changes the focus to the chapter, and we see there is a reciprocal relation: the chapter is related to the book.

That’s useful but limited. The relation has no type or direction: Zotero knows this item is related to that item, but we know that one is a part contained in the other, that this chapter is part of this book. Maybe an article refutes a book, or a book reviews a film. Zotero doesn’t allow us to give those details.

Requests to understand hierarchy go back a long time. Here’s Hierarchical item relationships from the Zotero forums, a thread that started in 2007, where four years ago someone helpfully added links to several other similar discussions. There don’t seem to be any plans to add this feature.

Creating sections from books, and vice versa

Zotero can generate a book section from a book, and a book from a book section. Here I right-click on the book, and the menu has a Create Book Section option:

That creates a new entry like this, which knows it’s a book section and that it’s related to the book (out of screenshot). You’ll need to add the Author field then fill in it and Title.

It works similarly the other way. This does make things easier to work with Zotero as it is, but we’re still left with chapters and books being equal in Zotero.

Chapters in a subcollection?

It occurred to me that maybe something could be done by putting chapters in a subcollection under the book, but it didn’t get anywhere.

The future?

Perhaps the change will come through or in concert with the Citation Style Language, which is where Zotero gets all its citation styles. I saw this comment from early this year in a discussion of handling multi-volume works: “There were discussions about changing the currently flat data model to a hierarchical/structured data model, which would allow for such things. But don’t expect anything to happen regarding this in the short term.” CSL is an incredible piece of work. It’s astounding how much it handles and how well it works. I’m a professional librarian, and you can trust me when I say the thousands of bibliographic citation styles that exist are almost entirely unncessary and dealing with them is maddeningly finicky. But CSL handles them, for free.

Zotero itself is a vastly complex project, with a PDF viewer and editor, cloud storage, cross-device synchronization, code that understands umpteen different publisher platforms, and more, all working on multiple operating systems. For free! It’s one of the best free and open source software projects in the world, and has made a huge difference to the lives and work of researchers of all sorts all over the world.

Many thanks to Zotero and CSL and everyone involved with the projects for all the incredible work they do!

Database queries

This section is technical. I got curious about how Zotero’s database is set up to contain all this information, and spent a little while digging into it. Exploring Zotero Data Model for Direct Database Access by GitHub user pchemguy was really helpful with this. I knew Zotero uses SQLite, but I didn’t know it uses the entity-attribute-value model, which was completely new to me. It’s good for dealing with flexible and sparse data such as bibliographic metadata, but it sure leads to a lot of table joins.

Here’s how I got started. I looked at Zotero’s documentation on its SQLite database and classified it as “too technical for me,” so I just starting poking around. I closed Zotero and ran this in a shell to open up its database, knowing where the data directory is:

sqlite3 ~/Zotero/zotero.sqlite

I ran these commands. The first two set up some formatting, then .tables outputs a list of all the database tables,

sqlite> .headers on
sqlite> .mode column
sqlite> .tables
baseFieldMappings          itemData
baseFieldMappingsCombined  itemDataValues
charsets                   itemNotes
collectionItems            itemRelations
collectionRelations        itemTags
collections                itemTypeCreatorTypes
creatorTypes               itemTypeFields
creators                   itemTypeFieldsCombined
customBaseFieldMappings    itemTypes
customFields               itemTypesCombined
customItemTypeFields       items
customItemTypes            libraries
dbDebug1                   proxies
deletedCollections         proxyHosts
deletedItems               publicationsItems
deletedSearches            relationPredicates
feedItems                  retractedItems
feeds                      savedSearchConditions
fieldFormats               savedSearches
fields                     settings
fieldsCombined             storageDeleteLog
fileTypeMimeTypes          syncCache
fileTypes                  syncDeleteLog
fulltextItemWords          syncObjectTypes
fulltextItems              syncQueue
fulltextWords              syncedSettings
groupItems                 tags
groups                     translatorCache
itemAnnotations            users
itemAttachments            version
itemCreators

Let’s try digging for a known value: the title of the book.

sqlite> SELECT * FROM itemDataValues WHERE value = "THIS IS A BOOK";
valueID  value
-------  --------------
13352    THIS IS A BOOK

Let’s find the items that have data with that value.

sqlite> SELECT * FROM itemData WHERE valueID = 13352;
itemID  fieldID  valueID
------  -------  -------
4435    44       13352
4436    44       13352

That says some items have fields with a value we know is THIS IS A BOOK, but not what the fields are. For that we need a more complex query:

sqlite> SELECT i.itemID, i.fieldID, i.valueID, f.fieldName
FROM itemData i, fields f
WHERE i.fieldID = f.fieldID
AND i.valueID = 13352;
itemID  fieldID  valueID  fieldName
------  -------  -------  ---------
4435    44       13352    bookTitle
4436    44       13352    bookTitle

All right, that’s getting somewhere. Let’s join more tables:

sqlite> SELECT i.itemID, i.fieldID, i.valueID, f.fieldName, iv.value
FROM itemData i, itemDataValues iv, fields f
WHERE i.fieldID = f.fieldID
AND i.valueID = iv.valueID
AND i.valueID = 13352;
itemID  fieldID  valueID  fieldName  value
------  -------  -------  ---------  --------------
4435    44       13352    bookTitle  THIS IS A BOOK
4436    44       13352    bookTitle  THIS IS A BOOK

Things with titles that we’re looking for: good. Let’s find more about items with IDs 4436 and 4437. I’ll skip over a few steps here, where I was joining more tables, and jump to this next query. Remember, I’m no database expert, and I’m sure there are tidier and more efficient ways to do this, but it works.

sqlite> SELECT i.itemID, i.itemTypeID, it.typeName, i.key, id.fieldID, f.fieldName, id.valueID, idv.value
FROM items i, itemData id, fields f, itemTypes it, itemDataValues idv
WHERE i.itemID = id.itemID
AND id.fieldID = f.fieldID
AND i.itemTypeID = it.itemTypeID
AND id.valueID = idv.valueID
AND i.itemID IN (4436, 4437);

itemID  itemTypeID  typeName     key       fieldID  fieldName       valueID  value
------  ----------  -----------  --------  -------  --------------  -------  --------------------------------
4436    7           bookSection  DV3YIBUF  1        title           13353    Chapter One
4436    7           bookSection  DV3YIBUF  6        date            13094    1976-00-00 1976
4436    7           bookSection  DV3YIBUF  7        language        404      eng
4436    7           bookSection  DV3YIBUF  11       libraryCatalog  11781    ocul-yor.primo.exlibrisgroup.com
4436    7           bookSection  DV3YIBUF  21       place           9267     Toronto
4436    7           bookSection  DV3YIBUF  23       publisher       13371    Example Press
4436    7           bookSection  DV3YIBUF  42       edition         13099    2d ed.
4436    7           bookSection  DV3YIBUF  44       bookTitle       13352    THIS IS A BOOK
4437    6           book         YT4DGR9U  1        title           13352    THIS IS A BOOK
4437    6           book         YT4DGR9U  6        date            13094    1976-00-00 1976
4437    6           book         YT4DGR9U  7        language        404      eng
4437    6           book         YT4DGR9U  11       libraryCatalog  11781    ocul-yor.primo.exlibrisgroup.com
4437    6           book         YT4DGR9U  21       place           9267     Toronto
4437    6           book         YT4DGR9U  23       publisher       13371    Example Press
4437    6           book         YT4DGR9U  42       edition         13099    2d ed.

There we have the chapter and the book, with all the publishing information detailed, and database ID numbers that show how it’s all tied together. The key, for example YT4DGR9U, is used by Zotero when it’s storing attachments on disk. Look in storage/ in your Zotero data directory and you’ll see lots of directories with names like this.

But there is nothing here about creators or relations! That information is in other tables. We can do some joins to get at the creators and their roles:

sqlite> SELECT ic.itemID, ic.creatorID, ic.creatorTypeID, c.firstName, c.lastname, ct.creatorType
FROM itemCreators ic, creators c, creatorTypes ct
WHERE ic.creatorID = c.creatorID
AND ic.creatorTypeID = ct.creatorTypeID
AND itemID in (4436, 4437);
itemID  creatorID  creatorTypeID  firstName    lastName  creatorType
------  ---------  -------------  -----------  --------  -----------
4436    1506       10             Reginald     Example   editor
4436    1509       8              Marjorie Q.  Sample    author
4437    1506       10             Reginald     Example   editor

That’s easy enough to read. The relations are trickier. With a bit of work I got this:

sqlite> SELECT ir.itemID, ir.object, ir.predicateID, rp.predicate
FROM itemRelations ir, relationPredicates rp
WHERE ir.predicateID = rp.predicateID
AND itemID in (4436, 4437);
itemID  object                                       predicateID  predicate
------  -------------------------------------------  -----------  -----------
4436    http://zotero.org/users/4291/items/YT4DGR9U  3            dc:relation
4437    http://zotero.org/users/4291/items/DV3YIBUF  3            dc:relation
4437    http://zotero.org/users/4291/items/Q32SKZ3X  3            dc:relation

What’s with those object values? They are URLs, but they don’t work. Now, as it happens, 4291 is the ID for my Zotero account (except it isn’t, I made that up just in case I shouldn’t let my ID number be known). I know that from looking at URLs when I’m looking at my account details on the Zotero site.

I didn’t look into this at all, so forgive my guess, but with an object and a predicate and a URL I got to thinking about the RDF model of triples. The DC in dc:relation is Dublin Core, a simple metadata schema that has fifteen elements, one of which is relation: “A reference to a related resource. Recommended best practice is to reference the resource by means of a string or number conforming to a formal identification system.” Simple Dublin Core leaves the relation at that, but Qualified Dublin Core (which came later and is a little more complicated) has some defined relationships, one of which is IsPartOf. Maybe in the future Qualified Dublin Core might help?

In any case, the last part of the object URI is familiar: we saw YT4DGR9U above because it is the key for item 4437. I didn’t try to pick that piece of the object value out, but with this query we can see by eye that each thing we’re interested in is related to the other. In other words, this is where it’s defined that the book is related to the chapter.

sqlite> SELECT i.key, ir.itemID, ir.object, ir.predicateID, rp.predicate
FROM items i, itemRelations ir, relationPredicates rp
WHERE i.itemID = ir.itemID
AND ir.predicateID = rp.predicateID
AND i.itemID in (4436, 4437);
key       itemID  object                                       predicateID  predicate
--------  ------  -------------------------------------------  -----------  -----------
DV3YIBUF  4436    http://zotero.org/users/4062/items/YT4DGR9U  3            dc:relation
YT4DGR9U  4437    http://zotero.org/users/4062/items/DV3YIBUF  3            dc:relation

I already knew that bibliographic metadata is difficult, and that databases are difficult, and a few hours of ploughing through this showed me in a new way that storing bibliographic metadata in a database is difficult. Adding part-whole relations seems like it would be a major project.

I enjoyed exploring the Zotero database for a little while. It gave me a better understanding of how Zotero works, and greater appreciation for all the developers who make tools and plug-ins that work with Zotero. Thank you!

PS

I asked one of DuckDuckGo’s AI chat bots to help me write some SQL queries on the Zotero database. I made a simple request, and it gave me a query that didn’t work: it referenced columns that don’t exist. I told it the query didn’t work, and it gave me a new query, which didn’t work. I told it the query didn’t work, and it gave me another query, which also didn’t work. I told it none of these queries worked and expressed some displeasure, and it asked me for help in understanding the database model. Bah!

Speaking of edited collections, my first publication was a chapter in the great Arlene Taylor’s collection Understanding FRBR: What It Is and How It Will Affect Our Retrieval Tools. She was very generous and I am forever grateful to her.

Edward Ardizzone

art edward.ardizzone

“Gentleman in a Large Hat Seated by a Window, Reading” by Rembrandt (pen and bistre with wash, on paper, 1655/66) (source: PubHist) reminds me very much of Edward Ardizzone.

Ardizzone shaded with hatching, not a wash, but there’s hatching there as well, and to me it’s very much in the Ardizzone style. For example, here’s “Self-Portrait” (pen and ink on paper, 1952) (source: Tate Gallery).

Once you know Ardizzone his work is instantly recognizable.

Browsing around I came across a really interesting YouTube video, The Art of Edward Ardizzone and the Esterbrook J Fountain Pen, which is part of Jonathan Weinberg’s “Drawing with Fountain Pens” channel. It’s a very nice introduction to the artist, and though he drew with a dip pen, not an Esterbrook, Weinberg talks about pens and nibs and finishes with an Ardizzone-style sketch of a Poussin painting. The channel is full of good fountain pen stuff. I just watched Pelikan M205 Fountain Pen: Small but Mighty, because my M205 is one of my favourite pens (I think the size is perfect).

But not only is he a fountain pen user (and restorer!), Weinberg is the curator at the Maurice Sendak Foundation, and as it happens just last week I listened to Afterwords: Maurice Sendak, on BBC Radio 3’s Sunday Feature. Weinberg is in that show! It’s fascinating, and if you’re at all interested in Sendak, I highly recommend it. All of this was a delightful coincidence.

Rembrandt, Ardizzone and Sendak: three great illustrators.

List of all blog posts