relpipe-data/examples-recfile.xml
branchv_0
changeset 256 822ffd23d679
parent 255 94b533007e77
--- a/relpipe-data/examples-recfile.xml	Mon Apr 08 13:37:35 2019 +0200
+++ b/relpipe-data/examples-recfile.xml	Tue Apr 09 17:14:05 2019 +0200
@@ -11,7 +11,7 @@
 		<p>
 			Recfile is the native format of <a href="https://www.gnu.org/software/recutils/">GNU Recutils</a>.
 			Recfiles are text files that contain records of various types.
-			They are human-editable and serve as a simple databases.
+			They are human-editable and serve as simple databases.
 			<m:name/> support input and output in this format since v0.11.
 		</p>
 		
@@ -77,12 +77,24 @@
 		</p>
 		
 		<p>
+			Because some web browsers or tools can store the original URL in extended attributes while downloading a file,
+			we can use <code>recsel</code> to find files downloaded from some particular domain:
+		</p>
+		<m:pre jazyk="bash"><![CDATA[find -print0 | relpipe-in-filesystem \
+	--file path \
+	--file size \
+	--file type \
+	--xattr xdg.origin.url --as url \
+	| relpipe-out-recfile \
+	| recsel -e 'url ~ "^https?://([^/]*\.)?archive\.org/"']]></m:pre>
+		
+		<p>
 			<m:name/> can be also used together with <a href="https://sql-dk.globalcode.info/">SQL-DK</a> (in 2019-03-05 development version)
 			to pipe data from big relational databases like PostgreSQL or MariaDB to other formats like recfiles.
 			Having a script:
 		</p>
 				
-		<m:pre jazyk="text" src="examples/sql-dk_pg_1.sh" odkaz="ano"/>
+		<m:pre jazyk="bash" src="examples/sql-dk_pg_1.sh" odkaz="ano"/>
 		
 		<p>
 			We can convert result sets from any SQL queries to relational format and then work with such data without connection to the original database.