# Marky is a simple markdown parser written in Nila and runs on Nodejs. # This will demonstrate the power and expressiveness of Nila. We will also # provide the Ruby version of the parser so that you can see how easy it # is to port code from Ruby to Javascript using Nila # This parser was written by Sri Madhavi Rajasekaran and is released under # the MIT License. # If you want to learn more about Nila, please visit http://adhithyan15.github.io/nila require 'fs' def parse_markdown(input_file) fs.readFile input_file, 'utf8', do |err,data| puts data end end commandline_args = [] process.argv.forEach do |val,index,array| commandline_args << val end parsed_args = commandline_args[2..last] unless parsed_args.empty? if parsed_args[0].include?("-c") file_name = parsed_args[1] unless file_name.undefined? parse_markdown file_name else puts "No file has been specified!" end end end