Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
all: Migrate to GKeyfileSettingsBackend and generate man pages from s…
…chemas Now we've removed the internal key file object, we've had to put in place another method for supporting the existing TRACKER_USE_CONFIG_FILES environment variable. Thanks to the GKeyfileSettingsBackend provided by GLib, we can fallback to old school INI type config files for embedded solutions or cases where we don't want dconf as a backend. This works rather well. IT should be noted, the INI files are *NOT* written out in full if they do not exist, only options which are saved or different to the default settings are. This is how it should be too. Now we build man pages based on GSettings schemas using xsltproc with the template in docs/manpages/gsettings.xsl. This is a useful aid when trying to understand what config files can have in them. One thing it does highlight, is the config documentation could be better :)
- Loading branch information
1 parent
dc4fbfe
commit 2b53cd5
Showing
22 changed files
with
527 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,4 +35,5 @@ EXTRA_DIST = \ | |
$(common) \ | ||
$(tp) \ | ||
$(tn) \ | ||
$(tmrss) | ||
$(tmrss) \ | ||
gsettings.xsl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> | ||
|
||
<xsl:output method="xml" omit-xml-declaration="yes" disable-output-escaping="yes"/> | ||
|
||
<xsl:template match="/"> | ||
.TH <xsl:value-of select="$config-file"/> 5 "<xsl:value-of select="$current-date"/>" <xsl:value-of select="$version"/> "Tracker Manual" | ||
|
||
.SH NAME | ||
<xsl:value-of select="$config-file"/> | ||
|
||
.SH SYNOPSIS | ||
$HOME/.config/tracker/<xsl:value-of select="$config-file"/> | ||
|
||
.SH DESCRIPTION | ||
Tracker's configuration is built on top of GSettings, part of GLib. This means that there is a proper schema for configurations and they can be viewed (normally) using the \fBdconf-editor\fR tool. | ||
|
||
Tracker also allows switching from the GSettings database, used by most (cross) desktop applications, to a key/value formatted files (like Microsoft's INI format). To do this, the environment variable \fBTRACKER_USE_CONFIG_FILES\fR must be defined before running the application using that configuration. | ||
|
||
So where is this configuration? Well, normally they're stored in \fI$HOME/.config/tracker/\fR, however, default values are not stored to config files, only \fBdifferent\fR values are. This man page describes what keys and values can be used. | ||
|
||
See EXAMPLES for a general overview. | ||
|
||
.SH OPTIONS | ||
<xsl:for-each select="schemalist/schema/key"> | ||
.TP | ||
\fB<xsl:value-of select="@name"/>\fR=<xsl:value-of select="translate(default, '(\[ | \])', '')" disable-output-escaping="yes"/> | ||
.nf | ||
|
||
<xsl:value-of select="description" disable-output-escaping="yes"/> | ||
|
||
<xsl:for-each select="range"> | ||
Values range from <xsl:value-of select="@min"/> to <xsl:value-of select="@max"/>. | ||
</xsl:for-each> | ||
.fi | ||
|
||
</xsl:for-each> | ||
|
||
.SH EXAMPLES | ||
The top level group is "General". The default configuration (if saved to <xsl:value-of select="$config-file"/>), would look like: | ||
|
||
.nf | ||
[General] | ||
<xsl:for-each select="schemalist/schema/key"> | ||
<xsl:value-of select="@name"/>=<xsl:value-of select="translate(default, '(\[ | \])', '')" disable-output-escaping="yes"/>; | ||
</xsl:for-each> | ||
.fi | ||
|
||
.SH SEE ALSO | ||
.BR <xsl:value-of select="translate($config-file, '.', '\n')"/> | ||
|
||
</xsl:template> | ||
|
||
</xsl:stylesheet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,4 @@ tracker-sparql-scanner.c | |
tracker-turtle-reader.c | ||
*.xml | ||
*.valid | ||
*.cfg.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
*.xml | ||
*.valid | ||
*.cfg.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ tracker-miner-fs | |
*.service | ||
*.xml | ||
*.valid | ||
*.cfg.5 |
Oops, something went wrong.