

Show HN: embedcurl.com - Pretty curl commands for your web site or blog - johns

Hey all,
As a CEO of a growing startup I don&#x27;t get to code as often as I like and when I do, I try not to annoy my team with my terrible code :) So to scratch the itch, I&#x27;ve built some of side projects related to what our company does. The latest is embedcurl.com<p>I see a lot of API docs and blogs posting curl commands that are really hard to read and I figured I could make them easier to read and add some niceties like easier copy&#x2F;paste, tooltips on flags, etc. They also gracefully degrade if javascript isn&#x27;t enabled back to a &lt;pre&gt; element.<p>The parsing is done in Python with shlex and argparse (thanks to my co-founder Frank for helping with that part). We&#x27;re running this on our production infrastructure so it should scale just fine.<p>My friends at loader.io have already integrated it with their API docs: http:&#x2F;&#x2F;docs.loader.io&#x2F;api&#x2F;v2&#x2F;put&#x2F;tests&#x2F;:test_id&#x2F;run.html<p>I&#x27;d really like your feedback, especially if you enter a command that doesn&#x27;t parse correctly.<p>Thanks!
======
jongalloway2
This is really cool. Would be neat if the whole experience could be embedded
using an embeddable version of hurl.it, too.

------
shawncplus
Need to wrap the url in strings, having multiple query parameters (&) in the
url will cause issues.

~~~
johns
Can you post an example command to repro so I can look into it more closely?
Thanks!

~~~
shawncplus
Not sure what you mean by repro but this is a simple command that would cause
issues if you were to run it. Not issues with your tool, but BASH will
background the command up to the ampersand and then set the variable other to
3

curl
[http://example.com/foo/123?stuff=1&other=3](http://example.com/foo/123?stuff=1&other=3)

------
Pirate-of-SV
Long flags are more readable in my opinion. I always use long flags in
scripts, the shorter version is nice on the command line though. Do you plan
to open source this? Github repo?

