Documentation for Bauble 1.0¶
Bauble is an application for managing botanical specimen collections. With it you can create a searchable database of plant records.
It is open and free and is released under the GNU Public License
not-so-brief list of highlights, meant to whet your appetite.¶
taxonomic information¶
When you first start Bauble, and connect to a database, Bauble will initialize the database not only with all tables it needs to run, but it will also populate the taxon tables for ranks family and genus, using the data from the “RBG Kew’s Family and Genera list from Vascular Plant Families and Genera compiled by R. K. Brummitt and published by the Royal Botanic Gardens, Kew in 1992”. In 2015 we have reviewed the data regarding the Orchidaceae, using “Tropicos, botanical information system at the Missouri Botanical Garden - www.tropicos.org” as a source.
importing data¶
Bauble will let you import any data you put in an intermediate json format. What you import will complete what you already have in the database. If you need help, you can ask some Bauble professional to help you transform your data into Bauble’s intermediate json format.
synonyms¶
Bauble will allow you define synonyms for species, genera, families. Also this information can be represented in its intermediate json format and be imported in an existing Bauble database.
scientific responsible¶
Bauble implements the concept of ‚accession‘, intermediate between physical plant (or a group thereof) and abstract taxon. Each accession can associate the same plants to different taxa, if two taxonomists do not agree on the identification: each taxonomist can have their say and do not need overwrite each other’s work. All verifications can be found back in the database, with timestamp and signature.
helps off-line identification¶
Bauble allows you associate pictures to physical plants, this can help recognize the plant in case a sticker is lost, or help taxonomic identification if a taxonomist is not available at all times.
exports and reports¶
Bauble will let you export a report in whatever textual format you need. It uses a powerful templating engine named ‚mako‘, which will allow you export the data in a selection to whatever format you need. Once installed, a couple of examples are available in the mako subdirectory.
annotate your info¶
You can associate notes to plants, accessions, species, …. Notes can be categorized and used in searches or reports.
garden or herbarium¶
Management of plant locations.
database history¶
All changes in the database is stored in the database, as history log. All changes are ‚signed‘ and time-stamped. Bauble makes it easy to retrieve the list of all changes in the last working day or week, or in any specific period in the past.
simple and powerful search¶
Bauble allows you search the database using simple keywords, e.g.: the name of the location or a genus name, or you can write more complex queries, which do not reach the complexity of SQL but allow you a decent level of detail localizing your data.
database agnostic¶
Bauble is not a database management system, so it does not reinvent the wheel. It works storing its data in a SQL database, and it will connect to any database management system which accepts a SQLAlchemy connector. This means any reasonably modern database system and includes MySQL, PostgreSQL, Oracle. It can also work with sqlite, which, for single user purposes is quite sufficient and efficient. If you connect Bauble to a real database system, you can consider making the database part of a LAMP system (Linux-Apache-MySQL-Php) and include your live data on your institution web site.
language agnostic¶
The program was born in English and all its technical and user documentation is still only in that language, but the program itself has been translated and can be used in various other languages, including Spanish (86%), Portuguese (100%), French (42%), to name some Southern American languages, as well as Swedish (100%) and Czech (100%).
platform agnostic¶
Installing Bauble on Windows is an easy and linear process, it will not take longer than 10 minutes. Bauble was born on Linux and installing it on ubuntu, fedora or debian is also rather simple. It has been recently successfully tested on MacOSX 10.9.
easily updated¶
The installation process will produce an updatable installation, where updating it will take less than one minute. Depending on the amount of feedback we receive, we will produce updates every few days or once in a while.
unit tested¶
Bauble is continuously and extensively unit tested, something that makes regression of functionality close to impossible. Every update is automatically quality checked, on the Travis Continuous Integration service. Integration of TravisCI with the github platform will make it difficult for us to release anything which has a single failing unit test.
Most changes and additions we make, come with some extra unit test, which defines the behaviour and will make any undesired change easily visible.
customizable/extensible¶
Bauble is extensible through plugins and can be customized to suit the needs of the institution.
Installing Bauble¶
Installation¶
bauble.classic is a cross-platform program and it will run on unix machines like Linux and MacOSX, as well as on Windows.
To install Bauble first requires that you install its dependencies that cannot be installed automatically. These include virtualenvwrapper, PyGTK and pip. Python and GTK+, you probably already have. As long as you have these packages installed then Bauble should be able to install the rest of its dependencies by itself.
Bemerkung
If you follow these installation steps, you will end with Bauble running within a Python virtual environment, all Python dependencies installed locally, non conflicting with any other Python program you may have on your system.
if you later choose to remove Bauble, you simply remove the virtual environment, which is a directory, with all of its content.
Installing on Linux¶
Download the devinstall.sh script and run it:
https://raw.githubusercontent.com/Bauble/bauble.classic/master/scripts/devinstall.sh
Please not that the script will not help you install any extra database connector. This you will do in a later step.
You can study the script to see what steps if runs for you. In short it will install dependencies which can’t be satisfied in a virtual environment, then it will create a virtual environment named bacl, download the sources and connect your git checkout to the bauble-1.0 branch (this you can consider a production line), it then builds bauble, downloading all remaining dependencies, and finally it creates a startup script in your ~/bin folder.
If the script ends without error, you can now start bauble:
~/bin/bauble
or update bauble to the latest released production patch:
~/bin/bauble -u
The same script you can use to switch to a different production line, but at the moment there’s only bauble-1.0.
on Unity, open a terminal, start bauble, its icon will show up in the launcher, you can now lock to launcher it.
If you would like to use the default SQLite database or you don’t know what this means then you can skip this step. If you would like to use a database backend other than the default SQLite backend then you will also need to install a database connector.
If you would like to use a PostgreSQL database then activate the virtual environment and install psycopg2 with the following commands:
source ~/.virtualenvs/bacl/bin/activate pip install -U psycopg2
You might need solve dependencies. How to do so, depends on which Linux flavour you are using. Check with your distribution documentation.
Next…
Installing on MacOSX¶
Being MacOSX a unix environment, most things will work the same as on Linux (sort of).
One difficulty is that there are many more versions of MacOSX out there than one would want to support, and only the current and its immediately preceding release are kept up-to-date by Apple-the-firm.
Last time we tested, some of the dependencies could not be installed on MacOSX 10.5 and we assume similar problems would present themselves on older OSX versions. Bauble has been successfully tested with 10.7 and 10.9.
First of all, you need things which are an integral part of a unix environment, but which are missing in a off-the-shelf mac:
- developers tools: xcode. check the wikipedia page for the version supported on your mac.
- package manager: homebrew (tigerbrew for older OSX versions).
with the above installed, run:
brew doctor
make sure you understand the problems it reports, and correct them. pygtk will need xquartz and brew will not solve the dependency automatically. either install xquartz using brew or the way you prefer:
brew install Caskroom/cask/xquartz
then install the remaining dependencies:
brew install git
brew install pygtk # takes time and installs all dependencies
follow all instructions on how to activate what you have installed.
the rest is just as on a normal unix machine, and we have a devinstall.sh script for it. Read the above Linux instructions, follow them, enjoy.
Next…
Installing on Windows¶
The Windows installer used to be a „batteries-included“ installer, installing everything needed to run Bauble. The current maintainer of bauble.classic cannot run Windows applications. If you want to run the latest version of bauble on Windows: download and install the dependencies and then install Bauble from the source package.
Please report any trouble and help with packaging will be very welcome.
Bemerkung
Bauble has been tested with and is known to work on W-XP, W-7 and W-8. Although it should work fine on other versions Windows it has not been thoroughly tested.
Bemerkung
Direct download links are given for all needed components. They have been tested in September 2015, but things change with time. If any of the direct download links stops working, please ring the bell, so we can update the information here.
the installation steps on Windows:
download and install
git
(comes with a unix-likesh
and includesvi
) from:https://git-scm.com/download/win
all default options are fine, except we need git to be executable from the command prompt:
download and install Python 2.x (32bit) from:
Direct link to download Python
Bauble has been developed and tested using Python 2.x. It will definitely not run on Python 3.x. If you are interested in helping port to Python 3.x, please contact the Bauble maintainers.
when installing Python, do put Python in the PATH:
download
pygtk
from the following source. (this requires 32bit python). be sure you download the „all in one“ version:http://ftp.gnome.org/pub/GNOME/binaries/win32/pygtk/
make a complete install, selecting everything:
(optional) download and install a database connector other than
sqlite3
.On Windows, it is NOT easy to install
psycopg2
from sources, using pip, so „avoid the gory details“ and use a pre-compiled pagkage from:REBOOT
hey, this is Windows, you need to reboot for changes to take effect!
download and run the batch file:
https://raw.githubusercontent.com/Bauble/bauble.classic/master/scripts/devinstall.bat
this will pull the
bauble.classic
repository on github to your home directory, underLocal\github\Bauble
, checkout thebauble-1.0
production line, create a virtual environment and install bauble into it.you can also run
devinstall.bat
passing it as argument the numerical part of the production line you want to follow.download the batch file you will use to stay up-to-date with the production line you chose to follow:
https://raw.githubusercontent.com/Bauble/bauble.classic/master/scripts/bauble-update.bat
if you are on a recent Bauble installation, each time you start the program, Bauble will check on the development site and alert you of any newer bauble release within your chosen production line.
any time you want to update your installation, just start the command prompt and run
bauble-update.bat
you can now start bauble using the
bauble.lnk
shortcut that the installation procedure copies to theScripts
directory of the virtual environment:%HOMEDRIVE%%HOMEPATH%\.virtualenv\bacl\Scripts\bauble.lnk
If you would like to generate and print PDF reports using Bauble’s default report generator then you will need to download and install Apache FOP. After extracting the FOP archive you will need to include the directory you extracted to in your PATH.
Next…
Troubleshooting the Install¶
What are the packages that are installed by Bauble:
The following packages are required by Bauble
- SQLAlchemy
- lxml
The following packages are optional:
- Mako - required by the template based report generator
- gdata - required by the Picasa photos InfoBox
Couldn’t install lxml.
The lxml packages have to be compile with a C compiler. If you don’t have a Make sure the libxml and libxsl packages are installed. Installing the Cython packages. On Linux you will have to install the gcc package. On Windows there should be a precompiled version available at http://pypi.python.org/pypi/lxml/2.1.1
Couldn’t install gdata.
For some reason the Google’s gdata package lists itself in the Python Package Index but doesn’t work properly with the easy_install command. You can download the latest gdata package from:
http://code.google.com/p/gdata-python-client/downloads/list
Unzip it and run
python setup.py installw
in the folder you unzip it to.
Next…
Using Bauble¶
Getting Started¶
Should you SQLite?¶
Is this the first time you use Bauble, are you going to work in a stand-alone setting, you have not the faintest idea how to manage a database management system? If you answered yes to any of the previous, you probably better stick with SQLite, the easy, fast, zero-administration file-based database.
With SQLite, you do not need any preparation and you can continue with connecting.
On the other hand, if you want to connect more than one bauble workstation to the same database, or if you want to make your data available for other clients, as could be a web server in a LAMP setting, you should consider keeping your database in a database management system like PostgreSQL or MySQL/MariaDB, both supported by Bauble.
When connecting to a database server as one of the above, you have to manually create: at least one bauble user, the database you want bauble to use, and to give at lest one bauble user full permissions on its database. When this is done, Bauble will be able to proceed, creating the tables and importing the default data set. The process is database-dependent and it falls beyond the scope of this manual.
If you already got the chills or sick at your stomach, no need to worry, just stick with SQLite, you do not miss on features nor performance.
Connecting to a database¶
When you start Bauble the first thing that comes up is the connection dialog.
Quite obviously, if this is the first time you start Bauble, you have no connections yet and Bauble will alert you about it.

As it says: close the message box, you will return to the connection dialog, where you click on Add to create your first connection.

Just insert a name for your connection, something meaningful you associate with the collection to be represented in the database (for example: “my home garden”), and click on OK. You will be back to the previous screen, but your connection name will be selected and the Connection Details will have expanded.

specify the connection details
If you do not know what to do here, Bauble will help you stay safe. Activate the Use default locations check box and create your first connection by clicking on Connect.
You may safely skip the remainder of this section for the time being and continue reading to the following section.
fine-tune the connection details
By default Bauble uses the file-based SQLite database. During the installation process you had the choice (and you still have after installation), to add database connectors other than the default SQLite.
In this example, Bauble can connect to SQLite, PostgreSQL and MySQL, but no connector is available for Oracle or MS SQL Server.

If you use SQLite, all you really need specify is the connection name. If
you let Bauble use the default filename then Bauble creates a database file
with the same name as the connection and .db
extension, and a pictures
folder with the same name and no extension, both in ~/.bauble
on
Linux/MacOSX or in AppData\Roaming\Bauble
on Windows.
Still with SQLite, you might have received or downloaded a bauble database, and you want to connect to it. In this case you do not let Bauble use the default filename, but you browse in your computer to the location where you saved the Bauble SQLite database file.
If you use a different database connector, the dialog box will look different and it will offer you the option to fine tune all parameters needed to connect to the database of your choice.
If you are connecting to an existing database you can continue to Editing and Inserting Data and subsequently Searching in Bauble, otherwise read on to the following section on initializing a database for Bauble.
If you plan to associate pictures to plants, specify also the pictures root folder. The meaning of this is explained in further detail at Pictures in Editing and Inserting Data.
Initialize a database¶
First time you open a connection to a database which had never been seen by Bauble before, Bauble will first display an alert:

immediately followed by a question:

Be careful when manually specifying the connection parameters: the values you have entered may refer to an existing database, not intended for use with Bauble. By letting Bauble initialize a database, the database will be emptied and all of its content be lost.
If you are sure you want to create a database at this connection then select „Yes“. Bauble will then start creating the database tables and importing the default data. This can take a minute or two so while all of the default data is imported into the database so be patient.
Once your database has been created, configured, initialized, you are ready to start Editing and Inserting Data and subsequently Searching in Bauble.
Searching in Bauble¶
Searching allows you to view, browse and create reports from your data. You can perform searches by either entering the queries in the main search entry or by using the Query Builder to create the queries for you. The results of Bauble searches are listed in the main window.
Search Strategies¶
Three are three types of search strategies available in Bauble. Considering the search stragety types available in Bauble, sorted in increasing complexity: you can search by value, expression or query.
Searching by query, the most complex and powerful, is assisted by the Query Builder, described below.
All searches are case insensitive so searching for Maxillaria and maxillaria will return the same results.
Search by Value¶
Search by value is the simplest way to search. You just type in a string and see what matches. Which fields/columns are search for your string depends on how the different plugins are configured. For example, by default the PlantPlugin search the family name, the genus name, the species and infraspecific species names, vernacular names and geography. So if you want to search in the notes field of any of these types then searching by value is not the search you’re looking for.
Examples of searching by value would be: Maxillaria, Acanth, 2008.1234, 2003.2.1
Search string are separated by spaces. For example if you enter the
search string Block 10
then Bauble will search for the strings Block
and 10 and return all the results that match either of these
strings. If you want to search for Block 10 as a while string then you
should quote the string like "Block 10"
.
Search by Expression¶
Searching with expression gives you a little more control over what
you are searching for. It can narrow the search down to a specific
domain. Expression consist of a domain, an operator and a value. For
example the search: gen=Maxillaria
would return all the genera that
match the name Maxillaria. In this case the domain is gen, the
operator is = and the value is Maxillaria.
The search string gen like max%
would return all the genera whose
names start with „Max“. In this case the domain again is gen, the
operator is like, which allows for „fuzzy“ searching and the value is
max%. The percent sign is used as a wild card so if you search for
max% then it search for all value that start with max. If you search
for %max it searches for all values that end in max. The string %max%a
would search for all value that contain max and end in a.
For more information about the different search domain and their short-hand aliases, see search-domains .
If expression are invalid they are usually used as search by value
searchs. For example the search string gen=
will execute a search by
value for the string gen and the search string gen like
will search
for the string gen and the string like.
Search by Query¶
Queries allow the most control over searching. With queries you can search across relations, specific columns and join search using boolean operators like AND and OR.
An example of a query would be:
plant where accession.species.genus.family=Fabaceae and location.site="Block 10"
This query would return all the plants whose family are Fabaceae and are located in Block 10.
Searching with queries usually requires some knowledge of the Bauble internals and database table layouts.
A couple of useful examples:
Which locations are in use:
location where plants.id!=0
Which genera are associated to at least one accession:
genus where species.accession.id!=0
Domains¶
The following are the common search domain and the columns they search by default. The default columns are used when searching by value and expression. The queries do not use the default columns.
Domains: | family, fam: Search genus, gen: Search species, sp: Search geography: Search acc: Search plant: Search location, loc: Search |
---|
The Query Builder¶
The Query Builder helps you build complex search queries through a point and click interface. To open the Query Builder click the to the left of the search entry or select
from the menu.The Query Builder composes a query that will be understood by the Query Search Strategy described above. You can use the Query Builder to get a feeling of correct queries before you start typing them by hand, something that you might prefer if you are a fast typer.
After opening the Query Builder you must select a search domain. The search domain will determine the type of data that is returned and the properties that you can search.

The search domain is similar to a table in the database and the properties would be the columns on the table. Often the table/domain and properties/columns are the same but not always.
Once a search domain is selected you can then select a property of the domain to compare values to. The search operator can then be changed for how you want to make the search comparison. Finally you must enter a value to compare to the search property.

If the search property you have selected can only have specific values then a list of possible values will be provided for you to choose from.
If multiple search properties are necessary then clicking on the plus sign will add more search properties. Select And/Or next to the property name choose how the properties will be combined in the search query.
When you are done building your query click OK to perform the search.
Editing and Inserting Data¶
The main way that we add or change information in Bauble is by using the editors. Each basic type of data has its own editor. For example there is a Family editor, a Genus editor, an Accession editor, etc.
To create a new record click on the
menu on the menubar and then select the type of record your would like to create. This will open a new blank editor for the type.To edit an existing record in the database right click on an item in the search results and select
from the popup menu. This will open an editor that will allow you to change the values on the record that you selected.Most types also have children which you can add by right clicking on the parent and selecting „Add ???…“ on the context menu. For example, a Family has Genus children: you can add a Genus to a Family by right clicking on a Family and selecting „Add genus“.
Notizen¶
Almost all of the editors in Bauble have a Notes tab which should work the same regardless of which editor you are using.
If you enter a web address in a note then the link will show up in the Links box when the item your are editing is selected in the search results.
You can browse the notes for an item in the database using the Notes box at the bottom of the screen. The Notes box will be desensitized if the selected item does not have any notes.
Familie¶
The Family editor allows you to add or change a botanical family.
The Family field on the editor will change the name of the family. The Family field is required.
The Qualifier field will change the family qualifier. The value can either be sensu lato, sensu stricto or nothing.
Synonyms allow you to add other families that are synonyms with the family you are currently editing. To add a new synonyms type in a family name in the entry. You must select a family name from the list of completions. Once you have selcted a family name that you want to add as a synonym click on the Add button next to the synonym list and it will add the selected synonym to the list. To remove a synonym select the synonym from the list and click on the Remove button.
To cancel your changes without saving then click on the Cancel button.
To save the family you are working on then click OK.
To save the family you are working on and add a genus to it then click on the Add Genera button.
To add another family when you are finished editing the current one click on the Next button on the bottom. This will save the current family and open a new blank family editor.
Gattung¶
The Genus editor allows you to add or change a botanical genus.
The Family field on the genus editor allows you to choose the family for the genus. When you begin type a family name it will show a list of families to choose from. The family name must already exist in the database before you can set it as the family for the genus.
The Genus field allows you to set the genus for this entry.
The Author field allows you to set the name or abbreviation of the author(s) for the genus.
Synonyms allow you to add other genera that are synonyms with the genus you are currently editing. To add a new synonyms type in a genus name in the entry. You must select a genus name from the list of completions. Once you have selcted a genus name that you want to add as a synonym click on the Add button next to the synonym list and it will add the selected synonym to the list. To remove a synonym select the synonym from the list and click on the Remove button.
To cancel your changes without saving then click on the Cancel button.
To save the genus you are working on then click OK.
To save the genus you are working on and add a species to it then click on the Add Species button.
To add another genus when you are finished editing the current one click on the Next button on the bottom. This will save the current genus and open a new blank genus editor.
Species/Taxon¶
For historical reasons called a species, but by this we mean a taxon at rank species or lower. It represents a unique name in the database. The species editor will allow you to construct the name as well as associate metadata with the taxon such as its distribution, synonyms and other information.
The Infraspecific parts in the species editor will allow you to specify the taxon further than at species rank.
To cancel your changes without saving then click on the Cancel button.
To save the species you are working on then click OK.
To save the species you are working on and add an accession to it then click on the Add Accession button.
To add another species when you are finished editing the current one click on the Next button on the bottom. This will save the current species and open a new blank species editor.
Accessions¶
The Accession editor allows us to add an accession to a species. In Bauble an accession represents a group of plants or clones. The accession would refer maybe a group of seed or cuttings from a species. A plant would be an individual from that accesssion, i.e. a specific plant in a specific location.
Pflanze¶
The Plant editor.
Creating multiple plants¶
You can create multiple Plants by using ranges in the code entry. This is only allowed when creating new plants and it is not possible when editing existing Plants in the database.
For example the range, 3-5 will create plant with code 3,4,5. The range 1,4-7,25 will create plants with codes 1,4,5,6,7,25.
When you enter the range in the plant code entry the entry will turn blue to indicate that you are now creating multiple plants. Any fields that are set while in this mode will be copied to all the plants that are created.
Pictures¶
Just as almost all objects in the Bauble database can have Notes associated to them, Plants can have Pictures: next to the tab for Notes, the Plants editor contains an extra tab called „Pictures“. You can associate as many pictures as you might need to a plant.
When you associate a picture to a plant, the file is copied in the pictures folder, and a miniature (500x500) is generated and copied in the thumbnails folder inside of the pictures folder.
As of Bauble-1.0.41, Pictures are not kept in the database. To ensure pictures are available on all terminals where you have installed and configured Bauble, you can use a file sharing service like Copy or Dropbox. The personal choice of the writer of this document is to use Copy, because it offers much more space and because of its „Fair Storage“ policy.
Remember that you have configured the pictures root folder when you specified the details of your database connection. Again, you should make sure that the pictures root folder is shared with your file sharing service of choice.
When a Plant in the current selection is highlighted, its pictures are displayed in the pictures pane, the pane left of the information pane. When an accession in the selection is highlighted, any picture associated to the plants in the highlighted accession are displayed in the pictures pane.
Locations¶
The Location editor
danger zone¶
The location editor contains an initially hidden section named danger zone. The widgets contained in this section allow the user to merge the current location into a different location, letting the user correct spelling mistakes or implement policy changes.
Tagging¶
Tagging is an easy way to give context to an object or create a collection of object that you want to recall later. For example if you want to collect a bunch of plants that you later want to create a report from you can tag them with the string „for that report i was thinking about“. You can then select „for that report i was thinking about“ from the tags menu to show you all the objects you tagged.
Tagging can be done two ways. By selecting one or more items in the search results and pressing Ctrl-T or by selecting
from the menu. If you have selected multiple items then only that tags that are common to all the selected items will have a check next to it.Generating reports¶
Using the Mako Report Formatter¶
The Mako report formatter uses the Mako template language for generating reports. More information about Mako and its language can be found at makotemplates.org.
The Mako templating system should already be installed on your computer if Bauble is installed.
Creating reports with Mako is similar in the way that you would create a web page from a template. It is much simpler than the XSL Formatter(see below) and should be relatively easy to create template for anyone with a little but of programming experience.
The template generator will use the same file extension as the template which should indicate the type of output the template with create. For example, to generate an HTML page from your template you should name the template something like report.html. If the template will generate a comma seperated value file you should name the template report.csv.
The template will receive a variable called values which will contain the list of values in the current search.
The type of each value in values will be the same as the search domain used in the search query. For more information on search domains see Domains.
If the query does not have a search domain then the values could all be of a different type and the Mako template should prepared to handle them.
Using the XSL Report Formatter¶
The XSL report formatter requires an XSL to PDF renderer to convert the data to a PDF file. Apache FOP is is a free and open-source XSL->PDF renderer and is recommended.
If using Linux, Apache FOP should be installable using your package
manager. On Debian/Ubuntu it is installable as fop
in Synaptic or
using the following command:
apt-get install fop
Installing Apache FOP on Windows¶
You have two options for installing FOP on Windows. The easiest way is to download the prebuilt ApacheFOP-0.95-1-setup.exe installer.
Alternatively you can download the archive. After extracting the archive you must add the directory you extracted the archive to to your PATH environment variable.
Importing and Exporting Data¶
Although Bauble can be extended through plugins to support alternate import and export formats, by default it can only import and export comma seperated values files or CSV.
There is some support for exporting to the Access for Biological Collections Data it is limited.
There is also limited support for exporting to an XML format that more or less reflects exactly the tables and row of the database.
Exporting ABCD and XML will not be covered here.
Warnung
Importing files will most likely destroy any data you have in the database so make sure you have backed up your data.
Importing from CSV¶
In general it is best to only import CSV files into Bauble that were previously exported from Bauble. It is possible to import any CSV file but that is more advanced that this doc will cover.
To import CSV files into Bauble select
from the menu.After clicking OK on the dialog that ask if you are sure you know what you’re doing a file chooser will open. In the file chooser select the files you want to import.
Exporting to CSV¶
To export the Bauble data to CSV select
from the menu.This tool will ask you to select a directory to export the CSV data. All of the tables in Bauble will be exported to files in the format tablename.txt where tablename is the name of the table where the data was exported from.
Importing from JSON¶
This is the way to import data into an existing database, without destroying previous content. A typical example of this functionality would be importing your digital collection into a fresh, just initialized Bauble database. Converting a database into bauble json interchange format is beyond the scope of this manual, please contact one of the authors if you need any further help.
Using the Bauble json interchange format, you can import data which you have exported from a different Bauble installation.
Exporting to JSON¶
This feature is still under development.

when you activate this export tool, you are given the choice to specify what to export. You can use the current selection to limit the span of the export, or you can start at the complete content of a domain, to be chosen among Species, Accession, Plant.
Exporting Species will only export the complete taxonomic information in your database. Accession will export all your accessions plus all the taxonomic information it refers to: unreferred to taxa will not be exported. Plant will export all living plants (some accession might not be included), all referred to locations and taxa.
Managing Users¶
Bemerkung
The Bauble users plugin is only available on PostgreSQL based databases.
The Bauble User’s Plugin will allow you to create and manage the permissions of users for your Bauble database.
Creating Users¶
To create a new user…
Permissions¶
Bauble allows read, write and execute permissions.
Administration¶
Administration¶
If you are using a real DBMS to hold your botanic data, then you need do something about database administration. While database adnimistration is far beyond the scope of this document, we make our users aware of it.
SQLite¶
SQLite is not what one would consider a real DBMS: each SQLite database is
just in one file. Make safety copies and you will be fine. If you don’t know
where to look for your database files, consider that, per default, bauble
puts its data in the ~/.bauble/
directory (in Windows it is somewhere in
your AppData
directory).
MySQL¶
Bitte schauen Sie in die offiziellen Dokumente.
PostgreSQL¶
Please refer to the official documentation. A very thorough discussion of your backup options starts at chapter_24.
Bauble Development¶
Downloading the source¶
The Bauble source can be downloaded from our source repository on github.
If you want a particular version of Bauble, we release and maintain versions
into branches. you should git checkout
the branch corresponding to the
version of your choice. Branch names for Bauble versions are of the form
bauble-x.y
, where x.y can be 1.0, for example. Our workflow is to commit
to the master development branch or to a patch branch and to include the
commits into a release branch when ready.
To check out the most recent code from the source repository you will need to install the Git version control system. Git is incuded in all reasonable Linux distributions and can be installed on all current operating systems.
Once you have installed Git you can checkout the latest Bauble code with the following command:
git clone https://github.com/Bauble/bauble.classic.git
For more information about other available code branches go to bauble.classic on github.
Developer’s Manual¶
helping bauble development¶
Installing Bauble always includes downloading the sources, connected to the github repository. This is so because in our eyes, every user is always potentially also a developer.
If you want to contribute to Bauble, you can do so in quite a few different ways:
* use the software, note the things you don't like, open issue for each of them. a developer will react.
* if you have an idea of what you miss in the software but can't quite
formalize it into separate issues, you could consider hiring a
professional. this is the best way to make sure that something happens
quickly on Bauble. do make sure the developer opens issues and publishes
their contribution on github.
* translate! any help with translations will be welcome, so please do! you
can do this without installing anything on your computer, just using the
on-line translation service offered by http://hosted.weblate.org/
* fork the respository, choose an issue, solve it, open a pull request. see
the `bug solving workflow`_ below.
bug solving workflow¶
normal development workflow¶
- while using the software, you notice a problem, or you get an idea of something that could be better, you think about it good enough in order to have a very clear idea of what it really is, that you noticed. you open an issue and describe the problem. someone might react with hints.
- you open the issues site and choose one you want to tackle.
- assign the issue to yourself, this way you are informing the world that you have the intention to work at it. someone might react with hints.
- optionally fork the repository in your account and preferably create a branch, clearly associated to the issue.
- write unit tests and commit them to your branch (do not commit failing
unit tests to the
master
branch). - write more unit tests (ideally, the tests form the complete description of the feature you are adding or correcting).
- make sure the feature you are adding or correcting is really completely described by the unit tests you wrote.
- make sure your unit tests are atomic, that is, that you test variations on changes along one single variable. do not give complex input to unit tests or tests that do not fit on one screen (25 lines of code).
- write the code that makes your tests succeed.
- update the i18n files (run
./scripts/i18n.sh
). - whenever possible, translate the new strings you put in code or glade files.
- commit your changes.
- push to github.
- open a pull request.
publishing to production¶
- open the pull request page using as base the production line, compared to
master
. - make sure a
bump
commit is included in the differences. - it should be possible to automatically merge the branches.
- create the new pull request, call it as “publish to the production line”.
- you possibly need wait for travis-ci to perform the checks.
- merge the changes.
- tell the world about it: on facebook, the google group, linkedin, …
closing step¶
- review this workflow. consider this as a guideline, to yourself and to your colleagues. please help make it better and matching the practice.
structure of user interface¶
the user interface is built according to the Model-View-Presenter architectural pattern. The view is described in a glade file and is totally dumb, you do not subclass it because it implements no behaviour and because its appearance is, as said, described elsewhere, including the association signal-callbacks. The model simply follows the sqlalchemy practices.
You will subclass the presenter in order to:
- define
widget_to_field_map
, the association from name of view object to name of model attribute, - override
view_accept_buttons
, the list of widget names which, if activated by the user, mean that the view should be closed, - define all needed callbacks,
The presenter should not know of the internal structure of the view,
instead, it should use the view api to set and query the values inserted by
the user. The base class for the presenter, GenericEditorPresenter
defined in bauble.editor
, implements many generic callbacks.
Model and Presenter can be unit tested, not the View.
The Tag
plugin is a good minimal example, even if the TagItemGUI
falls outside this description. Other plugins do not respect the
description.
We use the same architectural pattern for non-database interaction, by setting the presenter also as model. We do this, for example, for the JSON export dialog box.
building (on Windows)¶
Building a python program is a bit of a contraddiction. You don’t normally build nor compile a python program, you run it in its (virtual) environment, and python will process the modules loaded and produce faster-loading compiled python files. You can, however, produce a Windows executable from a python script, executable containing the whole python environment and dependencies.
Follow all steps needed to set up a working Bauble environment from Installation, but skip the final
install
step.instead of installing Bauble, you produce a Windows executable. This is achieved with the
py2exe
target, which is only available on Windows systems:python setup.py py2exe
At this point you can run Bauble. To run the compiled executable run:
.\dist\bauble.exe
or copy the executable to wherever you think appropriate.
To optionally build an NSIS installer package you must install NSIS from nsis.sourceforge.net. After installing NSIS right click on
.\scripts\build.nsi
in Explorer and select Compile NSIS Script.
Extending Bauble with Plugins¶
Nearly everything about Bauble is extensible through plugins. Plugins can create tables, define custom searchs, add menu items, create custom commands and more.
To create a new plugin you must extend the bauble.pluginmgr.Plugin
class.
API Documentation¶
bauble
¶
bauble.db
¶
-
bauble.db.
Base
¶ All tables/mappers in Bauble which use the SQLAlchemy declarative plugin for declaring tables and mappers should derive from this class.
An instance of
sqlalchemy.ext.declarative.Base
-
bauble.db.
metadata
¶ The default metadata for all Bauble tables.
An instance of
sqlalchemy.schema.MetaData