Skip to content

Instantly share code, notes, and snippets.

@fxg42
Created December 10, 2012 18:32
Show Gist options
  • Save fxg42/4252342 to your computer and use it in GitHub Desktop.
Save fxg42/4252342 to your computer and use it in GitHub Desktop.
build urls for websequencediagrams.com
qs = require 'querystring'
diagram = """
title Foo bar baz
a -> b: do b.m()
b -> c: do c.m()
"""
baseUrl = "http://www.websequencediagrams.com/cgi-bin/cdraw"
opts =
lz: (new Buffer diagram.replace /\n/g, '\n\n').toString 'base64'
s: "rose"
console.log "#{baseUrl}?#{qs.stringify opts}"
@BenoitDuffez
Copy link

No longer works; have you maybe updated your script?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment