Update documentation 2026-01-05
This commit is contained in:
parent
4074cc4433
commit
e973a55658
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1 @@
|
||||||
|
"use strict";(globalThis.webpackChunkproject_public_docs=globalThis.webpackChunkproject_public_docs||[]).push([[237],{2237(e,t,i){i.r(t),i.d(t,{default:()=>l});i(6540);var o=i(1312),n=i(5500),s=i(1656),r=i(3363),a=i(4848);function l(){const e=(0,o.T)({id:"theme.NotFound.title",message:"Page Not Found"});return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.be,{title:e}),(0,a.jsx)(s.A,{children:(0,a.jsx)(r.A,{})})]})}},3363(e,t,i){i.d(t,{A:()=>a});i(6540);var o=i(4164),n=i(1312),s=i(1107),r=i(4848);function a({className:e}){return(0,r.jsx)("main",{className:(0,o.A)("container margin-vert--xl",e),children:(0,r.jsx)("div",{className:"row",children:(0,r.jsxs)("div",{className:"col col--6 col--offset-3",children:[(0,r.jsx)(s.A,{as:"h1",className:"hero__title",children:(0,r.jsx)(n.A,{id:"theme.NotFound.title",description:"The title of the 404 page",children:"Page Not Found"})}),(0,r.jsx)("p",{children:(0,r.jsx)(n.A,{id:"theme.NotFound.p1",description:"The first paragraph of the 404 page",children:"We could not find what you were looking for."})}),(0,r.jsx)("p",{children:(0,r.jsx)(n.A,{id:"theme.NotFound.p2",description:"The 2nd paragraph of the 404 page",children:"Please contact the owner of the site that linked you to the original URL and let them know their link is broken."})})]})})})}}}]);
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
"use strict";(globalThis.webpackChunkproject_public_docs=globalThis.webpackChunkproject_public_docs||[]).push([[647],{7121(e,c,s){s.r(c),s.d(c,{default:()=>t});s(6540);var r=s(4164),u=s(7559),a=s(5500),l=s(2831),o=s(1656),p=s(4848);function t(e){return(0,p.jsx)(a.e3,{className:(0,r.A)(u.G.wrapper.docsPages),children:(0,p.jsx)(o.A,{children:(0,l.v)(e.route.routes)})})}}}]);
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
"use strict";(globalThis.webpackChunkproject_public_docs=globalThis.webpackChunkproject_public_docs||[]).push([[98],{1723(n,e,s){s.r(e),s.d(e,{default:()=>d});s(6540);var r=s(5500);function o(n,e){return`docs-${n}-${e}`}var c=s(3025),t=s(2831),i=s(1463),u=s(4848);function l(n){const{version:e}=n;return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(i.A,{version:e.version,tag:o(e.pluginId,e.version)}),(0,u.jsx)(r.be,{children:e.noIndex&&(0,u.jsx)("meta",{name:"robots",content:"noindex, nofollow"})})]})}function a(n){const{version:e,route:s}=n;return(0,u.jsx)(r.e3,{className:e.className,children:(0,u.jsx)(c.n,{version:e,children:(0,t.v)(s.routes)})})}function d(n){return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(l,{...n}),(0,u.jsx)(a,{...n})]})}}}]);
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1 @@
|
||||||
|
"use strict";(globalThis.webpackChunkproject_public_docs=globalThis.webpackChunkproject_public_docs||[]).push([[742],{7093(c){c.exports=JSON.parse('{"name":"docusaurus-plugin-content-docs","id":"default"}')}}]);
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
"use strict";(globalThis.webpackChunkproject_public_docs=globalThis.webpackChunkproject_public_docs||[]).push([[236],{1676(e){e.exports=JSON.parse('{"version":{"pluginId":"default","version":"current","label":"Next","banner":null,"badge":false,"noIndex":false,"className":"docs-version-current","isLast":true,"docsSidebars":{"docs":[{"type":"link","href":"/rob/artifact-editor/","label":"Artifact Editor Overview","docId":"overview","unlisted":false},{"type":"link","href":"/rob/artifact-editor/formats","label":"Artifact Editor Formats","docId":"formats","unlisted":false}]},"docs":{"formats":{"id":"formats","title":"Artifact Editor Formats","description":"PlantUML","sidebar":"docs"},"overview":{"id":"overview","title":"Artifact Editor Overview","description":"AI-enhanced editor for creating diagrams, sketches, 3D models, and other artifacts from code. Provides a split-view interface with live preview and supports multiple artifact formats.","sidebar":"docs"}}}}')}}]);
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,61 @@
|
||||||
|
/* NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress
|
||||||
|
* @license MIT */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @license React
|
||||||
|
* react-dom-client.production.js
|
||||||
|
*
|
||||||
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the MIT license found in the
|
||||||
|
* LICENSE file in the root directory of this source tree.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @license React
|
||||||
|
* react-dom.production.js
|
||||||
|
*
|
||||||
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the MIT license found in the
|
||||||
|
* LICENSE file in the root directory of this source tree.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @license React
|
||||||
|
* react-jsx-runtime.production.js
|
||||||
|
*
|
||||||
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the MIT license found in the
|
||||||
|
* LICENSE file in the root directory of this source tree.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @license React
|
||||||
|
* react.production.js
|
||||||
|
*
|
||||||
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the MIT license found in the
|
||||||
|
* LICENSE file in the root directory of this source tree.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @license React
|
||||||
|
* scheduler.production.js
|
||||||
|
*
|
||||||
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the MIT license found in the
|
||||||
|
* LICENSE file in the root directory of this source tree.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @license React v16.13.1
|
||||||
|
* react-is.production.min.js
|
||||||
|
*
|
||||||
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the MIT license found in the
|
||||||
|
* LICENSE file in the root directory of this source tree.
|
||||||
|
*/
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
(()=>{"use strict";var e,r,t,a,o,n={},i={};function d(e){var r=i[e];if(void 0!==r)return r.exports;var t=i[e]={id:e,loaded:!1,exports:{}};return n[e].call(t.exports,t,t.exports,d),t.loaded=!0,t.exports}d.m=n,d.c=i,e=[],d.O=(r,t,a,o)=>{if(!t){var n=1/0;for(u=0;u<e.length;u++){for(var[t,a,o]=e[u],i=!0,c=0;c<t.length;c++)(!1&o||n>=o)&&Object.keys(d.O).every(e=>d.O[e](t[c]))?t.splice(c--,1):(i=!1,o<n&&(n=o));if(i){e.splice(u--,1);var l=a();void 0!==l&&(r=l)}}return r}o=o||0;for(var u=e.length;u>0&&e[u-1][2]>o;u--)e[u]=e[u-1];e[u]=[t,a,o]},d.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return d.d(r,{a:r}),r},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,d.t=function(e,a){if(1&a&&(e=this(e)),8&a)return e;if("object"==typeof e&&e){if(4&a&&e.__esModule)return e;if(16&a&&"function"==typeof e.then)return e}var o=Object.create(null);d.r(o);var n={};r=r||[null,t({}),t([]),t(t)];for(var i=2&a&&e;("object"==typeof i||"function"==typeof i)&&!~r.indexOf(i);i=t(i))Object.getOwnPropertyNames(i).forEach(r=>n[r]=()=>e[r]);return n.default=()=>e,d.d(o,n),o},d.d=(e,r)=>{for(var t in r)d.o(r,t)&&!d.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},d.f={},d.e=e=>Promise.all(Object.keys(d.f).reduce((r,t)=>(d.f[t](e,r),r),[])),d.u=e=>"assets/js/"+({48:"a94703ab",98:"a7bd4aaa",236:"dce48814",256:"ddfcd1e0",401:"17896441",413:"1db64337",647:"5e95c892",742:"aba21aa0"}[e]||e)+"."+{48:"b8c77466",98:"3ba34601",236:"8ee945a4",237:"447ba118",256:"80601b11",401:"a2525508",413:"93488b5b",647:"a3b66919",742:"4a552a5c"}[e]+".js",d.miniCssF=e=>{},d.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),a={},o="project-public-docs:",d.l=(e,r,t,n)=>{if(a[e])a[e].push(r);else{var i,c;if(void 0!==t)for(var l=document.getElementsByTagName("script"),u=0;u<l.length;u++){var f=l[u];if(f.getAttribute("src")==e||f.getAttribute("data-webpack")==o+t){i=f;break}}i||(c=!0,(i=document.createElement("script")).charset="utf-8",d.nc&&i.setAttribute("nonce",d.nc),i.setAttribute("data-webpack",o+t),i.src=e),a[e]=[r];var s=(r,t)=>{i.onerror=i.onload=null,clearTimeout(p);var o=a[e];if(delete a[e],i.parentNode&&i.parentNode.removeChild(i),o&&o.forEach(e=>e(t)),r)return r(t)},p=setTimeout(s.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=s.bind(null,i.onerror),i.onload=s.bind(null,i.onload),c&&document.head.appendChild(i)}},d.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},d.p="/rob/artifact-editor/",d.gca=function(e){return e={17896441:"401",a94703ab:"48",a7bd4aaa:"98",dce48814:"236",ddfcd1e0:"256","1db64337":"413","5e95c892":"647",aba21aa0:"742"}[e]||e,d.p+d.u(e)},(()=>{var e={354:0,869:0};d.f.j=(r,t)=>{var a=d.o(e,r)?e[r]:void 0;if(0!==a)if(a)t.push(a[2]);else if(/^(354|869)$/.test(r))e[r]=0;else{var o=new Promise((t,o)=>a=e[r]=[t,o]);t.push(a[2]=o);var n=d.p+d.u(r),i=new Error;d.l(n,t=>{if(d.o(e,r)&&(0!==(a=e[r])&&(e[r]=void 0),a)){var o=t&&("load"===t.type?"missing":t.type),n=t&&t.target&&t.target.src;i.message="Loading chunk "+r+" failed.\n("+o+": "+n+")",i.name="ChunkLoadError",i.type=o,i.request=n,a[1](i)}},"chunk-"+r,r)}},d.O.j=r=>0===e[r];var r=(r,t)=>{var a,o,[n,i,c]=t,l=0;if(n.some(r=>0!==e[r])){for(a in i)d.o(i,a)&&(d.m[a]=i[a]);if(c)var u=c(d)}for(r&&r(t);l<n.length;l++)o=n[l],d.o(e,o)&&e[o]&&e[o][0](),e[o]=0;return d.O(u)},t=globalThis.webpackChunkproject_public_docs=globalThis.webpackChunkproject_public_docs||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})()})();
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?><urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:news="http://www.google.com/schemas/sitemap-news/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns:video="http://www.google.com/schemas/sitemap-video/1.1"><url><loc>https://pages.brrd.tech/rob/artifact-editor/formats</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://pages.brrd.tech/rob/artifact-editor/</loc><changefreq>weekly</changefreq><priority>0.5</priority></url></urlset>
|
||||||
|
|
@ -0,0 +1,307 @@
|
||||||
|
Metadata-Version: 2.4
|
||||||
|
Name: artifact-editor
|
||||||
|
Version: 0.1.0
|
||||||
|
Summary: AI-enhanced editor for creating diagrams, sketches, 3D models, and other artifacts from code
|
||||||
|
Author: Rob
|
||||||
|
License: MIT
|
||||||
|
Project-URL: Homepage, https://gitea.brrd.tech/rob/artifact-editor
|
||||||
|
Project-URL: Repository, https://gitea.brrd.tech/rob/artifact-editor.git
|
||||||
|
Keywords: diagrams,uml,mermaid,openscad,3d,artifacts,editor,ai
|
||||||
|
Classifier: Development Status :: 2 - Pre-Alpha
|
||||||
|
Classifier: Environment :: Console
|
||||||
|
Classifier: Intended Audience :: Developers
|
||||||
|
Classifier: License :: OSI Approved :: MIT License
|
||||||
|
Classifier: Operating System :: POSIX :: Linux
|
||||||
|
Classifier: Programming Language :: Python :: 3
|
||||||
|
Classifier: Programming Language :: Python :: 3.10
|
||||||
|
Classifier: Programming Language :: Python :: 3.11
|
||||||
|
Classifier: Programming Language :: Python :: 3.12
|
||||||
|
Classifier: Topic :: Multimedia :: Graphics
|
||||||
|
Classifier: Topic :: Software Development :: Documentation
|
||||||
|
Requires-Python: >=3.10
|
||||||
|
Description-Content-Type: text/markdown
|
||||||
|
Requires-Dist: PyYAML>=6.0
|
||||||
|
Provides-Extra: tui
|
||||||
|
Requires-Dist: urwid>=2.1.0; extra == "tui"
|
||||||
|
Provides-Extra: gui
|
||||||
|
Requires-Dist: PyQt6>=6.4.0; extra == "gui"
|
||||||
|
Requires-Dist: QScintilla>=2.14.0; extra == "gui"
|
||||||
|
Provides-Extra: mermaid
|
||||||
|
Provides-Extra: openscad
|
||||||
|
Requires-Dist: solidpython2>=2.0.0; extra == "openscad"
|
||||||
|
Provides-Extra: all
|
||||||
|
Requires-Dist: urwid>=2.1.0; extra == "all"
|
||||||
|
Requires-Dist: PyQt6>=6.4.0; extra == "all"
|
||||||
|
Requires-Dist: QScintilla>=2.14.0; extra == "all"
|
||||||
|
Requires-Dist: solidpython2>=2.0.0; extra == "all"
|
||||||
|
Provides-Extra: dev
|
||||||
|
Requires-Dist: pytest>=7.0; extra == "dev"
|
||||||
|
Requires-Dist: pytest-cov>=4.0; extra == "dev"
|
||||||
|
Requires-Dist: urwid>=2.1.0; extra == "dev"
|
||||||
|
Requires-Dist: PyQt6>=6.4.0; extra == "dev"
|
||||||
|
Requires-Dist: QScintilla>=2.14.0; extra == "dev"
|
||||||
|
|
||||||
|
# Artifact Editor
|
||||||
|
|
||||||
|
**AI-enhanced editor for creating diagrams, sketches, 3D models, and other artifacts from code.**
|
||||||
|
|
||||||
|
A standalone PyQt6-based editor for creating visual artifacts. Designed to integrate with discussion tools, documentation systems, and IDEs.
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
- **Split-view interface** - Code editor on the left, live preview on the right
|
||||||
|
- **Multi-format support** - PlantUML, Mermaid, OpenSCAD, Code, SVG, and Excalidraw
|
||||||
|
- **Format switching** - Change formats on the fly; file extension updates automatically
|
||||||
|
- **Interactive SVG editing** - Click to select, drag to move, resize with handles
|
||||||
|
- **Elements panel** - View and manage diagram elements
|
||||||
|
- **Visual editing** - Add, edit, and delete elements via dialogs or directly in preview
|
||||||
|
- **Templates** - Start from pre-built templates for common diagrams
|
||||||
|
- **Syntax highlighting** - Format-specific code highlighting
|
||||||
|
- **Live preview** - See changes as you type (bidirectional sync)
|
||||||
|
- **Undo/Redo** - Works for both code and visual changes
|
||||||
|
- **3D controls** - Rotate/pan OpenSCAD models with mouse
|
||||||
|
- **AI-powered generation** - Describe what you want, AI generates the code
|
||||||
|
- **Voice input** - Dictation with visual countdown timer (10 seconds)
|
||||||
|
- **Save & Exit** - Quick toolbar button for integration workflows
|
||||||
|
|
||||||
|
## Supported Artifact Types
|
||||||
|
|
||||||
|
| Type | Description | Features |
|
||||||
|
|------|-------------|----------|
|
||||||
|
| `plantuml` | UML diagrams (class, sequence, component, etc.) | Element editing, relationships, click-to-select |
|
||||||
|
| `mermaid` | Flowcharts, sequence, ER, state diagrams | Node editing with shapes, connections |
|
||||||
|
| `openscad` | 3D parametric CAD models | Transform controls (translate/rotate/scale), module insertion |
|
||||||
|
| `code` | Syntax-highlighted code snippets | 500+ languages, multiple themes, line numbers, font size |
|
||||||
|
| `svg` | Direct SVG graphics editing | Interactive visual editing, drag/resize, UI wireframes |
|
||||||
|
| `excalidraw` | Hand-drawn style diagrams | Sketch-like visuals, AI-readable JSON, whiteboard style |
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Clone and install
|
||||||
|
git clone https://gitea.brrd.tech/rob/artifact-editor.git
|
||||||
|
cd artifact-editor
|
||||||
|
pip install -e .
|
||||||
|
|
||||||
|
# Or just install dependencies
|
||||||
|
pip install PyQt6
|
||||||
|
|
||||||
|
# Optional renderers
|
||||||
|
sudo apt install plantuml # For PlantUML
|
||||||
|
npm install -g @mermaid-js/mermaid-cli # For Mermaid
|
||||||
|
sudo apt install openscad # For 3D CAD
|
||||||
|
pip install pygments pillow # For code syntax highlighting
|
||||||
|
```
|
||||||
|
|
||||||
|
## Docker
|
||||||
|
|
||||||
|
Run without installing anything locally (all dependencies included):
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Clone the repo
|
||||||
|
git clone https://gitea.brrd.tech/rob/artifact-editor.git
|
||||||
|
cd artifact-editor
|
||||||
|
|
||||||
|
# Build (automatically clones SmartTools from Gitea)
|
||||||
|
docker-compose build
|
||||||
|
|
||||||
|
# Run tests
|
||||||
|
docker-compose run --rm test
|
||||||
|
|
||||||
|
# Use the CLI tools
|
||||||
|
docker-compose run --rm cli artifact-ai --format plantuml --instruction "Create a class diagram"
|
||||||
|
echo "@startuml\nA->B\n@enduml" | docker-compose run --rm cli artifact-export --format plantuml --to /dev/stdout
|
||||||
|
|
||||||
|
# Launch GUI (requires X11: xhost +local:docker)
|
||||||
|
docker-compose run --rm gui
|
||||||
|
|
||||||
|
# Interactive shell
|
||||||
|
docker-compose run --rm shell
|
||||||
|
```
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
### Launch the GUI Editor
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Launch with default (PlantUML)
|
||||||
|
artifact-editor
|
||||||
|
|
||||||
|
# Launch for specific format
|
||||||
|
artifact-editor --type mermaid
|
||||||
|
artifact-editor --type openscad
|
||||||
|
artifact-editor --type code
|
||||||
|
artifact-editor --type svg
|
||||||
|
artifact-editor --type excalidraw
|
||||||
|
|
||||||
|
# Open existing file
|
||||||
|
artifact-editor --type plantuml --initial-file diagram.puml
|
||||||
|
```
|
||||||
|
|
||||||
|
### GUI Features
|
||||||
|
|
||||||
|
**Elements Panel (right sidebar):**
|
||||||
|
- **+Element** - Add new elements (nodes, shapes, primitives)
|
||||||
|
- **+Connection** - Add relationships between elements
|
||||||
|
- **Double-click** - Edit existing elements in a dialog
|
||||||
|
- **Delete** - Remove selected elements
|
||||||
|
|
||||||
|
**For PlantUML:**
|
||||||
|
- Add classes, interfaces, actors, components, etc.
|
||||||
|
- Define relationships (inheritance, composition, etc.)
|
||||||
|
- Click on elements in the preview to select in code
|
||||||
|
|
||||||
|
**For Mermaid:**
|
||||||
|
- Add flowchart nodes with various shapes (rectangle, diamond, circle, etc.)
|
||||||
|
- Add sequence diagram participants
|
||||||
|
- Create connections between nodes
|
||||||
|
|
||||||
|
**For OpenSCAD:**
|
||||||
|
- Add 3D primitives (cube, sphere, cylinder)
|
||||||
|
- Add 2D shapes (circle, square)
|
||||||
|
- Boolean operations (union, difference, intersection)
|
||||||
|
- Transform wrappers (translate, rotate, scale)
|
||||||
|
- Insert at cursor, end of file, or inside modules
|
||||||
|
- 3D preview with mouse rotation
|
||||||
|
|
||||||
|
**For Code:**
|
||||||
|
- Syntax highlighting for 500+ programming languages
|
||||||
|
- Multiple color themes (Monokai, Dracula, GitHub, etc.)
|
||||||
|
- Line numbers toggle
|
||||||
|
- Adjustable font size
|
||||||
|
- Live preview as you type
|
||||||
|
|
||||||
|
**For SVG:**
|
||||||
|
- **Interactive visual editing** - Click elements to select, drag to move, resize with corner handles
|
||||||
|
- Direct vector graphics editing in code or visually
|
||||||
|
- UI wireframe templates (login forms, dashboards, mobile screens)
|
||||||
|
- Pre-built UI components (buttons, inputs, cards, modals, navbars)
|
||||||
|
- System architecture and flowchart templates
|
||||||
|
- Pixel-perfect element positioning using SVG renderer bounds
|
||||||
|
- Delete key removes selected elements
|
||||||
|
- All visual changes are undoable with Ctrl+Z
|
||||||
|
|
||||||
|
**For Excalidraw:**
|
||||||
|
- Hand-drawn/sketch-style diagrams
|
||||||
|
- AI-readable JSON format (perfect for AI collaboration)
|
||||||
|
- Whiteboard-style visuals that invite discussion
|
||||||
|
- Flowcharts, mind maps, and wireframe templates
|
||||||
|
- Exports to SVG or native .excalidraw format
|
||||||
|
|
||||||
|
## Architecture
|
||||||
|
|
||||||
|
```
|
||||||
|
artifact-editor/
|
||||||
|
├── src/artifact_editor/
|
||||||
|
│ ├── cli.py # CLI entry point
|
||||||
|
│ ├── gui.py # PyQt6 main window
|
||||||
|
│ ├── dialogs.py # Element/relationship dialogs
|
||||||
|
│ ├── parser.py # PlantUML parser
|
||||||
|
│ ├── mermaid_parser.py # Mermaid parser
|
||||||
|
│ ├── openscad_parser.py # OpenSCAD parser
|
||||||
|
│ ├── templates.py # Diagram templates
|
||||||
|
│ └── renderers/ # Convert source to visual output
|
||||||
|
│ ├── plantuml.py
|
||||||
|
│ ├── mermaid.py
|
||||||
|
│ ├── openscad.py
|
||||||
|
│ ├── code.py # Pygments-based syntax highlighting
|
||||||
|
│ ├── svg.py # Direct SVG editing with UI components
|
||||||
|
│ └── excalidraw.py # Hand-drawn style diagrams
|
||||||
|
└── smarttools/ # CLI tools following Unix philosophy
|
||||||
|
├── artifact-ai/ # AI-powered artifact generation/modification
|
||||||
|
└── artifact-export/ # Render source to binary formats
|
||||||
|
```
|
||||||
|
|
||||||
|
## CLI SmartTools
|
||||||
|
|
||||||
|
In addition to the GUI, artifact-editor provides command-line SmartTools:
|
||||||
|
|
||||||
|
### artifact-ai
|
||||||
|
|
||||||
|
Generate or modify artifacts using AI:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Create new artifact
|
||||||
|
echo "" | artifact-ai --format plantuml --instruction "Create a sequence diagram for user login"
|
||||||
|
|
||||||
|
# Modify existing artifact
|
||||||
|
cat diagram.puml | artifact-ai --format plantuml --instruction "Add a cache layer between API and database"
|
||||||
|
|
||||||
|
# Supported formats: plantuml, mermaid, openscad, svg, excalidraw, code
|
||||||
|
```
|
||||||
|
|
||||||
|
### artifact-export
|
||||||
|
|
||||||
|
Render artifacts to binary formats:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# PlantUML to SVG
|
||||||
|
cat diagram.puml | artifact-export --format plantuml --to output.svg
|
||||||
|
|
||||||
|
# OpenSCAD to PNG
|
||||||
|
cat model.scad | artifact-export --format openscad --to output.png
|
||||||
|
|
||||||
|
# Mermaid to PDF
|
||||||
|
cat flowchart.mmd | artifact-export --format mermaid --to output.pdf
|
||||||
|
```
|
||||||
|
|
||||||
|
Install SmartTools with `./install.sh` (requires SmartTools framework).
|
||||||
|
|
||||||
|
## Keyboard Shortcuts
|
||||||
|
|
||||||
|
- **Ctrl+S** - Save file
|
||||||
|
- **Ctrl+Z** - Undo (works for both code and visual edits)
|
||||||
|
- **Ctrl+Y** - Redo
|
||||||
|
- **Ctrl+R** - Force re-render preview
|
||||||
|
- **Delete** - Remove selected element (SVG mode)
|
||||||
|
- **Ctrl+Mouse wheel** - Zoom preview
|
||||||
|
- **Click+Drag** - Move elements in SVG preview
|
||||||
|
- **Corner handles** - Resize selected elements in SVG preview
|
||||||
|
|
||||||
|
## AI Input Panel
|
||||||
|
|
||||||
|
The bottom panel provides AI-assisted artifact creation:
|
||||||
|
|
||||||
|
- **Text input** - Describe what you want in natural language
|
||||||
|
- **Dictate button** - Voice input with 10-second countdown timer
|
||||||
|
- Shows `🎤 9s`, `🎤 8s`, etc. while recording
|
||||||
|
- Transcription appears in the input field for editing
|
||||||
|
- **AI Generate button** - Generates or modifies the artifact based on your description
|
||||||
|
- For new artifacts: Creates complete diagram code
|
||||||
|
- For existing content: Modifies based on instructions
|
||||||
|
- Handles retry with error context if generation fails
|
||||||
|
|
||||||
|
## Integration
|
||||||
|
|
||||||
|
The editor can be launched from other applications:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Launch and specify output
|
||||||
|
artifact-editor --type TYPE --output /path/to/output.svg
|
||||||
|
|
||||||
|
# Exit codes:
|
||||||
|
# 0 - Saved successfully (stdout: "ARTIFACT_SAVED:/path/to/output.svg")
|
||||||
|
# 1 - Cancelled by user
|
||||||
|
# 2 - Error (stderr: error message)
|
||||||
|
```
|
||||||
|
|
||||||
|
Example Python integration:
|
||||||
|
```python
|
||||||
|
import subprocess
|
||||||
|
|
||||||
|
result = subprocess.run([
|
||||||
|
"artifact-editor",
|
||||||
|
"--type", "mermaid",
|
||||||
|
"--output", "/tmp/diagram.svg",
|
||||||
|
], capture_output=True, text=True)
|
||||||
|
|
||||||
|
if result.returncode == 0:
|
||||||
|
for line in result.stdout.split('\n'):
|
||||||
|
if line.startswith("ARTIFACT_SAVED:"):
|
||||||
|
artifact_path = line.split(":", 1)[1]
|
||||||
|
print(f"Created: {artifact_path}")
|
||||||
|
```
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
MIT
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
README.md
|
||||||
|
pyproject.toml
|
||||||
|
src/artifact_editor/__init__.py
|
||||||
|
src/artifact_editor/cli.py
|
||||||
|
src/artifact_editor/dialogs.py
|
||||||
|
src/artifact_editor/excalidraw_parser.py
|
||||||
|
src/artifact_editor/gui.py
|
||||||
|
src/artifact_editor/mermaid_parser.py
|
||||||
|
src/artifact_editor/openscad_parser.py
|
||||||
|
src/artifact_editor/parser.py
|
||||||
|
src/artifact_editor/svg_interactive.py
|
||||||
|
src/artifact_editor/svg_parser.py
|
||||||
|
src/artifact_editor/svg_scene.py
|
||||||
|
src/artifact_editor/templates.py
|
||||||
|
src/artifact_editor.egg-info/PKG-INFO
|
||||||
|
src/artifact_editor.egg-info/SOURCES.txt
|
||||||
|
src/artifact_editor.egg-info/dependency_links.txt
|
||||||
|
src/artifact_editor.egg-info/entry_points.txt
|
||||||
|
src/artifact_editor.egg-info/requires.txt
|
||||||
|
src/artifact_editor.egg-info/top_level.txt
|
||||||
|
src/artifact_editor/renderers/__init__.py
|
||||||
|
src/artifact_editor/renderers/code.py
|
||||||
|
src/artifact_editor/renderers/excalidraw.py
|
||||||
|
src/artifact_editor/renderers/mermaid.py
|
||||||
|
src/artifact_editor/renderers/openscad.py
|
||||||
|
src/artifact_editor/renderers/plantuml.py
|
||||||
|
src/artifact_editor/renderers/svg.py
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
[console_scripts]
|
||||||
|
artifact-editor = artifact_editor.cli:main
|
||||||
|
|
@ -0,0 +1,26 @@
|
||||||
|
PyYAML>=6.0
|
||||||
|
|
||||||
|
[all]
|
||||||
|
urwid>=2.1.0
|
||||||
|
PyQt6>=6.4.0
|
||||||
|
QScintilla>=2.14.0
|
||||||
|
solidpython2>=2.0.0
|
||||||
|
|
||||||
|
[dev]
|
||||||
|
pytest>=7.0
|
||||||
|
pytest-cov>=4.0
|
||||||
|
urwid>=2.1.0
|
||||||
|
PyQt6>=6.4.0
|
||||||
|
QScintilla>=2.14.0
|
||||||
|
|
||||||
|
[gui]
|
||||||
|
PyQt6>=6.4.0
|
||||||
|
QScintilla>=2.14.0
|
||||||
|
|
||||||
|
[mermaid]
|
||||||
|
|
||||||
|
[openscad]
|
||||||
|
solidpython2>=2.0.0
|
||||||
|
|
||||||
|
[tui]
|
||||||
|
urwid>=2.1.0
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
artifact_editor
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -0,0 +1 @@
|
||||||
|
python3
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
/usr/bin/python3
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
python3
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
lib
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
home = /usr/bin
|
||||||
|
include-system-site-packages = false
|
||||||
|
version = 3.12.3
|
||||||
|
executable = /usr/bin/python3.12
|
||||||
|
command = /usr/bin/python3 -m venv /home/rob/PycharmProjects/artifact-editor/venv
|
||||||
Loading…
Reference in New Issue