Repository navigation
Expand file tree
/
Copy pathexport.html
More file actions
102 lines (100 loc) · 6.05 KB
/
Copy pathexport.html
File metadata and controls
102 lines (100 loc) · 6.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="description" content="Export an FTN message base as JSONL with ftnt export.">
<title>ftnt export</title>
<link rel="stylesheet" href="assets/manual.css">
</head>
<body>
<a class="skip" href="#usage">Skip to content</a>
<div class="page">
<header class="masthead">
<a class="logo-mark" href="index.html" aria-label="FTNT home">
<img class="logo" src="assets/golded-logo.png" width="600" height="205" alt="GoldED">
<span class="logo-subtitle" aria-hidden="true">for the shell</span>
</a>
<div><span>FTNT💥</span><a href="https://golded-dev.github.io/golded-ftn-python-docs/">Library docs ↗</a></div>
</header>
<div class="shell">
<div class="bar"><span>GOLDED / FTN TOOLS</span><span>RELEASED 1.1.1 · PYTHON 3.12+</span></div>
<div class="layout">
<aside><div class="sidebar">
<nav class="page-nav" aria-label="Manual"><a href="index.html">Home</a><a href="create.html">create</a><a href="write.html">write</a><a href="read.html">read</a><a href="export.html" aria-current="page">export</a><a href="decode.html">decode</a><a href="repair.html">repair</a><a href="heads.html">heads</a><a href="catalog.html">catalog</a></nav>
<details class="contents" open><summary>On this page</summary><nav class="nav" aria-label="Sections"><a href="#usage"><span class="num">00</span>Usage</a><a href="#partial"><span class="num">01</span>Partial output</a></nav></details>
</div></aside>
<main><p class="eyebrow">Every message. Not a byte copy.</p><p class="command">ftnt export</p><h1>Stream a base as JSONL.</h1><p class="hero-lead">One envelope per message. Check the exit status before trusting a partial stream.</p><section class="guide-section" id="usage"><div class="section-title"><span>00</span><h2>Usage</h2></div><p><code>ftnt export BASE --format FORMAT [options]</code></p><p>Writes one JSON envelope per message on stdout. The shape matches <a href="read.html"><code>read</code></a> without <code>--revision</code>. This is a data export, not a byte-for-byte backup. Raw metadata outside the reader model is absent.</p><div class="code-pane" id="export-pipe"><div class="code-head"><span>filter subjects</span><button type="button" data-copy="export-pipe-text" hidden>Copy code</button></div><pre><code id="export-pipe-text">ftnt export ./fixtures/general --format jam \
| jq -c 'select(.message.subject | contains("fixture"))'
</code></pre></div><div class="table-wrap"><table><thead><tr><th>Option</th><th>Meaning</th></tr></thead><tbody><tr><td><code>--archive</code></td><td>Keep going after reader issues. Each issue is a JSON object on stderr. Exit 7 when any issue was reported, otherwise 0.</td></tr><tr><td><code>--board</code></td><td>Optional Hudson filter, 1..200. Other formats reject it.</td></tr><tr><td><code>--fallback-charset</code></td><td>Default <code>CP850</code>.</td></tr></tbody></table></div></section><section class="guide-section" id="partial"><div class="section-title"><span>01</span><h2>Partial output</h2></div><p>Readers may buffer the base. If the command fails, stdout can already contain earlier messages. Check the exit status before treating the stream as complete. Without <code>--archive</code>, a reader problem stops the command instead of being collected as an issue.</p><div class="code-pane" id="export-issue"><div class="code-head"><span>reader_issue on stderr</span><button type="button" data-copy="export-issue-text" hidden>Copy code</button></div><pre><code id="export-issue-text">{"schema_version":1,"type":"reader_issue","issue":{}}
</code></pre></div><p>The <code>issue</code> object is the reader’s own report.</p></section></main>
</div></div>
<footer><span>GoldED FTN tools / GoldED.dev</span><span>RELEASED 1.1.1 · MIT LICENSE</span></footer>
</div>
<script>
const contents=document.querySelector('.contents');
if(contents && window.matchMedia('(max-width:800px)').matches) contents.open=false;
for(const button of document.querySelectorAll('[data-copy]')){
button.hidden=false;
button.addEventListener('click', async () => {
const node=document.getElementById(button.dataset.copy);
const text=node.textContent;
try {
if(navigator.clipboard && window.isSecureContext){
await navigator.clipboard.writeText(text);
} else {
const field=document.createElement('textarea');
field.value=text;
field.style.position='fixed';
field.style.opacity='0';
document.body.append(field);
field.select();
const ok=document.execCommand('copy');
field.remove();
button.focus();
if(!ok) throw new Error('copy');
}
button.textContent='Copied';
} catch {
button.textContent='Select code';
const range=document.createRange();
range.selectNodeContents(node);
const selection=window.getSelection();
selection.removeAllRanges();
selection.addRange(range);
}
setTimeout(() => button.textContent='Copy code', 1800);
});
}
const links=[...document.querySelectorAll('.nav a')];
const sections=[...document.querySelectorAll('main section')];
function markSection(id){
for(const link of links){
if(link.hash === '#' + id) link.setAttribute('aria-current','location');
else link.removeAttribute('aria-current');
}
}
function track(){
if(!sections.length) return;
let current=sections[0].id;
for(const section of sections){
if(section.getBoundingClientRect().top <= 120) current=section.id;
}
const page=document.scrollingElement;
if(page.scrollHeight > page.clientHeight &&
Math.ceil(page.scrollTop + page.clientHeight) >= page.scrollHeight - 2){
current=sections[sections.length - 1].id;
}
markSection(current);
}
window.addEventListener('scroll', track, {passive:true});
window.addEventListener('resize', track);
window.addEventListener('hashchange', () => {
const selected=links.find(link => link.hash === window.location.hash);
if(selected) markSection(selected.hash.slice(1));
else track();
});
track();
</script>
</body>
</html>