mirror of
https://github.com/teamchong/pxpipe.git
synced 2026-07-22 02:02:51 +02:00
docs: document offline export workflow (#79)
This commit is contained in:
@@ -66,6 +66,22 @@ normally — pxpipe compresses the *request* only, never the model's output.
|
||||
Recent turns stay text; the system prompt, tool docs, and older bulk history
|
||||
are imaged.
|
||||
|
||||
## Offline export (no proxy)
|
||||
|
||||
You can render text, files, or diffs to PNG pages without running the proxy or
|
||||
connecting Claude Code:
|
||||
|
||||
```bash
|
||||
pxpipe export src/
|
||||
cat prompt.txt | pxpipe export --stdin
|
||||
pxpipe export --git
|
||||
```
|
||||
|
||||
The command writes an output folder containing `page-*.png`, `factsheet.txt`,
|
||||
`manifest.json`, and `prompt.txt`. Upload the PNG pages and paste the prompt
|
||||
into image-upload clients such as Cursor when you want dense visual context
|
||||
without running the proxy.
|
||||
|
||||
## The honest part
|
||||
|
||||
- **It is lossy.** Exact 12-char hex strings in dense imaged content:
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import * as fs from 'node:fs';
|
||||
|
||||
const README_PATH = 'README.md';
|
||||
const OFFLINE_EXPORT_HEADING = '## Offline export (no proxy)';
|
||||
const REQUIRED_OFFLINE_EXPORT_TEXT = [
|
||||
'pxpipe export',
|
||||
'--stdin',
|
||||
'--git',
|
||||
'page-*.png',
|
||||
'factsheet.txt',
|
||||
'prompt.txt',
|
||||
'Cursor',
|
||||
'without running the proxy',
|
||||
] as const;
|
||||
|
||||
describe('README offline export documentation', () => {
|
||||
it('documents the proxy-free image export workflow', () => {
|
||||
const readme = fs.readFileSync(README_PATH, 'utf8');
|
||||
const sectionStart = readme.indexOf(OFFLINE_EXPORT_HEADING);
|
||||
|
||||
expect(sectionStart).toBeGreaterThanOrEqual(0);
|
||||
|
||||
const nextSectionStart = readme.indexOf('\n## ', sectionStart + OFFLINE_EXPORT_HEADING.length);
|
||||
const section =
|
||||
nextSectionStart === -1 ? readme.slice(sectionStart) : readme.slice(sectionStart, nextSectionStart);
|
||||
|
||||
for (const requiredText of REQUIRED_OFFLINE_EXPORT_TEXT) {
|
||||
expect(section).toContain(requiredText);
|
||||
}
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user