0

I will try to explain my problem : I have a rails application which, for the moment, shows the files which are present in my public directory (there are only txt files). I would like to transform my txt files into html files using asciidoc command when I click on a button in my application (or automatically when I add a txt file in the directory) but I don’t know how to do that.

Thanks in advance.

  • if you post the code you have done so far, it will helps you to get an answer – leticia Feb 05 '13 at 07:58
  • Thank you for your answer but finally, I have solved my problem today using this link : http://stackoverflow.com/questions/5136515/ruby-on-rails-generate-html-for-each-file-in-a-folder – user2042193 Feb 05 '13 at 18:39
  • you should close this question since you already found an answer. I was going to help you here and found you don't need it. – DavidGamba Mar 06 '13 at 07:07
  • Seriously, how come you haven't closed this question. It's been a couple of months and I find myself coming back to try to help. What a waste of people's time! – DavidGamba Nov 02 '13 at 03:38

1 Answers1

0

I don't see this as being closed so...

The best way to go about this is to use asciidoctor, the ruby implementation of asciidoc. It is used in github and it plays quite well with rails.

To read all the files with .asciidoc extension you can google and find many useful answers, such as the one you pointed out in your comment.

DavidGamba
  • 3,503
  • 2
  • 30
  • 46