0

I want to push my blog posts with curl. the body of my blogpost is contained in a markdown file post.md

I am trying the following command:

curl -vX POST --user login:pwd -d "api_token=mytoken" -d post[body]=<post.md -d "post[title]=titre;post[is_private]=true;post[autopost]=false" http://posterous.com/api/2/sites/mysite/posts

The post is made with an empty body (or rather a "\n" body). How can I fix that ?

stanm87
  • 600
  • 4
  • 16

1 Answers1

0

This works:

curl -vX POST --user login:pwd -d "api_token=mytoken" --data-urlencode "post[body]@post.md" -d "post[title]=titre;post[is_private]=true;post[autopost]=false" http://posterous.com/api/2/sites/mysite/posts
Daniel Szmulewicz
  • 3,971
  • 2
  • 25
  • 26