Release v0.9 v_0 relpipe-v0.9
authorFrantišek Kučera <franta-hg@frantovo.cz>
Fri, 18 Jan 2019 21:34:58 +0100
branchv_0
changeset 241 f71d300205b7
parent 240 d81c623de788
child 242 ebdfe7c10484
Release v0.9
relpipe-data/css/relpipe.css
relpipe-data/download.xml
relpipe-data/examples.xml
relpipe-data/examples/release-v0.9.sh
relpipe-data/makra/already.xsl
relpipe-data/release-v0.9.xml
relpipe-data/roadmap.xml
--- a/relpipe-data/css/relpipe.css	Fri Jan 18 13:18:54 2019 +0100
+++ b/relpipe-data/css/relpipe.css	Fri Jan 18 21:34:58 2019 +0100
@@ -76,3 +76,7 @@
 #text code {
 	color: #066;
 }
+
+.already-implemented {
+	color: grey;
+}
\ No newline at end of file
--- a/relpipe-data/download.xml	Fri Jan 18 13:18:54 2019 +0100
+++ b/relpipe-data/download.xml	Fri Jan 18 21:34:58 2019 +0100
@@ -52,6 +52,7 @@
 			
 		<ul>
 			<li>2018-12-20: <m:a href="release-v0.8">v0.8</m:a></li>
+			<li>2019-01-18: <m:a href="release-v0.9">v0.9</m:a></li>
 		</ul>
 		
 	</text>
--- a/relpipe-data/examples.xml	Fri Jan 18 13:18:54 2019 +0100
+++ b/relpipe-data/examples.xml	Fri Jan 18 21:34:58 2019 +0100
@@ -817,7 +817,7 @@
 		
 		<m:pre jazyk="bash"><![CDATA[wget --recursive --level=1 https://relational-pipes.globalcode.info/
 find -type f -printf '%P\0' \
-	| relpipe-in-filesystem --file path --file size --xattr user.xdg.origin.url  \
+	| relpipe-in-filesystem --file path --file size --xattr xdg.origin.url  \
 	| relpipe-out-tabular
 ]]></m:pre>
 
@@ -825,7 +825,7 @@
 
 		<pre><![CDATA[filesystem:
  ╭───────────────────────────┬────────────────┬────────────────────────────────────────────────────────────────────╮
- │ path             (string) │ size (integer) │ user.xdg.origin.url                                       (string) │
+ │ path             (string) │ size (integer) │ xdg.origin.url                                            (string) │
  ├───────────────────────────┼────────────────┼────────────────────────────────────────────────────────────────────┤
  │ index.html                │          12159 │ https://relational-pipes.globalcode.info/v_0/                      │
  │ v_0/atom.xml              │           4613 │ https://relational-pipes.globalcode.info/v_0/atom.xml              │
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/relpipe-data/examples/release-v0.9.sh	Fri Jan 18 21:34:58 2019 +0100
@@ -0,0 +1,40 @@
+# Install dependencies as root:
+su -c "apt install g++ make cmake mercurial pkg-config"
+su -c "apt install libxerces-c-dev" # needed only for relpipe-in-xml module
+
+# Run rest of installation as a non-root user:
+export RELPIPE_VERSION="v0.9"
+export RELPIPE_SRC=~/src
+export RELPIPE_BUILD=~/build
+export RELPIPE_INSTALL=~/install
+export PKG_CONFIG_PATH="$RELPIPE_INSTALL/lib/pkgconfig/:$PKG_CONFIG_PATH"
+export PATH="$RELPIPE_INSTALL/bin:$PATH"
+
+rm -rf "$RELPIPE_BUILD"/relpipe-*
+mkdir -p "$RELPIPE_SRC" "$RELPIPE_BUILD" "$RELPIPE_INSTALL"
+
+# Helper functions:
+relpipe_download() { for m in "$@"; do cd "$RELPIPE_SRC" && ([[ -d "relpipe-$m.cpp" ]] && hg pull -R "relpipe-$m.cpp" && hg update -R "relpipe-$m.cpp" "$RELPIPE_VERSION" || hg clone -u "$RELPIPE_VERSION" https://hg.globalcode.info/relpipe/relpipe-$m.cpp) || break; done; }
+relpipe_install()  { for m in "$@"; do cd "$RELPIPE_BUILD" && mkdir -p relpipe-$m.cpp && cd relpipe-$m.cpp && cmake -DCMAKE_INSTALL_PREFIX:PATH="$RELPIPE_INSTALL" "$RELPIPE_SRC/relpipe-$m.cpp" && make && make install || break; done; }
+
+# Download all sources:
+relpipe_download lib-protocol lib-reader lib-writer lib-cli lib-xmlwriter in-cli in-fstab in-xml in-csv in-filesystem out-gui.qt out-nullbyte out-ods out-tabular out-xml out-csv tr-cut tr-grep tr-python tr-sed tr-validator
+
+# Build and install libraries:
+relpipe_install lib-protocol lib-reader lib-writer lib-cli lib-xmlwriter
+
+# Build and install tools:
+relpipe_install in-fstab in-cli in-fstab in-xml in-csv tr-cut tr-grep tr-sed out-nullbyte out-ods out-tabular out-xml out-csv
+
+# relpipe_install in-filesystem # requires GCC 8 or patching (see below)
+
+# Clean-up:
+unset -f relpipe_install
+unset -f relpipe_download
+unset -v RELPIPE_VERSION
+unset -v RELPIPE_SRC
+unset -v RELPIPE_BUILD
+unset -v RELPIPE_INSTALL
+
+# View your fstab like on an 80s green screen terminal!
+relpipe-in-fstab | relpipe-out-tabular
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/relpipe-data/makra/already.xsl	Fri Jan 18 21:34:58 2019 +0100
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="2.0"
+	xmlns="http://www.w3.org/1999/xhtml"
+	xmlns:h="http://www.w3.org/1999/xhtml"
+	xmlns:s="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/strana"
+	xmlns:k="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/konfigurace"
+	xmlns:m="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/makro"
+	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+	xmlns:fn="http://www.w3.org/2005/xpath-functions"
+	xmlns:svg="http://www.w3.org/2000/svg"
+	xmlns:xs="http://www.w3.org/2001/XMLSchema"
+	exclude-result-prefixes="fn h s k m xs">
+
+	<!--
+	<xsl:template match="m:already">
+		<span class="already-implemented">
+			<xsl:apply-templates/>
+			<xsl:if test="@since">
+				~ since <xsl:value-of select="@since"/>
+			</xsl:if>
+		</span>
+	</xsl:template>
+	-->
+	
+	<xsl:template match="h:li[@m:since and @m:since ne /s:stránka/m:release/text()]">
+		<li class="already-implemented">
+			<xsl:apply-templates/>
+			~ since <xsl:value-of select="@m:since"/>
+		</li>
+	</xsl:template>
+
+	<xsl:template match="h:li[@m:since and @m:since eq /s:stránka/m:release/text()]">
+		<li>
+			<xsl:apply-templates/>
+		</li>
+	</xsl:template>
+
+		
+</xsl:stylesheet>
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/relpipe-data/release-v0.9.xml	Fri Jan 18 21:34:58 2019 +0100
@@ -0,0 +1,100 @@
+<stránka
+	xmlns="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/strana"
+	xmlns:m="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/makro">
+	
+	<nadpis>Release v0.9</nadpis>
+	<perex>second public release of Relational pipes</perex>
+	<m:release>v0.9</m:release>
+
+	<text xmlns="http://www.w3.org/1999/xhtml">
+		<p>
+			We are pleased to introduce you the new version of <m:name/>.
+			It brings several important features:
+		</p>
+		
+		<ul>
+			<li>
+				<strong>XML input and output</strong>:
+				offers lossless bidirectional conversion between relational format and text.
+				Can be used for manual modifications or reviews.
+				XML form of relational data can be generated or consumed by XQuery or XSLT processors or other XML tools.
+			</li>
+		
+			<li>
+				<strong>CSV input and output</strong>:
+				CSV is a standard format defined in <a href="https://tools.ietf.org/html/rfc4180">RFC 4180</a>.
+				It is very simple, lacks data types and can contain only a single relation.
+				Despite this, it is very useful when integrating <m:name/> with other tools.
+				At the end of our pipeline, we can put <code>relpipe-out-csv</code>, feed the relation to e.g. GNU R and compute some statistics or generate some nice graphs.
+			</li>
+		
+			<li>
+				<strong>Filesystem input</strong>: this input filter reads file paths (usually generated by the <code>find</code> command)
+				and fetches metadata of given files. Supports various name/path formats, size, owner, symlinks… and extended attributes (xattr).
+				The output can be customized using CLI arguments.
+				This tool can be used to catalogue disk contents, search files or to collect data for some statistics like:
+				<em>How much space does files in particular formats occupy?</em> or
+				<em>From which domains I download files most often?</em>
+				Other use case is: save the output of <code>relpipe-in-filesystem</code> in a file and use it as an index of our files (even on offline media).
+			</li>
+		</ul>
+		<p>
+			See the <m:a href="examples">examples</m:a> page for details.
+		</p>
+		
+		<h3>Data types</h3>
+		<ul>
+			<li m:since="v0.8">boolean</li>
+			<li m:since="v0.8">variable unsigned integer (prototype)</li>
+			<li m:since="v0.8">string in UTF-8</li>
+		</ul>
+		<h3>Inputs</h3>
+		<ul>
+			<li m:since="v0.9">XML</li>
+			<li m:since="v0.9">CSV</li>
+			<li m:since="v0.9">file system</li>
+			<li m:since="v0.8">CLI</li>
+			<li m:since="v0.8">fstab</li>
+		</ul>
+		<h3>Transformations</h3>
+		<ul>
+			<li m:since="v0.8">grep: regular expression filter, removes unwanted records from the relation</li>
+			<li m:since="v0.8">cut: regular expression attribute cutter (removes or duplicates attributes and can also DROP whole relation)</li>
+			<li m:since="v0.8">sed: regular expression replacer</li>
+			<li m:since="v0.8">validator: just a pass-through filter that crashes on invalid data</li>
+			<li m:since="v0.8">python: highly experimental</li>
+		</ul>
+		<h3>Outputs</h3>
+		<ul>
+			<li m:since="v0.9">CSV</li>
+			<li m:since="v0.8">tabular</li>
+			<li m:since="v0.8">XML</li>
+			<li m:since="v0.8">nullbyte</li>
+			<li m:since="v0.8">GUI in Qt</li>
+			<li m:since="v0.8">ODS (LibreOffice)</li>
+		</ul>
+		
+		<p>
+			Instalation was tested on Debian GNU/Linux 9.6.
+			The process should be similar on other distributions.
+		</p>
+		
+		<m:pre src="examples/release-v0.9.sh" jazyk="bash" odkaz="ano"/>
+		
+		<p>
+			<m:name/> are modular thus you can download and install only parts you need (the libraries are needed always).
+			Tools <code>out-gui.qt</code> and <code>tr-python</code> require additional libraries and are not built by default.
+		</p>
+		
+		<p>
+			The module <code>relpipe-in-filesystem</code> uses C++ filesystem API which is supported since GCC 8.
+			This module can be compiled and seems usable even with GCC 6, but requires some patching (switch to the experimental API):
+		</p>
+		
+		<m:pre jazyk="bash"><![CDATA[sed 's@#include <filesystem>@#include <experimental/filesystem>@g' -i "$RELPIPE_SRC"/relpipe-in-filesystem.cpp/src/FileAttributeFinder.h "$RELPIPE_SRC"/relpipe-in-filesystem.cpp/src/XattrAttributeFinder.h "$RELPIPE_SRC"/relpipe-in-filesystem.cpp/src/FilesystemCommand.h "$RELPIPE_SRC"/relpipe-in-filesystem.cpp/src/AttributeFinder.h
+sed 's@std::filesystem@std::experimental::filesystem@g' -i "$RELPIPE_SRC"/relpipe-in-filesystem.cpp/src/FileAttributeFinder.h "$RELPIPE_SRC"/relpipe-in-filesystem.cpp/src/XattrAttributeFinder.h "$RELPIPE_SRC"/relpipe-in-filesystem.cpp/src/FilesystemCommand.h "$RELPIPE_SRC"/relpipe-in-filesystem.cpp/src/AttributeFinder.h
+sed 's/.*PROPERTY CXX_STANDARD.*/#\0/g' -i "$RELPIPE_SRC"/relpipe-in-filesystem.cpp/src/CMakeLists.txt]]></m:pre>
+
+	</text>
+
+</stránka>
--- a/relpipe-data/roadmap.xml	Fri Jan 18 13:18:54 2019 +0100
+++ b/relpipe-data/roadmap.xml	Fri Jan 18 21:34:58 2019 +0100
@@ -12,7 +12,11 @@
 			Releases after v1.0.0 should follow the rules of <a href="http://semver.org/">Semantic versioning</a>.
 		</p>
 		
-		<h2>v0.9, v0.10, v0.11 etc.</h2>
+		<p>
+			Released versions are described on the <m:a href="download">download</m:a> page.
+		</p>
+		
+		<h2>v0.10, v0.11, v0.12 etc.</h2>
 		
 		<p>
 			Releases for discussion and verification of the format and API design.
@@ -40,23 +44,17 @@
 		</ul>
 		
 		<h3>Inputs</h3>
-		<ul>
-			<li>XML</li>
-			<li>DSV</li>
-			<li>regular expression</li>
-		</ul>
+		<p>Probably no new ones before v1.0.0.</p>
+		
 		<h3>Transformations</h3>
 		<ul>
 			<li>SQL: sqlite</li>
 		</ul>
 		<h3>Outputs</h3>
-		<ul>
-			<li>CLI: null-byte separated values</li>
-		</ul>
+		<p>Probably no new ones before v1.0.0.</p>
 		
 		<h3>Other tasks</h3>
 		<ul>
-			<li>review the build system (probably use cmake in all modules)</li>
 			<li>pkg-config: version numbers, debug vs. release</li>
 			<li>automated complex tests (specification vs. implementation compliance)</li>
 			<li>verify the format from the performance point of view</li>
@@ -77,7 +75,11 @@
 			<li>relpipe-lib-reader</li>
 			<li>relpipe-in-cli</li>
 			<li>relpipe-out-tabular</li>
+			<li>relpipe-in-xml</li>
 			<li>relpipe-out-xml</li>
+			<li>relpipe-in-csv</li>
+			<li>relpipe-out-csv</li>
+			<li>relpipe-out-ods</li>
 		</ul>
 		
 		<p>
@@ -117,6 +119,7 @@
 			
 		<p>Formats:</p>
 		<ul>
+			<li>regular expression (regex groups → attributes)</li>
 			<li>XML: as xmlTable() in SQL</li>
 			<li>ODS (LibreOffice)</li>
 			<li>iCalendar</li>