Sha256: 1008a950ba2bba204c62365eda98685a1355574e094b017b7b514b8795831e9d

Contents?: true

Size: 1005 Bytes

Versions: 5

Compression:

Stored size: 1005 Bytes

Contents

#!/usr/bin/ruby
##############################################################################
# tpkg package management system
# License: MIT (http://www.opensource.org/licenses/mit-license.php)
##############################################################################

# When run from the source repository or from an unpacked copy of the
# distribution we want to find the local library, even if there's a copy
# installed on the system.  The installed copy is likely older, and the API
# may be out of sync with this executable.
$:.unshift(File.expand_path('../lib', File.dirname(__FILE__)))

# This script expects one argument, which is the tpkg.xml file
# that you want to convert to yml format.
# The resulting data is output to stdout
require 'tpkg'

if ARGV.size < 1
  raise "You didn't specify a file"
end

xmlfile =  ARGV[0]
if !File.exist?(xmlfile)
  raise "File doesn't exist"
end

metadata_text = File.read(xmlfile)
metadata = Metadata.new(metadata_text, 'xml')
metadata.write($stdout)

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
tpkg-2.3.5 bin/tpkg_xml_to_yml
tpkg-2.3.4 bin/tpkg_xml_to_yml
tpkg-2.3.3 bin/tpkg_xml_to_yml
tpkg-2.3.2 bin/tpkg_xml_to_yml
tpkg-2.3.1 bin/tpkg_xml_to_yml