BiblioteQ
A Library Application
Document Version 1.25
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 LTS, SQLite, and YAZ are supported. BiblioteQ also supports the PostgreSQL database engine. Qt 4.8.x is considered obsolete and is not supported. The YAZ library is optional and can be removed by modifying the Qt project files.
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.
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.
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.
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 should 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 database transaction is committed.
Please note that leading and trailing spaces will be removed from user names during the database-recording process.
The BiblioteQ.INI file contains interface settings. The file resides in the user’s home directory within the .biblioteq folder. Editing should be performed with care.
The BiblioteQ.conf file contains Amazon, SRU, Z39.50, and other information. Please edit this file using a text editor.
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.
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.
BiblioteQ supports PostgreSQL 8.x, 9.x, and newer. Please note that PostgreSQL 8.x and 9.x are not supported by PostgreSQL. Please follow the PostgreSQL-provided documentation for installing PostgreSQL. After installing the required PostgreSQL packages, please perform the following operations:
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.Execute createlang plpgsql -d xbook_db or the PostgreSQL-recommended procedure for adding a new programming language to the xbook_db database. If the language already exists, PostgreSQL will produce an error. Please ignore the error.
3.If desired, replace all instances of the default administrator xbook_admin in the postgresql_create_schema.sql file. A password may also be set afterwards.
4.Log into your PostgreSQL xbook_db database and load the postgresql_create_schema.sql file via \i postgresql_create_schema.sql.
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 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 avoid including columns of type QByteArray in the custom query as the associated data will burden the software.
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.
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 browser is available for PostgreSQL and SQLite databases.
The process of committing changes to a database is as follows:
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.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.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.The current database transaction is committed.
To disconnect from a connected database, click the File menu. Then click the Disconnect option.
•Initial version.
•New Tools menu image.
•Corrected Configure Administrator Privileges button name.
•Corrected Index entries.
•ASIN support for Amazon image retrieval.
•PostgreSQL unaccent().
•Various structure changes.
•Open Library images.
•SQL injections information.
•Exporting of Members Browser table view.
•Hyperlinks are available for PostgreSQL databases only.
•Importing of books from CSV files is now supported.
•New import information.
•New export information.
•Information pertaining to translated database entries.
•Open Library information.
•Added Database Content page.
•New PostgreSQL Benefits page.
•New information added to various sections.
•New File Attachments page.
•New Files Browser information.
•Removed Qt 4.x support.
•Grey Literature reservations.
•Android!
•Qt 6.2 LTS!
•Documented the BiblioteQ.INI and BiblioteQ.conf files.
•Added new information throughout the document.
•Corrected spelling.
•Open Library section.
•Replaced images.
•.New Special Data section.
•.Publication dates format.
•.Describe terminal options.
•.Revised images.
•.Added information throughout the document.
•.New Database Layouts section.
•.Describe special-executable command-line option.
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.
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.
Several categories (books, grey literature, journals, magazines) include file attachments. Attached files are compressed before being inserted into the respective database. BiblioteQ employs the ZLIB algorithm for compression.
BiblioteQ supports embedded hyperlinks. 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.
BiblioteQ provides an import mechanism for importing book and patron data contained in a CSV file. Please review the Tools menu.
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.
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. Not available for SQLite databases.
Database Enumerations
Display the Database Enumerations Browser window. Only available for administrator and librarian accounts.
Exit BiblioteQ
Terminate the application.
The Members Browser is available from 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 granted.
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 patrons 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.
A patron’s reservation history may be accessed via the Member’s Reservation History window. Reservation histories are initially disabled.
BiblioteQ supports the Open Library Internet search query for books.
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.
BiblioteQ supports PDF content through the Poppler open source library. Browsing, printing, and searching options are included. Support is optional.
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.
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.
•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
PostgreSQL is an open-source relational database management system. Some of the benefits of PostgreSQL include:
•High standards compliance.
•Indices.
•Networking.
•Notifications.
•Procedural languages.
•Replication.
•Rich data types.
•Roles.
•Schema support.
•Transactions.
•Triggers.
•User-defined types.
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.
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]
Please read previous section.
[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.
password
Account password. Optional.
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.
timeout
Maximum number of seconds for the query to complete.
username
Account username. Optional.
yaz_
Configure YAZ options. The option (yaz_option minus yaz_) must be supported by the YAZ library. For example, yaz_charset and yaz_databaseName are suitable options.
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.
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.
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.
Selected items may also be returned via the All Reserved category.
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.
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.
Dates are recorded in MM/dd/yyyy format.
ISBNs are recorded without hyphens.
--open-postgresql-database <name-of-database>
Connect to the specified PostgreSQL database. The connection is established via the guest account.
--open-sqlite-database <absolute-path-of-database-file>
Open the specified SQLite database file.
--special-executable <absolute-path-of-executable>
The argument provided to special-executable will appear in Tools → External Applications. The environment variable BIBLIOTEQ_DATABASE_NAME is available to the new process. Multiple special-executable instances are allowed. Please note that BiblioteQ does not validate the paths of the applications.
Translations are incomplete. Translating BiblioteQ text is 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.
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.
It may be necessary to upgrade an existing BiblioteQ SQLite database schema after a software release. An upgrade tool is available via the Tools menu. A confirmation prompt is displayed before the process is initiated. After the upgrade process is completed, a dialog depicting the results of the upgrade will be displayed. Please create a backup of the SQLite database before upgrading it.
Index
21264 36
Accessing an Existing SQLite Database 12
Add Item 7, 30
admin 8
administrator 7 f., 17, 30 ff., 38, 46 f.
Administrator 38
Administrator Browser 8, 31, 38
Administrator Guide 4
All Requested 45
All Reserved 47
Alpha 36
AMD 36
Android 22, 36
ARM 36
ASIN 21
ASINs 42
back_url 43
biblioteq_patron 33
biblioteq.conf 42, 49
BiblioteQ.conf 10, 23
BiblioteQ.INI 9, 23
Book Binding Types 17
books 7, 26, 35, 45, 49
Books 46
Branch Name 6, 12
Branch Selection 5, 31, 42
Category 45
Change Password 31
circulation 31, 33, 46 f.
Circulation 38
Clear 5
compact discs 7, 45 f.
Configure Administrator Privileges 8, 21, 31
Connect 5, 12, 31
connection_options 42
Copy Browser 46
Create 7
createdb 13
createlang 13
Creating an SQLite Database 12
CSV 25, 28
Custom Database Query 31
Custom Query 15
Database Enumerations 17, 31
Database Enumerations Browser 17, 32, 46
Database Search 31
database_name 42 f.
database_type 42
Delete Selected Item(s) 30
digital video discs 7, 45 f.
Disconnect 20, 31
Display Members Browser 31
Due Date 46
Duplicate Selected Item(s) 30
Error Log 24
Exit BiblioteQ 32
Export Table View as CSV 25
File 5, 12, 14, 20, 25
Files Browser 31
format 44
FreeBSD 36
front_url 43
Grant Privileges 33
grey literature 7, 26
grey literatures 45 f.
guest 31, 38
host 42
hostname 42
HTTP 42 f.
hyperlinks 27
Hyperlinks 21
Item Creation 30, 38 f.
Item Deletion 30, 38 f.
Item Reservation Status 47
Item Reservations 31, 38 f.
Item Returns 38 f.
Item Updates 30, 39
journals 7, 26, 45 f., 49
librarian 7, 17, 32
Librarian 38
LIMIT 29
Linguist 52
Linux 36
local_db 6, 12
Mac OS X 36
magazines 7, 26, 45 f., 49
Member Creation 39
Member Deletion 39
Member Updates 39
Member’s Reservation History 34
Members Browser 21, 46
membership 31, 33
Membership 38
Modify Selected Item(s) 30
name 43 f.
New SQLite Database 14
None 42 f.
OFFSET 29
Open Library 21, 35
OpenBSD 36
OS/2 36
Pagination 29
password 11, 44
Password 12
Password Selection 11, 31
path 42
patron 30, 38
patrons 45
PDF 37
photograph collections 7
plpgsql 13
Poppler 37
port 42, 44
postgresql 42
PostgreSQL 4, 7 f., 12 f., 29, 33, 38, 45 ff.
postgresql_create_schema.sql 13, 38
postgresql_update_schema.sql 53
PowerPC 36
Print Current View 30
proxy_host 42 ff.
proxy_password 42 f.
proxy_port 42 ff.
proxy_type 42 f.
proxy_username 42 f.
Qt 36, 52
Qt 6.2 LTS 23
Qt LTS 4
Recent SQLite Files 5
record_syntax 44
Refresh Table 31
Request Selected Item(s) / Cancel Selected Request(s) 30
Reservation Histories 39
Reservation Status 47
Reserve 46
Reserve Selected Item 31, 46
Save Changes 8
Select SQLite Database 6
Select Viewable Columns 30
Socks5 42 f.
SQL injections 21
sqlite 42
SQLite 4 f., 7, 12, 14, 29, 33, 36, 54
SRU 49
ssl_enabled 43
Sun UltraSparc 36
System 42 f.
Telephone 45
timeout 44
Tools 21, 28, 54
Translations 52
unaccent() 21
unaccent() 41
upgrade 54
url_isbn 43
url_issn 43
Userid 12
username 44
video games 7, 45 f.
View 24, 33, 47
View Member’s Reservation History (Patrons Only) 30
View Selected Item(s) 30
Windows 36
xbook_admin 13, 38
xbook_db 13
YAZ 4, 36
yaz_ 44
Z39.50 49
Administrator Privileges 8
[Amazon Back Cover Images] 42
[Amazon Front Cover Images] 42
[Branch-1] 42
[Open Library Cover Images] 43
[Open Library] 43
[SRU-1] 43
[Z39.50-1] 43