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

Options without values, like "smart" or "table_of_contents," fail #17

Closed
wcaleb opened this issue May 5, 2013 · 5 comments
Closed

Options without values, like "smart" or "table_of_contents," fail #17

wcaleb opened this issue May 5, 2013 · 5 comments

Comments

@wcaleb
Copy link

wcaleb commented May 5, 2013

I have been unable to get Docverter to accept requests that include options such as smart and table_of_contents that have no values other than "true" or "false."

For example, this command

  curl http://c.docverter.com/convert -F from=markdown -F to=pdf -F smart=true -F input_files[]=@input.txt

returns the errors contained in this gist.

I have tried the same command with different to= values and different input files, as well as true/false options other than smart=, and it looks like I get the same result.

I'm testing this on Mac OSX Lion.

@chrisvfritz
Copy link

I'm also experiencing this problem in Ruby:

Docverter::Conversion.run do |c|
      c.from    = "markdown"
      c.to      = "#{params[:download_type]}"
      c.content = params[:included_chapters].split(',').map {|id| Chapter.find(id.to_i).content}.join("\n\n")
      c.table_of_contents
end

I've also tried the variations mentioned by the first poster. No luck.

@jldiaz
Copy link

jldiaz commented Oct 11, 2013

Also hit this bug, and it is a real problem for me because most of my markdown documents are utf-8, and they cannot be converted to pdf (utf-8 chars are dropped, see this question in Stack Overflow for example), unless the option --ascii is passed to pandoc which is not possible because it is a boolean option and those options seem to be broken.

@peterkeen
Copy link
Collaborator

This is fixed in v1.0.3 which is running on c.docverter.com. Using the Docverter API you'd do this:

Docverter::Conversion.run do |c|
      c.from    = "markdown"
      c.to      = "#{params[:download_type]}"
      c.content = params[:included_chapters].split(',').map {|id| Chapter.find(id.to_i).content}.join("\n\n")
      c.table_of_contents = true
end

Using curl you'd say -F table_of_contents=true.

Please comment here if you have any more problems getting it to work. I'll close the issue in a few days if everything's cool.

@jldiaz
Copy link

jldiaz commented Oct 14, 2013

Thank you very much! I can confirm that ascii option is working now (tested from python, using httplib).

@wcaleb
Copy link
Author

wcaleb commented Oct 14, 2013

Thanks for fixing this! I tested the "smart" option with my Pythonista script and it worked great!

@wcaleb wcaleb closed this as completed Mar 17, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants