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.
See online demo at https://aklaswad.github.io/maxpat2svg/?url=https://github.com/aklaswad/maxpat2svg/commit/fc7d694ff9238bd7e7bd159029783184a05cc626
Currently, these GitHub URL forms are supported.
- https://github.com/{Owner}/{Repo}/commit/{CommitHash}
- https://github.com/{Owner}/{Repo}/pull/{PullNumber}(/*)?
- https://github.com/{Owner}/{Repo}/compare/{oldsha}...{newsha}
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
maxpat2svg can also show diffs for local git repository.
- Max
- git
- bash
Currently, tested only with git-bash for windows.
- Download latest release
maxpat2svg-*.zip
from https://github.com/aklaswad/maxpat2svg/releases - Unzip and put it somewhere you want
- 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
- Open diff via
git difftool
for your git project
$ git difftool -d -t max
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.