BiblioteQ

A Library Application

Document Version 1.17

 

Table of Contents

Introduction

Accessing an Existing SQLite Database

Adding an Item

Administrator Browser

Change Password

Connecting to a PostgreSQL Database

Creating a PostgreSQL Database

Creating an SQLite Database

Custom Query

Database Content

Database Enumerations Browser

Disconnecting from a Database

Document Changes

Version 1.00

Version 1.01

Version 1.02

Version 1.03

Version 1.04

Version 1.05

Version 1.06

Version 1.07

Version 1.08

Version 1.09

Version 1.10

Version 1.11

Version 1.12

Version 1.13

Version 1.14

Version 1.15

Version 1.16

Version 1.17

Error Log

Exporting a Table View to a CSV File

File Attachments

Hyperlinks

Importing

Limitations

Main Window Tool Buttons

Members Browser

Member’s Reservation History

Operating Systems

PDF

PostgreSQL Accounts

PostgreSQL Benefits

PostgreSQL unaccent()

Preparing biblioteq.conf

Requesting an Item

Reserving an Item

SQL Injections

Returning an Item

SRU & Z39.50

Translations

Upgrading a PostgreSQL Database Schema

Upgrading an SQLite Database Schema

 

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 LTS 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.

 

Accessing an Existing SQLite Database

An existing SQLite database file may be opened via two methods. The first method involves the Recent SQLite Files option of the File menu.

 

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.

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.

 

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. 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. 2.A database transaction is prepared. If an error occurs, the process is aborted. 

  3. 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. 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. 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. 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.

 

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.

 

Connecting to a PostgreSQL Database

 
BiblioteQ supports both the PostgreSQL and the SQLite database engines. This section will cover the details involved in connecting to a PostgreSQL database.
 

Click the Connect option of the File menu.

 

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.

 

Creating a PostgreSQL Database

BiblioteQ supports PostgreSQL 8.x, 9.x, and newer. Please note that PostgreSQL 8.x has reached its end of life. Please follow the PostgreSQL-provided documentation for installing PostgreSQL. After installing the required PostgreSQL packages, please perform the following operations:

  1. 1.Create the xbook_db database via createdb xbook_db -E UTF8 or via the PostgreSQL-recommended procedure. Please note that the database name xbook_db is only a suggestion. 

  2. 2.Execute createlang plpgsql -d xbook_db or the PostgreSQL-recommended procedure for adding a new programming language to the xbook_db database. 

  3. 3.If desired, replace all instances of the default administrator xbook_admin in the postgresql_create_schema.sql file. 

  4. 4.Log into your PostgreSQL xbook_db database and load the postgresql_create_schema.sql file via \i postgresql_create_schema.sql. 

 

Creating an SQLite Database

A new BiblioteQ SQLite database file may be created via the New SQLite Database option of the File menu.

 

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.

 

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.

 

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.

 

Database Enumerations Browser

The Database Enumerations Browser is available to accounts having administrator or librarian privileges and is accessible via the Database Enumerations tool button. The browser contains configurable item values.

The process of committing changes to a database is as follows:

  1. 1.For each sub-panel (Book Binding Types, etc.), a database transaction is prepared. If an error occurs, the process iterates to the next sub-panel. 

  2. 2.All items in the respective database table are deleted. For example, for the Book Binding Types sub-panel, all entries from the book_binding_types database table are deleted. If the process fails, changes are reverted and the process proceeds to the next sub-panel. 

  3. 3.New values are inserted into the respective database table. If the process fails, changes are reverted and the process proceeds to the next sub-panel. 

  4. 4.The current database transaction is committed. 

 

Disconnecting from a Database

To disconnect from a connected database, click the File menu. Then click the Disconnect option.

 

Document Changes

Version 1.00

Version 1.01

Version 1.02

Version 1.03

Version 1.04

Version 1.05

Version 1.06

Version 1.07

Version 1.08

Version 1.09

Version 1.10

Version 1.11

Version 1.12

Version 1.13

Version 1.14

Version 1.15

Version 1.16

Version 1.17

 

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.

 

Exporting a Table View to a CSV File

The current table view’s contents may be exported to a CSV file via the Export Table View as CSV option of the File menu.

 

If clicked, a file-selection dialog is displayed.

The generated CSV file will contain comma-separated values. Values which contain commas will be encased in double-quotes. For example, A book of abstract algebra,"Pinter, Charles C.",McGraw-Hill,1990-01-01,New York,2,"Algebra, Abstract.",English,0070501386,0.00,Dollar,1,Hardcover,Home,9780070501386,89035355,QA162 .P56 1990,512/.02,1,0,Original,As New,.

The first line of the generated file contains the exported view’s header strings. The exported columns are governed by the settings in Viewable Columns.

 

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.

 

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.

 

Importing

BiblioteQ provides an import mechanism for importing book data contained in a CSV file. Please review the Tools menu.

 

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:

 

Main Window Tool Buttons

This page will describe the various tool buttons which are present on the main window.

The tool buttons are described from left to right.

View Selected Item(s)

Open the detail window(s) of the selected item(s). A confirmation prompt is displayed if the number of selected items exceeds four. The tool button is disabled if the current account has administrator privileges.

Add Item

Add an item. The tool button is disabled if the current account does not have Item Creation privileges.

Duplicate Selected Item(s)

Open the detail window(s) of the selected item(s). A confirmation prompt is displayed if the number of selected items exceeds four. The tool button is disabled if the current account does not have Item Creation privileges.

Delete Selected Item(s)

Delete the selected item(s). A confirmation prompt is displayed. The tool button is disabled if the current account does not have Item Deletion privileges.

Modify Selected Item(s)

Modify the selected item(s). A confirmation prompt is displayed if the number of selected items exceeds four. The tool button is disabled if the current account does not have Item Updates privileges.

Print Current View

Print the items in the current view. A Print dialog is displayed.

Select Viewable Columns

Select the columns that are to be shown in the main window’s table per each category (books, cds, etc.). Please note that column order is not preserved.

View Member’s Reservation History (Patrons Only)

Display the current patron’s reserved items. The tool button is enabled only for patron accounts.

Request Selected Item(s) / Cancel Selected Request(s)

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.

 

Again, the tool buttons are described from left to right.

Connect

Display the Branch Selection dialog.

Disconnect

Disconnect from the current database.

Change Password

Display the Password Selection dialog. Not available for PostgreSQL guest accounts and SQLite databases.

Configure Administrator Privileges

Display the Administrator Browser window. Only available for administrator accounts.

Database Enumerations

Display the Database Enumerations Browser window. Only available for administrator and librarian accounts.

Exit BiblioteQ

Terminate the application.

 

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.

 

Member’s Reservation History

A patron’s reservation history may be accessed via the Member’s Reservation History window. Reservation histories are initially disabled.

 

Operating Systems

BiblioteQ supports Android, 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. Please note that the YAZ library is totally optional. The software has also been tested on a variety of architectures, including AMD, ARM, Alpha 21264, PowerPC, and Sun UltraSparc.

 

PDF

BiblioteQ supports PDF content through the Poppler open source library. Browsing, printing, and searching options are included. Support is optional.

 

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:

Circulation permissions:

Librarian permissions:

Membership permissions:

 

PostgreSQL Benefits

PostgreSQL is an open-source relational database management system. Some of the benefits of PostgreSQL include:

 

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.

 

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.

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

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.

 

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.

 

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.

 

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.

 

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.

 

SRU & Z39.50

BiblioteQ supports both the SRU and Z39.50 Internet search queries for books, journals, and magazines. Sites may be defined within the biblioteq.conf file.

 

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.

 

Upgrading a PostgreSQL Database Schema

Some software releases require database schema changes. Please read the version-specific section of the postgresql_update_schema.sql file and execute the required SQL statements.

 

Upgrading an SQLite Database Schema

It may be necessary to upgrade an existing BiblioteQ SQLite database schema after a software release. An upgrade tool is available off of the Tools menu. A confirmation prompt is displayed before the process is initiated. After the upgrade process is completed, a dialog depicting abnormalities will be displayed. Please create a backup of the SQLite database before upgrading it.

 
 
Index

Index

21264        30

Accessing an Existing SQLite Database        9

Add Item        6, 25

admin        7

administrator        6p., 14, 25pp., 32, 40, 42

Administrator        32

Administrator Browser        7, 26, 32

Administrator Guide        4

All Requested        39

All Reserved        42

Alpha        30

AMD        30

Android        17, 30

ARM        30

ASIN        16

ASINs        36

back_url        37

biblioteq_patron        28

biblioteq.conf        36, 43

Book Binding Types        14

books        6, 21, 39, 43

Books        40

Branch Name        5, 9

Branch Selection        5, 26, 36

Category        39

Change Password        26

circulation        26, 28, 40, 42

Circulation        32

Clear        5

compact discs        6, 39p.

Configure Administrator Privileges        7, 16, 26

Connect        5, 9, 26

connection_options        36

Copy Browser        40

Create        6

createdb        10

createlang        10

Creating an SQLite Database        9

CSV        20, 23

Custom Database Query        26

Custom Query        12

Database Enumerations        14, 27

Database Enumerations Browser        14, 27, 40

Database Search        26

database_name        36, 38

database_type        37

Delete Selected Item(s)        25

digital video discs        6, 39p.

Disconnect        15, 26

Display Members Browser        26

Due Date        40

Duplicate Selected Item(s)        25

Error Log        19

Exit BiblioteQ        27

Export Table View as CSV        20

File        5, 9, 11, 15, 20

Files Browser        26

format        38

FreeBSD        30

front_url        37

Grant Privileges        28

grey literature        6, 21, 39p.

guest        26, 32

host        36

hostname        37

HTTP        36, 38

hyperlinks        22

Hyperlinks        16

Item Creation        25, 32p.

Item Deletion        25, 32p.

Item Reservation Status        42

Item Reservations        26, 32p.

Item Returns        32p.

Item Updates        25, 33

journals        6, 21, 39p., 43

librarian        6, 14, 27

Librarian        32

LIMIT        24

Linguist        44

Linux        30

local_db        5, 9

Mac OS X        30

magazines        6, 21, 39p., 43

Member Creation        33

Member Deletion        33

Member Updates        33

Member’s Reservation History        29

Members Browser        16, 40

membership        26, 28

Membership        32

Modify Selected Item(s)        25

name        37p.

New SQLite Database        11

None        36, 38

OFFSET        24

Open Library        16

OpenBSD        30

OS/2        30

Pagination        24

password        8, 38

Password        9

Password Selection        8, 26

path        36

patron        25, 32

patrons        39

PDF        31

photograph collections        6

plpgsql        10

Poppler        31

port        37p.

postgresql        37

PostgreSQL        4, 6p., 9p., 24, 28, 32, 39p., 42

postgresql_create_schema.sql        10, 32

postgresql_update_schema.sql        45

PowerPC        30

Print Current View        25

proxy_host        36, 38

proxy_password        36, 38

proxy_port        36, 38

proxy_type        36, 38

proxy_username        36, 38

Qt        30, 44

Qt 5 LTS        4

Qt 6.2 LTS        18

Recent SQLite Files        5

record_syntax        38

Refresh Table        26

Request Selected Item(s) / Cancel Selected Request(s)        25

Reservation Histories        33

Reservation Status        42

Reserve        40

Reserve Selected Item        26, 40

Save Changes        7

Select SQLite Database        5

Select Viewable Columns        25

Socks5        36, 38

SQL injections        16

sqlite        37

SQLite        4pp., 9, 11, 24, 28, 30, 46

SRU        43

ssl_enabled        37

Sun UltraSparc        30

System        36, 38

Telephone        39

Tools        16, 23, 46

Translations        44

unaccent()        16

unaccent()        35

upgrade        46

url_isbn        37

url_issn        37

Userid        9

username        38

video games        6, 39p.

View        19, 28, 42

View Member’s Reservation History (Patrons Only)        25

View Selected Item(s)        25

Windows        30

xbook_admin        10, 32

xbook_db        10

YAZ        4, 30

Z39.50        43

 Administrator Privileges        7

[Amazon Back Cover Images]        36

[Amazon Front Cover Images]        36

[Branch-1]        36

[Open Library Cover Images]        37

[Open Library]        37

[SRU-1]        37

[Z39.50-1]        38