relpipe-data/examples-filesystem-xattr.xml
author František Kučera <franta-hg@frantovo.cz>
Mon, 21 Feb 2022 01:21:22 +0100
branchv_0
changeset 330 70e7eb578cfa
parent 244 d4f401b5f90c
permissions -rw-r--r--
Added tag relpipe-v0.18 for changeset 5bc2bb8b7946
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
23
0d2729ed16ed zkouška interního odkazu
František Kučera <franta-hg@frantovo.cz>
parents: 18
diff changeset
     1
<stránka
0d2729ed16ed zkouška interního odkazu
František Kučera <franta-hg@frantovo.cz>
parents: 18
diff changeset
     2
	xmlns="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/strana"
0d2729ed16ed zkouška interního odkazu
František Kučera <franta-hg@frantovo.cz>
parents: 18
diff changeset
     3
	xmlns:m="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/makro">
0d2729ed16ed zkouška interního odkazu
František Kučera <franta-hg@frantovo.cz>
parents: 18
diff changeset
     4
	
244
d4f401b5f90c examples: move each example to a separate page + add generated list of examples
František Kučera <franta-hg@frantovo.cz>
parents: 241
diff changeset
     5
	<nadpis>Reading extended attributes using relpipe-in-filesystem</nadpis>
d4f401b5f90c examples: move each example to a separate page + add generated list of examples
František Kučera <franta-hg@frantovo.cz>
parents: 241
diff changeset
     6
	<perex>accessing xattr of given files e.g. xdg.origin.url</perex>
d4f401b5f90c examples: move each example to a separate page + add generated list of examples
František Kučera <franta-hg@frantovo.cz>
parents: 241
diff changeset
     7
	<m:pořadí-příkladu>01300</m:pořadí-příkladu>
4
1bb39595a51c genrování hlavní nabídky #1
František Kučera <franta-hg@frantovo.cz>
parents: 2
diff changeset
     8
2
ab9099ff88fa vkládání zápatí, jmenné prostory, saxon
František Kučera <franta-hg@frantovo.cz>
parents: 1
diff changeset
     9
	<text xmlns="http://www.w3.org/1999/xhtml">
176
46042297e0d6 relpipe-tr-validator: specification and examples
František Kučera <franta-hg@frantovo.cz>
parents: 140
diff changeset
    10
		
46042297e0d6 relpipe-tr-validator: specification and examples
František Kučera <franta-hg@frantovo.cz>
parents: 140
diff changeset
    11
		
198
48a3c1c8c411 examples: they were tested in GNU Bash
František Kučera <franta-hg@frantovo.cz>
parents: 196
diff changeset
    12
		<p>
238
6383a4457833 examples: relpipe-in-filesystem – extended attributes (xattr)
František Kučera <franta-hg@frantovo.cz>
parents: 237
diff changeset
    13
			Extended attributes (xattr) are additional <em>key=value</em> pairs that can be attached to our files.
6383a4457833 examples: relpipe-in-filesystem – extended attributes (xattr)
František Kučera <franta-hg@frantovo.cz>
parents: 237
diff changeset
    14
			They are not stored inside the files, but on the filesystem.
6383a4457833 examples: relpipe-in-filesystem – extended attributes (xattr)
František Kučera <franta-hg@frantovo.cz>
parents: 237
diff changeset
    15
			Thus they are independent of particular file format (which might not support metadata)
6383a4457833 examples: relpipe-in-filesystem – extended attributes (xattr)
František Kučera <franta-hg@frantovo.cz>
parents: 237
diff changeset
    16
			and we can use them e.g. for tagging, cataloguing or adding some notes to our files.
6383a4457833 examples: relpipe-in-filesystem – extended attributes (xattr)
František Kučera <franta-hg@frantovo.cz>
parents: 237
diff changeset
    17
			Some tools like GNU Wget use extended attributes to store metadata like the original URL from which the file was downloaded.
6383a4457833 examples: relpipe-in-filesystem – extended attributes (xattr)
František Kučera <franta-hg@frantovo.cz>
parents: 237
diff changeset
    18
		</p>
6383a4457833 examples: relpipe-in-filesystem – extended attributes (xattr)
František Kučera <franta-hg@frantovo.cz>
parents: 237
diff changeset
    19
		
6383a4457833 examples: relpipe-in-filesystem – extended attributes (xattr)
František Kučera <franta-hg@frantovo.cz>
parents: 237
diff changeset
    20
		<m:pre jazyk="bash"><![CDATA[wget --recursive --level=1 https://relational-pipes.globalcode.info/
6383a4457833 examples: relpipe-in-filesystem – extended attributes (xattr)
František Kučera <franta-hg@frantovo.cz>
parents: 237
diff changeset
    21
find -type f -printf '%P\0' \
241
f71d300205b7 Release v0.9
František Kučera <franta-hg@frantovo.cz>
parents: 240
diff changeset
    22
	| relpipe-in-filesystem --file path --file size --xattr xdg.origin.url  \
238
6383a4457833 examples: relpipe-in-filesystem – extended attributes (xattr)
František Kučera <franta-hg@frantovo.cz>
parents: 237
diff changeset
    23
	| relpipe-out-tabular
6383a4457833 examples: relpipe-in-filesystem – extended attributes (xattr)
František Kučera <franta-hg@frantovo.cz>
parents: 237
diff changeset
    24
]]></m:pre>
6383a4457833 examples: relpipe-in-filesystem – extended attributes (xattr)
František Kučera <franta-hg@frantovo.cz>
parents: 237
diff changeset
    25
240
d81c623de788 examples: small updates
František Kučera <franta-hg@frantovo.cz>
parents: 238
diff changeset
    26
		<p>And now we know, where the files on our disk came from:</p>
238
6383a4457833 examples: relpipe-in-filesystem – extended attributes (xattr)
František Kučera <franta-hg@frantovo.cz>
parents: 237
diff changeset
    27
6383a4457833 examples: relpipe-in-filesystem – extended attributes (xattr)
František Kučera <franta-hg@frantovo.cz>
parents: 237
diff changeset
    28
		<pre><![CDATA[filesystem:
6383a4457833 examples: relpipe-in-filesystem – extended attributes (xattr)
František Kučera <franta-hg@frantovo.cz>
parents: 237
diff changeset
    29
 ╭───────────────────────────┬────────────────┬────────────────────────────────────────────────────────────────────╮
241
f71d300205b7 Release v0.9
František Kučera <franta-hg@frantovo.cz>
parents: 240
diff changeset
    30
 │ path             (string) │ size (integer) │ xdg.origin.url                                            (string) │
238
6383a4457833 examples: relpipe-in-filesystem – extended attributes (xattr)
František Kučera <franta-hg@frantovo.cz>
parents: 237
diff changeset
    31
 ├───────────────────────────┼────────────────┼────────────────────────────────────────────────────────────────────┤
6383a4457833 examples: relpipe-in-filesystem – extended attributes (xattr)
František Kučera <franta-hg@frantovo.cz>
parents: 237
diff changeset
    32
 │ index.html                │          12159 │ https://relational-pipes.globalcode.info/v_0/                      │
6383a4457833 examples: relpipe-in-filesystem – extended attributes (xattr)
František Kučera <franta-hg@frantovo.cz>
parents: 237
diff changeset
    33
 │ v_0/atom.xml              │           4613 │ https://relational-pipes.globalcode.info/v_0/atom.xml              │
6383a4457833 examples: relpipe-in-filesystem – extended attributes (xattr)
František Kučera <franta-hg@frantovo.cz>
parents: 237
diff changeset
    34
 │ v_0/rss.xml               │           4926 │ https://relational-pipes.globalcode.info/v_0/rss.xml               │
6383a4457833 examples: relpipe-in-filesystem – extended attributes (xattr)
František Kučera <franta-hg@frantovo.cz>
parents: 237
diff changeset
    35
 │ v_0/js/skript.js          │           2126 │ https://relational-pipes.globalcode.info/v_0/js/skript.js          │
6383a4457833 examples: relpipe-in-filesystem – extended attributes (xattr)
František Kučera <franta-hg@frantovo.cz>
parents: 237
diff changeset
    36
 │ v_0/css/styl.css          │           2988 │ https://relational-pipes.globalcode.info/v_0/css/styl.css          │
6383a4457833 examples: relpipe-in-filesystem – extended attributes (xattr)
František Kučera <franta-hg@frantovo.cz>
parents: 237
diff changeset
    37
 │ v_0/css/relpipe.css       │           1095 │ https://relational-pipes.globalcode.info/v_0/css/relpipe.css       │
6383a4457833 examples: relpipe-in-filesystem – extended attributes (xattr)
František Kučera <franta-hg@frantovo.cz>
parents: 237
diff changeset
    38
 │ v_0/css/syntaxe.css       │           3584 │ https://relational-pipes.globalcode.info/v_0/css/syntaxe.css       │
6383a4457833 examples: relpipe-in-filesystem – extended attributes (xattr)
František Kučera <franta-hg@frantovo.cz>
parents: 237
diff changeset
    39
 │ v_0/index.xhtml           │          12159 │ https://relational-pipes.globalcode.info/v_0/index.xhtml           │
6383a4457833 examples: relpipe-in-filesystem – extended attributes (xattr)
František Kučera <franta-hg@frantovo.cz>
parents: 237
diff changeset
    40
 │ v_0/grafika/logo.png      │           3298 │ https://relational-pipes.globalcode.info/v_0/grafika/logo.png      │
6383a4457833 examples: relpipe-in-filesystem – extended attributes (xattr)
František Kučera <franta-hg@frantovo.cz>
parents: 237
diff changeset
    41
 │ v_0/principles.xhtml      │          17171 │ https://relational-pipes.globalcode.info/v_0/principles.xhtml      │
6383a4457833 examples: relpipe-in-filesystem – extended attributes (xattr)
František Kučera <franta-hg@frantovo.cz>
parents: 237
diff changeset
    42
 │ v_0/roadmap.xhtml         │          11097 │ https://relational-pipes.globalcode.info/v_0/roadmap.xhtml         │
6383a4457833 examples: relpipe-in-filesystem – extended attributes (xattr)
František Kučera <franta-hg@frantovo.cz>
parents: 237
diff changeset
    43
 │ v_0/faq.xhtml             │          11080 │ https://relational-pipes.globalcode.info/v_0/faq.xhtml             │
6383a4457833 examples: relpipe-in-filesystem – extended attributes (xattr)
František Kučera <franta-hg@frantovo.cz>
parents: 237
diff changeset
    44
 │ v_0/specification.xhtml   │          12983 │ https://relational-pipes.globalcode.info/v_0/specification.xhtml   │
6383a4457833 examples: relpipe-in-filesystem – extended attributes (xattr)
František Kučera <franta-hg@frantovo.cz>
parents: 237
diff changeset
    45
 │ v_0/implementation.xhtml  │          10810 │ https://relational-pipes.globalcode.info/v_0/implementation.xhtml  │
6383a4457833 examples: relpipe-in-filesystem – extended attributes (xattr)
František Kučera <franta-hg@frantovo.cz>
parents: 237
diff changeset
    46
 │ v_0/examples.xhtml        │          76958 │ https://relational-pipes.globalcode.info/v_0/examples.xhtml        │
6383a4457833 examples: relpipe-in-filesystem – extended attributes (xattr)
František Kučera <franta-hg@frantovo.cz>
parents: 237
diff changeset
    47
 │ v_0/license.xhtml         │          65580 │ https://relational-pipes.globalcode.info/v_0/license.xhtml         │
6383a4457833 examples: relpipe-in-filesystem – extended attributes (xattr)
František Kučera <franta-hg@frantovo.cz>
parents: 237
diff changeset
    48
 │ v_0/screenshots.xhtml     │           5708 │ https://relational-pipes.globalcode.info/v_0/screenshots.xhtml     │
6383a4457833 examples: relpipe-in-filesystem – extended attributes (xattr)
František Kučera <franta-hg@frantovo.cz>
parents: 237
diff changeset
    49
 │ v_0/download.xhtml        │           5204 │ https://relational-pipes.globalcode.info/v_0/download.xhtml        │
6383a4457833 examples: relpipe-in-filesystem – extended attributes (xattr)
František Kučera <franta-hg@frantovo.cz>
parents: 237
diff changeset
    50
 │ v_0/contact.xhtml         │           4940 │ https://relational-pipes.globalcode.info/v_0/contact.xhtml         │
6383a4457833 examples: relpipe-in-filesystem – extended attributes (xattr)
František Kučera <franta-hg@frantovo.cz>
parents: 237
diff changeset
    51
 │ v_0/classic-example.xhtml │           9539 │ https://relational-pipes.globalcode.info/v_0/classic-example.xhtml │
6383a4457833 examples: relpipe-in-filesystem – extended attributes (xattr)
František Kučera <franta-hg@frantovo.cz>
parents: 237
diff changeset
    52
 ╰───────────────────────────┴────────────────┴────────────────────────────────────────────────────────────────────╯
6383a4457833 examples: relpipe-in-filesystem – extended attributes (xattr)
František Kučera <franta-hg@frantovo.cz>
parents: 237
diff changeset
    53
Record count: 20]]></pre>
6383a4457833 examples: relpipe-in-filesystem – extended attributes (xattr)
František Kučera <franta-hg@frantovo.cz>
parents: 237
diff changeset
    54
6383a4457833 examples: relpipe-in-filesystem – extended attributes (xattr)
František Kučera <franta-hg@frantovo.cz>
parents: 237
diff changeset
    55
		<p>
6383a4457833 examples: relpipe-in-filesystem – extended attributes (xattr)
František Kučera <franta-hg@frantovo.cz>
parents: 237
diff changeset
    56
			If we like the BeOS/Haiku style, we can create empty files with some attributes attached and use our filesystem as a simple database
6383a4457833 examples: relpipe-in-filesystem – extended attributes (xattr)
František Kučera <franta-hg@frantovo.cz>
parents: 237
diff changeset
    57
			and query it using relational tools.
6383a4457833 examples: relpipe-in-filesystem – extended attributes (xattr)
František Kučera <franta-hg@frantovo.cz>
parents: 237
diff changeset
    58
			It will lack indexing, but for basic scenarios like <em>address book</em> it will be fast enough
6383a4457833 examples: relpipe-in-filesystem – extended attributes (xattr)
František Kučera <franta-hg@frantovo.cz>
parents: 237
diff changeset
    59
			and we can feel a bit of BeOS/Haiku atmosphere in our contemporary GNU/Linux systems.
6383a4457833 examples: relpipe-in-filesystem – extended attributes (xattr)
František Kučera <franta-hg@frantovo.cz>
parents: 237
diff changeset
    60
			But be careful with that because some editors delete and recreate files while saving them, which destroys the xattrs.
6383a4457833 examples: relpipe-in-filesystem – extended attributes (xattr)
František Kučera <franta-hg@frantovo.cz>
parents: 237
diff changeset
    61
			Tools like <code>rsync</code> or <code>tar</code> with <code>--xattrs</code> option will backup our attributes securely.
6383a4457833 examples: relpipe-in-filesystem – extended attributes (xattr)
František Kučera <franta-hg@frantovo.cz>
parents: 237
diff changeset
    62
		</p>
237
2adb6465eadd examples: relpipe-in-filesystem
František Kučera <franta-hg@frantovo.cz>
parents: 234
diff changeset
    63
232
c7d05cf04b76 examples: Read an Atom feed using XQuery and relpipe-in-xml
František Kučera <franta-hg@frantovo.cz>
parents: 223
diff changeset
    64
		
87
25dec6931f18 Lepší odsazení, tabulátory.
František Kučera <franta-hg@frantovo.cz>
parents: 23
diff changeset
    65
	</text>
4
1bb39595a51c genrování hlavní nabídky #1
František Kučera <franta-hg@frantovo.cz>
parents: 2
diff changeset
    66
1
a05c6f3cbc3e základ, první verze
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    67
</stránka>