Skip to content

aklaswad/maxpat2svg

Repository files navigation

maxpat2svg

Generate cheep SVG copy from *.maxpat file for Cycling '74 Max patchers.

And, this repository has a web implementation for showing graphical diff for patchers.

Online version / show diffs for GitHub repositories

See online demo at https://aklaswad.github.io/maxpat2svg/?url=https://github.com/aklaswad/maxpat2svg/commit/fc7d694ff9238bd7e7bd159029783184a05cc626

Currently, these GitHub URL forms are supported.

Here is a bookmarklet to open online diff.html hosted on GitHub pages. Copy this snippet and save as bookmark.

javascript:window.open('https://aklaswad.github.io/maxpat2svg/?url=' + location.href, '_blank')

Or go to https://aklaswad.github.io/maxpat2svg/bookmarklet.html for Drag'n'drop install.

Note

Online plain HTML version has no authentication for GitHub, it means you will get a 60 requests/hour rate limit.

  • TODO - Provide a way to use diff.html with GitHub token

Diff on local git

maxpat2svg can also show diffs for local git repository.

Requirements

  • Max
  • git
  • bash

Currently, tested only with git-bash for windows.

Set up for local git

  1. Download latest release maxpat2svg-*.zip from https://github.com/aklaswad/maxpat2svg/releases
  2. Unzip and put it somewhere you want
  3. Add this section to ~/.gitconfig or project's .git/config
[difftool "max"]
  cmd = '/path/to/maxpat2svg/maxdiff.sh' $LOCAL $REMOTE

On windows(git-bash), it might be like below

[difftool "max"]
	cmd = 'C:/Users/foo/bar/maxpat2svg-vX.Y.Z/maxdiff.sh' $LOCAL $REMOTE
  1. Open diff via git difftool for your git project
$ git difftool -d -t max

How local diff works?

Currently, maxdiff.sh will start local web server via Node4Max (for just let Max users save time to install another node.js 😁 ). For first diff, it will take a few seconds to open the patcher, or launch Max itself. While server is running, diff will be shown immediately so recommend to not close the opened patcher.

About

Generate svg for maxpat file

Resources

Stars

Watchers

Forks

Packages

No packages published