Bibliote Q
Bibliote Q
BiblioteQ
A Library Application
Document Version 1.16
1 of 47
BiblioteQ
Table of Contents
Introduction................................................................................................................................................4
Accessing an Existing SQLite Database....................................................................................................5
Adding an Item...........................................................................................................................................6
Administrator Browser...............................................................................................................................7
Change Password.......................................................................................................................................8
Connecting to a PostgreSQL Database......................................................................................................9
Creating a PostgreSQL Database.............................................................................................................10
Creating an SQLite Database...................................................................................................................11
Custom Query..........................................................................................................................................12
Database Content.....................................................................................................................................13
Database Enumerations Browser.............................................................................................................14
Disconnecting from a Database...............................................................................................................15
Document Changes..................................................................................................................................16
Version 1.00.........................................................................................................................................16
Version 1.01.........................................................................................................................................16
Version 1.02.........................................................................................................................................16
Version 1.03.........................................................................................................................................16
Version 1.04.........................................................................................................................................16
Version 1.05.........................................................................................................................................16
Version 1.06.........................................................................................................................................16
Version 1.07.........................................................................................................................................16
Version 1.08.........................................................................................................................................17
Version 1.09.........................................................................................................................................17
Version 1.10.........................................................................................................................................17
Version 1.11.........................................................................................................................................17
Version 1.12.........................................................................................................................................17
Version 1.13.........................................................................................................................................17
Version 1.14.........................................................................................................................................17
Version 1.15.........................................................................................................................................17
Version 1.16.........................................................................................................................................17
Error Log..................................................................................................................................................18
Exporting a Table View to a CSV File.....................................................................................................19
File Attachments......................................................................................................................................20
Hyperlinks................................................................................................................................................21
Importing..................................................................................................................................................22
Limitations...............................................................................................................................................23
Main Window Tool Buttons.....................................................................................................................24
Members Browser....................................................................................................................................27
Member’s Reservation History................................................................................................................28
Operating Systems...................................................................................................................................29
PDF..........................................................................................................................................................30
PostgreSQL Accounts..............................................................................................................................31
2 of 47
BiblioteQ
PostgreSQL Benefits................................................................................................................................33
PostgreSQL unaccent()............................................................................................................................34
Preparing biblioteq.conf...........................................................................................................................35
Requesting an Item...................................................................................................................................38
Reserving an Item....................................................................................................................................39
SQL Injections..........................................................................................................................................40
Returning an Item.....................................................................................................................................41
SRU & Z39.50.........................................................................................................................................42
Translations..............................................................................................................................................43
Upgrading a PostgreSQL Database Schema............................................................................................44
Upgrading an SQLite Database Schema..................................................................................................45
3 of 47
BiblioteQ
Introduction
BiblioteQ is a complex, highly-configurable, and mature library application. The software supports
large, medium, and small institutions. Personal libraries are also supported.
BiblioteQ should be functional on any operating system where Qt 5.x and newer, SQLite, and YAZ are
supported. BiblioteQ also supports the PostgreSQL database engine. Qt 4.8.x is considered obsolete
and is not supported.
The source of BiblioteQ is available at https://github.com/textbrowser/biblioteq.
The purpose of this document is to detail the functionality of BiblioteQ. Installation instructions are not
described in this document. Please refer to the Administrator Guide document for installation
information.
4 of 47
BiblioteQ
The Recent SQLite Files sub-menu contains a list of BiblioteQ’s recently-accessed SQLite files. If an
SQLite file is selected, the specified SQLite database is opened. Please note that BiblioteQ will first
close an existing database, if one is open, before opening the specified database. A Clear option is also
included in the sub-menu. If Clear is activated, the list of the recently-accessed SQLite files is emptied.
BiblioteQ will remove duplicate sqlite_db_ entries from the INI file shortly after the application is
launched. Also removed will be entries whose corresponding files lack read and write permissions.
The second method of accessing an SQLite database is through the Branch Selection dialog. The dialog
may be accessed via the Connect option of the File menu.
After opening the Branch Selection dialog, select local_db as the Branch Name. This will prepare the
dialog for accessing SQLite databases. Afterwards, click on the Select SQLite Database button to
launch a file-selection dialog.
5 of 47
BiblioteQ
Adding an Item
For PostgreSQL databases, items may be added by administrator and librarian accounts. For SQLite
databases, file owners may add items.
BiblioteQ supports books, compact discs, digital video discs, grey literature, journals, magazines,
photograph collections, and video games.
To add an item, click on the Add Item tool button and select the desired category. A Create window will
be displayed. Required fields are highlighted.
Multiple items may be added simultaneously.
6 of 47
BiblioteQ
Administrator Browser
The Administrator Browser is available if an administrator role is connected to a PostgreSQL database.
The browser may be accessed via the Configure Administrator Privileges tool button.
Four roles are available. Changes must be committed via the Save Changes button.
The process of committing changes to the PostgreSQL database is as follows:
1. The table’s current state is inspected. The operator is notified of administrators without
privileges as well as duplicate administrators and the process is aborted.
2. A database transaction is prepared. If an error occurs, the process is aborted.
3. Deleted accounts are removed from the admin database table as well as from the PostgreSQL
database. If an error occurs with either sub-process, the process is aborted and the previous
changes are reverted.
4. Existing admin table entries are updated. New accounts are inserted into the admin table. If an
error occurs, the process is aborted and the previous changes are reverted.
5. Existing admin table entries are granted the specified privileges after all potential privileges are
revoked. New accounts are created in the PostgreSQL database and assigned the appropriate
privileges. If an error occurs, the process is aborted and the previous changes are reverted.
6. If all of the aforementioned statements execute correctly, the transaction is committed.
Please note that leading and trailing spaces will be removed from user names during the database-
recording process.
7 of 47
BiblioteQ
Change Password
A PostgreSQL account’s password may be changed via the Password Selection dialog. A password
must contain at least eight characters. Guest accounts are excluded.
8 of 47
BiblioteQ
Select the appropriate non-local_db Branch Name if one is available. Provide the Password and Userid
information, if applicable, and press the Connect button.
Note: The sections Accessing an Existing SQLite Database and Creating an SQLite Database cover the
details of accessing and creating SQLite databases, respectively.
9 of 47
BiblioteQ
10 of 47
BiblioteQ
After the option is selected, a file-selection dialog is displayed. An existing or a new file may be
specified. A confirmation dialog is displayed if an existing file is selected.
Once the SQLite database file has been initialized, BiblioteQ will open it. If a database is already open,
a confirmation prompt is displayed. If confirmed, the current database is closed and the newly-created
database is opened.
11 of 47
BiblioteQ
Custom Query
Custom SQL queries may be performed via the Custom Query window.
After a successful query is performed, the main table’s columns will be set according to the query
statement. Please void including columns of type QByteArray in the custom query as the associated
data will burden the software.
12 of 47
BiblioteQ
Database Content
All content, save for configuration values, is stored in the respective database. For instance, image data
are stored in a database. Temporary data reside in the application’s memory space.
13 of 47
BiblioteQ
14 of 47
BiblioteQ
15 of 47
BiblioteQ
Document Changes
Version 1.00
• Initial version.
Version 1.01
• New Tools menu image.
Version 1.02
• Corrected Configure Administrator Privileges button name.
• Corrected Index entries.
Version 1.03
• ASIN support for Amazon image retrieval.
Version 1.04
• PostgreSQL unaccent().
• Various structure changes.
Version 1.05
• Open Library images.
• SQL injections information.
Version 1.06
• Exporting of Members Browser table view.
• Hyperlinks are available for PostgreSQL databases only.
Version 1.07
• Importing of books from CSV files is now supported.
16 of 47
BiblioteQ
Version 1.08
• New import information.
Version 1.09
• New export information.
Version 1.10
• Information pertaining to translated database entries.
• Open Library information.
Version 1.11
• Added Database Content page.
Version 1.12
• New PostgreSQL Benefits page.
• New information added to various sections.
Version 1.13
• New File Attachments page.
Version 1.14
• New Files Browser information.
Version 1.15
• Removed Qt 4.x support.
Version 1.16
• Grey Literature reservations.
17 of 47
BiblioteQ
Error Log
The Error Log may be accessed via the View menu. The window details critical exceptions which were
raised during a BiblioteQ session. The status bar of the main window will indicate whether or not the
log contains entries.
18 of 47
BiblioteQ
19 of 47
BiblioteQ
File Attachments
Several categories (books, grey literature, journals, magazines) include file attachments. Attached files
are compressed before being inserted into the respective database. BiblioteQ utilities the ZLIB
algorithm for compression.
20 of 47
BiblioteQ
Hyperlinks
BiblioteQ supports embedded hyperlinks when accessing PostgreSQL databases. If a hyperlink is
clicked, a search is initiated using the specified text for the given category. Please note that a clicked
hyperlink will not be activated if the parent widget is editable.
21 of 47
BiblioteQ
Importing
BiblioteQ provides an import mechanism for importing book data contained in a CSV file. Please
review the Tools menu.
22 of 47
BiblioteQ
Limitations
BiblioteQ does not impose limits on the data content. Please note that both PostgreSQL and SQLite
have rigid limits. Please read https://www.sqlite.org/limits.html for SQLite details.
Generally:
• Attached files may be of any size. Please note that submitting large files will burden both local
and remote queries. PostgreSQL and/or SQLite may limit field sizes.
• Infinitely-many items may be stored, although PostgreSQL and/or SQLite may prevent this.
• Pagination is implemented with the use of the LIMIT and OFFSET clauses.
• The number of PostgreSQL accounts is not limited through the software.
23 of 47
BiblioteQ
24 of 47
BiblioteQ
Available for patrons, these options allow for the requesting of items as well as for the canceling of
requested items.
Reserve Selected Item
Reserve the selected item. The tool button is disabled if the current account does not have Item
Reservations privileges.
Display Members Browser
Display the Members Browser window. Only available for administrator, circulation, and membership
accounts.
Files Browser
Display the Files Browser window.
Database Search
Activates a context menu containing various search options.
Custom Database Query
Display the Custom Query window.
Refresh Table
Reload the current view.
25 of 47
BiblioteQ
Database Enumerations
Display the Database Enumerations Browser window. Only available for administrator and librarian
accounts.
Exit BiblioteQ
Terminate the application.
26 of 47
BiblioteQ
Members Browser
The Members Browser is available off of the View menu. For PostgreSQL databases, the browser is
accessible if the current role is administrator, circulation, or membership. For SQLite databases, access
to the browser is always available.
The browser allows administrators to create, delete, and modify patron account details. Reservation
processes are also available in the Members Browser. A mechanism for exporting the listed members is
also included.
Grant Privileges
Grant Privileges is available for PostgreSQL databases. If pressed, each listed account is removed from
and added to the biblioteq_patron role.
27 of 47
BiblioteQ
28 of 47
BiblioteQ
Operating Systems
BiblioteQ supports FreeBSD, Linux, Mac OS X, OS/2, OpenBSD, and Windows. Generally, the
application should be compatible with any operating system where Qt, SQLite, and YAZ are supported.
The software has also been tested on a variety of architectures, including AMD, ARM, Alpha 21264,
PowerPC, and Sun UltraSparc.
29 of 47
BiblioteQ
PDF
BiblioteQ supports PDF content through the Poppler open source library. Browsing, printing, and
searching options are included. Support is optional.
30 of 47
BiblioteQ
PostgreSQL Accounts
BiblioteQ provides three tiers of PostgreSQL database roles: administrator, guest, and patron.
Initially, the postgresql_create_schema.sql script may be used to create the administrator account
xbook_admin.
Guest roles are provided a read-only interface. Patron roles are granted reservation permissions.
PostgreSQL accounts may be modified via the Administrator Browser. Please note that the
Administrator Browser is only available within an administrator role.
Additionally, there are four administrator levels: Administrator, Circulation, Librarian, and
Membership. The abilities of each level is described next.
Administrator permissions:
• Item Creation
Ability to create books, etc.
• Item Deletion
Ability to remove books, etc.
• Item Reservations
Ability to reserve items.
• Item Returns
Ability to process returned items.
31 of 47
BiblioteQ
• Item Updates
Ability to modify books, etc.
• Member Creation
Ability to create administrators and patrons.
• Member Deletion
Ability to remove administrators and patrons.
• Member Updates
Ability to update information of patrons and permissions of administrators.
• Reservation Histories
Ability to read reservation histories of patrons.
Circulation permissions:
• Item Reservations
• Item Returns
• Reservation Histories
Librarian permissions:
• Item Creation
• Item Deletion
• Item Updates
Membership permissions:
• Member Creation
• Member Deletion
• Member Updates
32 of 47
BiblioteQ
PostgreSQL Benefits
PostgreSQL is an open-source relational database management system. Some of the benefits of
PostgreSQL include:
• High standards compliance.
• Indexes.
• Networking.
• Notifications.
• Procedural languages.
• Replication.
• Rich data types.
• Roles.
• Schema support.
• Transactions.
• Triggers.
• User-defined types.
33 of 47
BiblioteQ
PostgreSQL unaccent()
BiblioteQ supports PostgreSQL's unaccent() extension. Documentation describing the unaccent()
function is located at https://www.postgresql.org/docs/current/unaccent.html.
Greek-language users may wish to supplement their unaccent.rules files with information contained at
https://gist.github.com/marinoszak/7d5d6a8670faae0f4589c2da988f2ba3. The PostgreSQL database
may require restarting after a rules file is altered.
34 of 47
BiblioteQ
Preparing biblioteq.conf
The biblioteq.conf file contains non-user settings. The location of the file varies with distribution. This
page will describe the various properties which may be defined in the biblioteq.conf file.
[Amazon Back Cover Images]
Describes required settings for retrieving book back-cover images from amazon.com.
host
Host name of the Amazon image server.
path
Path of the image file. BiblioteQ substitutes the respective ISBN in the percent sign. Please note that
ASINs may also work.
The optional properties proxy_host, proxy_password, proxy_port, proxy_type, and proxy_username are
also supported. The proxy_type property supports values of HTTP, None, Socks5, and System.
[Amazon Front Cover Images]
Describes required settings for retrieving book front-cover images from amazon.com.
host
Host name of the Amazon image server.
path
Path of the image file. BiblioteQ substitutes the respective ISBN in the percent sign. Please note that
ASINs may also work.
The optional properties proxy_host, proxy_password, proxy_port, proxy_type, and proxy_username are
also supported. The proxy_type property supports values of HTTP, None, Socks5, and System.
[Branch-1]
The first database branch.
connection_options
PostgreSQL-specific connection options. An example is connect_timeout=10;sslmode=verify-full.
database_name
The name of the database as it will appear in the Branch Selection dialog.
35 of 47
BiblioteQ
database_type
The database’s type. Must be set to postgresql or sqlite.
hostname
The host name of the PostgreSQL database server. Both IP addresses and fully-qualified domain names
may be assigned.
port
The port value of the PostgreSQL database server.
ssl_enabled
If false, SSL/TLS communications are disabled.
[Open Library]
Describes required settings for retrieving book information from openlibrary.org
url_isbn
URL of book. BiblioteQ substitutes the respective ISBNs.
[Open Library Cover Images]
Describes required settings for retrieving book cover images from covers.openlibrary.org.
back_url
URL of the back-cover image file. BiblioteQ substitutes the respective ISBN in the $value field.
front_url
URL of the front-cover image file. BiblioteQ substitutes the respective ISBN in the $value field.
[SRU-1]
Describes the first SRU site.
name
Name of the site as it will appear in the application.
url_isbn
Complete URL of the site for retrieving data via ISBNs. The tokens %1 and %2 are replaced by the
ISBN-10 and ISBN-13 fields.
url_issn
36 of 47
BiblioteQ
Complete URL of the site for retrieving data via ISSNs. The token %1 is replaced by the ISSN field.
The optional properties proxy_host, proxy_password, proxy_port, proxy_type, and proxy_username are
also supported. The proxy_type property supports values of HTTP, None, Socks5, and System.
[Z39.50-1]
Describes the first Z39.50 site. Please also see http://www.indexdata.com/yaz/doc/zoom.records.html.
database_name
The remote database name.
format
Render format. An example: marc8,utf-8.
name
Name of the site as it will appear in the application.
port
The remote database’s port number.
record_syntax
Preferred record syntax. Example: MARC21.
The optional properties password, proxy_host, proxy_port, and username are also supported.
37 of 47
BiblioteQ
Requesting an Item
PostgreSQL patrons may request one or more books, compact discs, digital video discs, grey literature,
journals, magazines, and video games. After selecting an item, please press the green Telephone tool
button. To cancel a request, please set the Category to All Requested, select the desired item, and press
the red Telephone tool button. A confirmation dialog is displayed and if accepted, the selected request
is canceled.
38 of 47
BiblioteQ
Reserving an Item
For PostgreSQL databases, items may be reserved by administrator and circulation accounts. Owners
of SQLite databases may reserve items. Books, compact discs, digital video discs, grey literature,
journals, magazines, and video games may be reserved. To reserve an item, select it in the main
window and press the Reserve Selected Item tool button. If the item is available for reservation, the
Members Browser will be displayed. Select the desired patron in the Members Browser and press the
Reserve Selected Item tool button in the Members Browser. The Copy Browser dialog is displayed.
Specify the Due Date and select the desired copy. Finalize the reservation process by clicking the
Reserve button.
Please note that the default Due Date may be modified via the Database Enumerations Browser.
39 of 47
BiblioteQ
SQL Injections
Most BiblioteQ queries are parameterized. Prepared SQL statements are resilient against SQL
injections. Please note that some fixed fields (for instance, Locations) are embedded in the statements.
40 of 47
BiblioteQ
Returning an Item
For PostgreSQL databases, reserved items may be returned by administrator and circulation accounts.
Owners of SQLite databases may return reserved items. The simplest method of identifying reserved
items is by the All Reserved category of the View menu. An item may be returned via its details
window. Open the selected item’s details and click the Reservation Status button. The Item Reservation
Status dialog is displayed. Select the copy which is about to be returned and click the Return button.
Confirm the process.
41 of 47
BiblioteQ
42 of 47
BiblioteQ
Translations
Translations are incomplete. Translating BiblioteQ text is quite simple. Please download and install Qt
from https://download.qt.io, download BiblioteQ’s source, and familiarize yourself with Qt’s Linguist.
Linguist documentation is available at https://doc.qt.io/qt-5/qtlinguist-index.html.
Literal text, for example text housed in a combination-box widget, will be recorded to a database in its
translated form. In general, BiblioteQ does not translate database entries.
43 of 47
BiblioteQ
44 of 47
BiblioteQ
45 of 47
BiblioteQ
Index
21264....................................................................29 Database Search...................................................25
Accessing an Existing SQLite Database................9 database_name................................................35, 37
Add Item...........................................................6, 24 database_type.......................................................36
admin......................................................................7 Delete Selected Item(s)........................................24
administrator.....................6p., 14, 24pp., 31, 39, 41 digital video discs..........................................6, 38p.
Administrator........................................................31 Disconnect......................................................15, 25
Administrator Browser...............................7, 25, 31 Display Members Browser...................................25
Administrator Guide...............................................4 Due Date...............................................................39
All Requested.......................................................38 Duplicate Selected Item(s)...................................24
All Reserved.........................................................41 Error Log..............................................................18
Alpha....................................................................29 Exit BiblioteQ.......................................................26
AMD.....................................................................29 Export Table View as CSV...................................19
ARM.....................................................................29 File....................................................5, 9, 11, 15, 19
ASIN.....................................................................16 Files Browser........................................................25
ASINs...................................................................35 format...................................................................37
back_url................................................................36 FreeBSD...............................................................29
biblioteq_patron....................................................27 front_url................................................................36
biblioteq.conf..................................................35, 42 Grant Privileges....................................................27
Book Binding Types.............................................14 grey literature..........................................6, 20, 38p.
books....................................................6, 20, 38, 42 guest................................................................25, 31
Books....................................................................39 host.......................................................................35
Branch Name......................................................5, 9 hostname...............................................................36
Branch Selection.........................................5, 25, 35 HTTP..............................................................35, 37
Category...............................................................38 hyperlinks.............................................................21
Change Password.................................................25 Hyperlinks............................................................16
circulation...........................................25, 27, 39, 41 Item Creation...............................................24, 31p.
Circulation............................................................31 Item Deletion...............................................24, 31p.
Clear.......................................................................5 Item Reservation Status........................................41
compact discs................................................6, 38p. Item Reservations........................................25, 31p.
Configure Administrator Privileges............7, 16, 25 Item Returns......................................................31p.
Connect.........................................................5, 9, 25 Item Updates...................................................24, 32
connection_options...............................................35 journals..............................................6, 20, 38p., 42
Copy Browser.......................................................39 librarian......................................................6, 14, 26
Create......................................................................6 Librarian...............................................................31
createdb................................................................10 LIMIT...................................................................23
createlang..............................................................10 Linguist.................................................................43
Creating an SQLite Database.................................9 Linux....................................................................29
CSV................................................................19, 22 local_db..............................................................5, 9
Custom Database Query.......................................25 Mac OS X.............................................................29
Custom Query.......................................................12 magazines..........................................6, 20, 38p., 42
Database Enumerations..................................14, 26 Member Creation..................................................32
Database Enumerations Browser..............14, 26, 39 Member Deletion..................................................32
46 of 47
BiblioteQ
47 of 47