Codync
免費、開源的 1:1 替代方案,取代 Grok Bot 與 Muse。從 iPhone、Mac 或 Linux 桌面將 Claude Code、Codex、Cursor 與 40+ 程式碼代理人作為持續機器人傳訊。群組聊天、主題串…
AI 翻譯
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證a generative art library for Python
翻譯準備中
取自儲存庫 README
正在載入完整 README。
檢視完整 README ↗LineDream is object-oriented from the ground up: every shape owns its own style and transformations, so there is almost no global state to manage. Output is SVG, with groups written as Inkscape layers so a sketch goes straight to an AxiDraw or any other pen plotter. There is no draw loop; a sketch renders a single frame, and a plain Python loop is enough to make a series.
The playground runs LineDream entirely client-side with Pyodide: edit a sketch, hit run, download the SVG. Nothing to install.
Terrain turns real elevation data into line art, also in the
browser: pick a place on a topo map, stand somewhere, and draw the view as fall-line strokes, etching, labelled
contours or top-down curve families, ready for a pen plotter. Presets range from the Grand Tetons to the Pemi Loop;
scenes save to the browser, to a .json file or to a link. See browser/terrain/README.md.
pip install LineDream
# or
uv add LineDream
Python 3.9 to 3.14, on Linux, macOS and Windows.
import math
from LineDream import Canvas, Circle, Group, Line, Text
Canvas.width = 600
Canvas.height = 400
Canvas.background_color = "#F4EEE1"
# Concentric rings in their own (Inkscape/AxiDraw) layer
rings = Group(label="rings")
for r in range(10, 180, 10):
rings.add_item(Circle(300, 200, r, stroke_color="#1C1B18"))
# One continuous sine stroke, rotated about its center
wave = Line([(x, 200 + 40 * math.sin(x / 25)) for x in range(40, 561)], stroke_color="#C2410C")
wave.rotate(-15)
Text("LineDream", 24, 360, font_size=28, stroke_color="#1C1B18")
Canvas.save("hello.svg")
Canvas.save("hello.svg", open_viewer=True) opens the result as soon as it is written, and
Canvas.save("", as_string=True) returns the SVG instead of writing a file.
| Primitives | Line, Point, Circle, Ellipse, Arc, Rectangle, Square |
| Text | Text: single-stroke Hershey fonts (32 bundled), wrapped and aligned, so lettering plots as one pen line |
| Grouping | Group(label=...) becomes an Inkscape layer, which AxiDraw and similar tools plot pen by pen |
| Styling | stroke_color, stroke_width, fill_color, fill_opacity, as keyword arguments or attributes on any shape |
| Transforms | transform(x, y), rotate(degrees), rotate_x/y/z, scale(amt), applied per shape |
| Canvas | width, height, units (e.g. "mm" for plotter-ready sizes), background_color |
| Helpers | CircleMath for polar/cartesian conversions; Line.from_array for NumPy (N, 2) or (N, 3) arrays |
Subclass BaseShape, add vertices, and the new shape gets styling, transforms and SVG output for free:
import math
from LineDream import BaseShape, Canvas
class Hexagon(BaseShape):
def __init__(self, cx, cy, radius, **kwargs):
super().__init__(**kwargs)
self.close_path = True
for i in range(6):
angle = i * math.pi / 3
self.add_vertex(cx + radius * math.cos(angle), cy + radius * math.sin(angle))
Canvas.width, Canvas.height = 356, 276
Canvas.units = "mm"
Hexagon(Canvas.width / 2, Canvas.height / 2, 50).rotate(15)
Canvas.save("hexagon.svg")
More sketches, with their source, live in the gallery and in
docs/source/gallery.
LineDream is pure Python, so it installs into Pyodide with micropip:
const pyodide = await loadPyodide();
await pyodide.loadPackage(["numpy", "pillow", "lxml", "micropip"]); // CORE_PACKAGES in browser/packages.mjs
await pyodide.runPythonAsync(`
import micropip
await micropip.install("linedream")
`);
This needs 0.4.0 or later; earlier releases depend on vpype, which does not run under Pyodide.
Canvas.save(open_viewer=True) is unavailable there, so use as_string=True and hand the SVG to the page.
LineDream uses uv.
git clone https://github.com/marcrleonard/LineDream.git
cd LineDream
uv sync # .venv with LineDream (editable) and the dev tools, as pinned in uv.lock
uv run pytest
uv run --python 3.9 pytest # any supported version; uv fetches it if needed
uv run coverage run -m pytest && uv run coverage html
CI (tests.yml) runs on every pull request: the suite on Python 3.9 to 3.14 on Linux
plus macOS and Windows, a smoke test of the built wheel, the suite again under Pyodide in Node, and the terrain app's
unit tests.
numpy, pillow and lxml come from the Pyodide distribution and drawsvg from PyPI; the drawsvg[all] extras (only
used by open_viewer=True) are skipped on emscripten.
uv build --wheel
cd browser && npm install && npm test # LINEDREAM_TERRAIN=1 also loads scipy and scikit-image
cd browser && npm run test:terrain # terrain app unit tests (plain Node, no Pyodide)
# Local playground: serve the repo root, then open
# http://localhost:8000/browser/?wheel=../dist/linedream-<version>-py3-none-any.whl
python -m http.server
The website build copies the playground to /playground/ along with a wheel built from the same checkout, and the
terrain app to /terrain/.
uv run --extra docs python docs/build_website.py # output in public/
uv build # sdist and wheel into dist/
Releases are published by .github/workflows/release.yml when a v* tag is pushed, using PyPI trusted publishing
(no token). To cut one:
pyproject.toml and LineDream/__version__.py, run uv lock, and move the CHANGELOG.md
entry out of "unreleased".git tag v0.4.0 && git push origin v0.4.0.The workflow checks the tag matches both versions, builds, publishes to PyPI and creates a GitHub release with the
changelog section as its notes. uv publish still works for a manual upload.
All package metadata and dependencies live in pyproject.toml.
MIT. The bundled Hershey font data and text layout are vendored from vpype, which
adapted them from fogleman/axi; see LineDream/fonts/LICENSE.