#!/usr/bin/env ruby # encoding: UTF-8 # resolve bin path, ignoring symlinks require "pathname" bin_file = Pathname.new(__FILE__).realpath # add self to libpath $:.unshift File.expand_path("../../lib", bin_file) # Fixes https://github.com/rubygems/rubygems/issues/1420 require "rubygems/specification" module Gem class Specification def this; self; end end end require "bundler/setup" require "stepmod/utils/smrl_resource_converter" ReverseAdoc.config.unknown_tags = :bypass input_content = ARGF.read result = Stepmod::Utils::SmrlResourceConverter.convert(input_content, {}) result.split("\n").each do |line| begin $stdout.puts(line) $stdout.flush rescue Errno::EPIPE exit(74) end end