joemccann / dillinger

The last Markdown editor, ever.
https://dillinger.io
MIT License
7.97k stars 1.11k forks source link

feature request: Gist support #8

Open millermedeiros opened 12 years ago

millermedeiros commented 12 years ago

based on 2 twits from @leaverou:

Wish I had time for a Markdown version of dabblet: An online md editor that saved to github gists. Can't seem to find anything like it :( https://twitter.com/#!/LeaVerou/status/154585603516809218

and

Dillinger http://dillinger.io/ looks quite interesting, although it's integrated with github repos, not gists. https://twitter.com/#!/LeaVerou/status/154587930374049793

joemccann commented 12 years ago

If the API supports it, which it does, should be about 1/2 day to add it. Most of the boilerplate code for communicating with the Github API is the same. Here's how I fetch a markdown file:

https://github.com/joemccann/dillinger/blob/master/app.js#L358-400

The clientside wiring is super modular too:

https://github.com/joemccann/dillinger/blob/master/public/js/dillinger.js#L1331-1372

Pull requests gladly accepted!

millermedeiros commented 12 years ago

I probably won't do it since I'm not using Dillinger or creating lots of Gists (I'm using Vim to edit my mdown files..). I added the feature request since I saw the twits from @leaverou and I'm not sure if she realized that the project was open source and to let you know that some people would like this feature. cheers.

joemccann commented 12 years ago

Hey no worries! I really appreciate you taking the time to aggregate the tweets into a feature request. I'll probably just build it myself, but always open to other contributors. Thanks!

LeaVerou commented 12 years ago

Joe, I've worked on the Gist API for dabblet, so its code or UX patterns might help: https://github.com/LeaVerou/dabblet

joemccann commented 12 years ago

@LeaVerou thanks, will have a look. @github's API is a thing of beauty so it should be straightforward.

tasuki commented 11 years ago

+1

Not a js expert, but will give this a go when the weather becomes a little worse.

joemccann commented 11 years ago

@tasuk that'd be great. thanks!

bigeasy commented 10 years ago

What blocked this? Anything in particular or did it just never end up happening?

joemccann commented 10 years ago

No one implemented it.

ghost commented 10 years ago

I would like to, I have some experience with javascript. jquery. perhaps we could start off with a simple task?

odedw commented 9 years ago

Hey @joemccann, I'd like to take a look at this. I think it'll be easier if gists were separate from repositories meaning you'll have a "save to github" as well as a "save to gist" option in the menu. Authentication can be different as well as gists are a separate scope, or we can authenticate both together.

What do you think?

joemccann commented 9 years ago

Totally open to adding gist support but it needs to be another plugin, meaning, app code, UI code, interaction design, etc. all needs to be hashed out. I'm all for adding it if it adheres to current Dillinger approach

On Sun, Nov 1, 2015 at 12:10 AM, Oded Welgreen notifications@github.com wrote:

Hey @joemccann https://github.com/joemccann, I'd like to take a look at this. I think it'll be easier if gists were separate from repositories meaning you'll have a "save to github" as well as a "save to gist" option in the menu. Authentication can be different as well as gists are a separate scope, or we can authenticate both togetheer.

What do you think?

— Reply to this email directly or view it on GitHub https://github.com/joemccann/dillinger/issues/8#issuecomment-152801920.

odedw commented 9 years ago

I agree that the UI code should be separate, but why should it be a separate plugin? don't you think it'll be easier to add functionality to the existing GitHub plugin? there's probably a lot of code there that we can reuse no?

joemccann commented 9 years ago

I suppose we could extend the github plugin code but it may make sense to unbundle the github plugin itself to have GH-repos an GH-gists or something along those lines. Make sense? Gists and repos APIs have their own version on GH so bundling them under one repo concerns me

On Mon, Nov 2, 2015 at 12:21 PM, Oded Welgreen notifications@github.com wrote:

I agree that the UI code should be separate, but why should it be a separate plugin? don't you think it'll be easier to add functionality to the existing GitHub plugin? there's probably a lot of code there that we can reuse no?

— Reply to this email directly or view it on GitHub https://github.com/joemccann/dillinger/issues/8#issuecomment-153145680.

odedw commented 9 years ago

Makes sense. I'll try to get into it and let you know how it goes.