Project

sts2mn

0.0
No release in over 3 years
Low commit activity in last 3 years
sts2mn converts NISO STS XML into Metanorma XML. This gem is a wrapper around sts2mn.jar available from https://github.com/metanorma/sts2mn, with versions matching the JAR file.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

sts2mn Ruby gem

Gem Version Build Status Code Climate Pull Requests Commits since latest

Purpose

The sts2mn Ruby gem is a wrapper around the Java sts2mn which converts NISO STS and ISOSTS into Metanorma XML and AsciiDoc files.

This gem is used to provide sts2mn.jar with mirrored version numbers, to allow Ruby code to easily refer to the desired sts2mn version as dependencies.

Installation

gem install sts2mn

Or include it in your gemspec.

Usage

require 'sts2mn'
Sts2mn.convert(input: 'test/sts.xml')
# => generates 'test/sts.adoc', in Metanorma AsciiDoc

Sts2mn.convert(input: 'test/sts.xml', output: 'another/path/mn.xml', format: 'xml')
# => generates 'another/path/mn.xml' in Metanorma XML

Sts2mn.convert(input: 'test/sts.xml', output: 'another/path/mn.adoc', format: 'adoc')
# => generates 'another/path/mn.adoc' in Metanorma AsciiDoc

Sts2mn.split_bibdata('test/sts.xml')
# => generates 'test/sts.rxl' (Relaton XML) and 'test/mn.adoc' (Metanorma AsciiDoc)

Updating the gem

Update lib/sts2mn/version.rb to the desired version of sts2mn.

Run rake to download the bin/sts2mn.jar file:

rm -f bin/sts2mn.jar
rake bin/sts2mn.jar

Then release the gem with rake release.