Organize and access data with Piggydb
Personal Knowledge
![](/var/linux_magazin/storage/images/issues/2014/160/workspace-piggydb/popov_dimitri.png/607405-1-eng-US/Popov_Dimitri.png_medium.png)
Struggling to keep your data organized and easily accessible? Piggydb can help you turn a collection of data morsels into a flexible knowledgebase.
Knowledge is power, but only if you have the ability to organize and access it. For that, you need a dedicated tool like Piggydb [1], which can transform an amorphous body of notes, code snippets, images, documents, links, and so forth into a properly organized and easily accessible knowledgebase.
Unlike traditional outliners and note-taking applications, Piggydb lets you structure content by classifying and connecting individual items called knowledge fragments. Pouring and organizing content in Piggydb should help you not only manage your knowledge more efficiently but also generate new concepts and ideas.
Better still, you can put Piggydb to a variety of other practical uses: from drafting articles and jotting notes to organizing research material. In other words, Piggydb has the potential to become an indispensable tool in your productivity and creativity toolbox.
Deploying Piggydb
Piggydb is written in Java, so before you can run the application on your machine, you have to install a Java Runtime Environment (JRE) on it. On Ubuntu and Debian-based Linux distributions, you can install the OpenJDK JRE by executing
apt-get install openjdk-7-jre
as root. Installing OpenJDK on openSUSE is also a matter of running
zypper install java-1_7_0-openjdk
as root. Once the JRE has been installed, you can deploy Piggydb.
The application is available in two versions: a standalone desktop application and an all-in-one server package. To install the standalone version of Piggydb, grab the latest release of the application from the project's website and unpack the downloaded archive. In the terminal, switch to the resulting directory and launch the application with:
java -jar piggydb-standalone.jar
This step should add the Piggydb item to the System Tray and open the application in the default browser. Then, use the default username and password (owner
/owner
) to log in to Piggydb.
By default, Piggydb runs on port 8080, but you can easily change this by editing the port=8080
line in the launcher.properties
file. Piggydb automatically creates a database for storing data in the user home directory. However, you can change the destination directory by modifying the default path in the line piggydb.database.prefix=file:~/piggydb
in the application.properties
file.
Instead of running Piggydb on a desktop machine, you can deploy the application on a server, so you can access and use Piggydb from anywhere. Deploying the application on a server is a rather simple affair. Install the OpenJDK package, download the all-in-one version of Piggydb, and unpack the downloaded archive. Move the resulting piggydb
directory to the root of your server. Make the run.sh
script in the piggydb
directory executable using the chmod +x run.sh
command. Then, run the script, point your browser to http://127.0.0.1:8080 (replace 127.0.0.1 with the IP address or domain name of your server), and log in using the default credentials.
Similar to the standalone version, you can change the default port and database directory, if needed. To do the former, edit the port=8080
line in the winstone.properties
file. To change the default directory, open the run.sh
file and edit the -Dpiggydb.database.prefix=file:~/piggydb
parameter.
Populating Piggydb with Knowledge Fragments
To make the most of Piggydb's functionality, it's important to understand its basic terminology and functionality. The key element in Piggydb is the knowledge fragment, which could be anything from a text snippet to a file attachment. Knowledge fragments are the main building blocks of a knowledgebase and can be connected in an infinite number of ways. Tags and relations are the agents that glue knowledge fragments together. You can assign multiple tags to each knowledge fragment and use relations to network fragments.
Populating Piggydb with knowledge fragments is rather straightforward. Press the Create a new fragment button, specify the title, and assign tags to classify the new knowledge fragment. You can enter text then format using the available text formatting tools. Piggydb uses its own Wiki-like markup, which supports all the basic formatting options. This includes bold, italic, and strike-through styles; numbered and unnumbered lists; preformatted text; block quotes; and hyperlinks. If the inserted hyperlink points to an image or a YouTube video, Piggydb automatically embeds the image and the video.
The markup also supports more advanced formatting options, such as definition lists and tables. Piggydb offers two features that make it easier to master the markup. The main toolbar contains buttons that give you quick access to frequently used formatting options. The Help button displays a detailed description of markup usage complete with examples. You can preview the formatted text of the fragment at any time using the Preview button. When you are done editing the knowledge fragment, press Register to add it to Piggydb. Using the described procedure, you can add as many knowledge fragments as necessary (Figure 1).
![](/var/linux_magazin/storage/images/issues/2014/160/workspace-piggydb/figure-1/607408-1-eng-US/Figure-1_large.png)
Piggydb also makes it possible to populate the knowledgebase with files. To add a file, press the Add a file button, attach the desired file using the Browse button, fill out the Title and Tags fields, and press Register. The created fragment is treated as a regular knowledge fragment.
Piggydb Interface Overview
Piggydb features an unobtrusive and functional interface that provides direct access to all essential tools for managing knowledge fragments (Figure 2). The search bar in the upper left corner can be used to find fragments containing the specified search term quickly. The slider below the search bar lets you shrink and expand the knowledge fragments as needed. By default, each knowledge fragment is shown in its full length, but if you need to get a bird's eye view of all fragments in the knowledgebase, move the slider to the left to minimize the size of each fragment gradually. Using the drop-down list opposite the slider, you can sort knowledge fragments by different criteria, including update and creation date, title, and creator. The buttons next to the drop-down list lets you switch between the ascending and descending sort order.
![](/var/linux_magazin/storage/images/issues/2014/160/workspace-piggydb/figure-2/607411-1-eng-US/Figure-2_large.png)
The right sidebar contains several palettes: Bookmarks (available only if you have bookmarked fragments), Tag Palette, Filter, and Recently Viewed. The Tag Palette displays all the tags used in the knowledgebase, and it features three viewing modes: hierarchical tree, cloud, and list. The Filter palette shows the list of existing filters. Using the New Filter button in the palette, you can define filters that can be used to display only a specific subset of knowledge fragments (Figure 3). Defining a filter in Piggydb is a matter of including and excluding specific tags. For example, you can create a filter that shows all knowledge fragments containing the language, japanese, and grammar tags, but not the vocabulary tag.
![](/var/linux_magazin/storage/images/issues/2014/160/workspace-piggydb/figure-3/607414-1-eng-US/Figure-3_large.png)
Depending on the usage context, Piggydb switches between list and column views (Figure 4). The former is the default view, which displays all knowledge fragments as a list. When you perform searches, view an individual fragment, or assign the #home tag to a fragment, Piggydb switches to column view.
![](/var/linux_magazin/storage/images/issues/2014/160/workspace-piggydb/figure-4/607417-1-eng-US/Figure-4_large.png)
Each knowledge fragment has its own floating toolbar that pops up when you hover over the fragment. This so-called fragment toolbar contains buttons that let you create a relationship, view the fragment as a document, edit the fragment, bookmark it, add it to the home page, and select the fragment. Additionally, when you hover over the ID number of a knowledge fragment, its content is displayed in a pop-up window. This feature can be useful for quickly previewing a certain fragment, especially when fragments are displayed in an abridged form.
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
![Learn More](https://www.linux-magazine.com/var/linux_magazin/storage/images/media/linux-magazine-eng-us/images/misc/learn-more/834592-1-eng-US/Learn-More_medium.png)
News
-
NVIDIA Released Driver for Upcoming NVIDIA 560 GPU for Linux
Not only has NVIDIA released the driver for its upcoming CPU series, it's the first release that defaults to using open-source GPU kernel modules.
-
OpenMandriva Lx 24.07 Released
If you’re into rolling release Linux distributions, OpenMandriva ROME has a new snapshot with a new kernel.
-
Kernel 6.10 Available for General Usage
Linus Torvalds has released the 6.10 kernel and it includes significant performance increases for Intel Core hybrid systems and more.
-
TUXEDO Computers Releases InfinityBook Pro 14 Gen9 Laptop
Sporting either AMD or Intel CPUs, the TUXEDO InfinityBook Pro 14 is an extremely compact, lightweight, sturdy powerhouse.
-
Google Extends Support for Linux Kernels Used for Android
Because the LTS Linux kernel releases are so important to Android, Google has decided to extend the support period beyond that offered by the kernel development team.
-
Linux Mint 22 Stable Delayed
If you're anxious about getting your hands on the stable release of Linux Mint 22, it looks as if you're going to have to wait a bit longer.
-
Nitrux 3.5.1 Available for Install
The latest version of the immutable, systemd-free distribution includes an updated kernel and NVIDIA driver.
-
Debian 12.6 Released with Plenty of Bug Fixes and Updates
The sixth update to Debian "Bookworm" is all about security mitigations and making adjustments for some "serious problems."
-
Canonical Offers 12-Year LTS for Open Source Docker Images
Canonical is expanding its LTS offering to reach beyond the DEB packages with a new distro-less Docker image.
-
Plasma Desktop 6.1 Released with Several Enhancements
If you're a fan of Plasma Desktop, you should be excited about this new point release.