Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow posting new note with content #673

Merged
merged 1 commit into from
Jan 20, 2018
Merged

Conversation

fooker
Copy link
Contributor

@fooker fooker commented Jan 11, 2018

This allows to specify initial content while creating a new note.

@ccoenen
Copy link
Contributor

ccoenen commented Jan 11, 2018

Interesting! Can you give an example on when you use this? And perhaps an example of how you use it?

@fooker
Copy link
Contributor Author

fooker commented Jan 11, 2018

We would like to use hackmd for filling protocols of regular meetings. Using this, we preseed the per-meeting note with a protocol template and publish it to the participants. We're planing to do this with an IRC bot, but it is a hacky shell script right now. It basicly does something like this:

curl -v -XPOST -H 'Content-Type: text/markdown' 'http://localhost:3000/new' -d @template.md

@SISheogorath
Copy link
Contributor

Nice work!

Could you please sign-off the commit?

https://github.com/hackmdio/hackmd/blob/master/CONTRIBUTING.md#sign-your-work

@SISheogorath SISheogorath added the feature Wants to add a new feature label Jan 18, 2018
@SISheogorath SISheogorath added this to the Next release milestone Jan 18, 2018
Signed-off-by: Dustin Frisch <fooker@lab.sh>
@fooker
Copy link
Contributor Author

fooker commented Jan 18, 2018

Sure. Updated...

Copy link
Contributor

@SISheogorath SISheogorath left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Locally tested. Works fine when using:

curl -XPOST -H 'Content-Type: text/markdown' --data-binary "@public/docs/features.md" http://localhost:3000/new

@SISheogorath
Copy link
Contributor

Needs some docs on the Features page.

Thanks for your contribution! 👍

@rmst
Copy link

rmst commented Aug 31, 2018

Hi is it possible to use this on hackmd.io ? I tried

curl -v -XPOST -H 'Content-Type: text/markdown' 'https://hackmd.io/new' -d test123

and got back

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>Cannot POST /new</pre>
</body>
</html>

@SISheogorath
Copy link
Contributor

@rmst No, this was after the split between HackMD EE/HackMD.io and CodiMD (former HackMD CE), so it never got there.

@rmst
Copy link

rmst commented Aug 31, 2018

Oh right, I've made that mistake before.. github.com/hackmdio just looks soo much like it belongs to hackmd.io.
So I found https://notes.ethereum.org and the curl worked, so I suppose that's the official site where CodiML is hosted? Is there a place where I could read up on the story of CodiMD and hackmd.io etc?

I found both are stunningly similar. The only functional differences I've noted so far are:

  • hackmd.io has link-autocomplete
  • notes.ethereum.org has this 'API' for inserting content into new notes.
    Are there any other functional differences?

@SISheogorath
Copy link
Contributor

SISheogorath commented Aug 31, 2018

We have actually nothing to do with https://notes.ethereum.org/ besides the fact that they happen to run an instance of CodiMD

CodiMD has no official hosted instance. There is https://hackmd-ce.herokuapp.com which is our test/demo instance which runs the latest master.

We recommend to self-host your instance if you want to use CodiMD. We also have an upcoming community call on sunday, if you want to meet some community members (see #911).

About the HackMD vs CodiMD story: Please check #720 and the "TL;DR" in our readme: https://github.com/hackmdio/codimd#hackmd-ce-became-codimd

Additionally, since this is actually out of scope of this PR, please consider to ask your questions in our Matrix channel: https://matrix.to/#/#codimd:matrix.org

@rmst
Copy link

rmst commented Aug 31, 2018

Oh interesting! Thanks for giving me all that info despite this being so off topic!

@patcon
Copy link

patcon commented Oct 26, 2018

Fwiw, seems to not work on notes.ethereum.org anymore 🤷‍♂️

@SISheogorath
Copy link
Contributor

@patcon seems like they setup a SaaS instance by the HackMD team. This doesn't support this feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Wants to add a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants