Project

warehaus

0.0
No commit activity in last 3 years
No release in over 3 years
Fetch KMZ files from the Sketchup 3D Warehouse, and convert them into sensibly named directories and DAE files
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.6
>= 0

Runtime

~> 0.13.1
~> 1.1.6
 Project Readme

Warehaus

This gem is a work in progress that allows you to programatically retrieve usable collada and image files from the Sketchup 3D Warehouse.

Currently, the gem can be used as a class or through its CLI.

Installation

Add this line to your application's Gemfile:

gem 'warehaus'

And then execute:

$ bundle

Or install it yourself as:

$ gem install warehaus

Usage

CLI

WAREHAUS

NAME
	warehaus

SYNOPSIS
	warehouse COMMAND [-v] [ARGS]

DESCRIPTION
	Takes URLS or IDs for Sketchup Warehouse models, grabs their collada 
	resources, and unpacks them into a target directory

OPTIONS
	-v
		Prints logging and debug information

WAREHAUS COMMANDS
	unbox  [identifier] [path=./] [name=warehouse_model]
		[identifier] is a url or `contentId` for a Sketchup Warehouse model. 
		[path] is the path to the root directory to write the unboxed files 
		into. [name] will be the name of the directory containing the unboxed 
		files, and will also be the name of the collada file within that 
		directory.
	json [path]
		[path] is a path to a json file to parse and use for unboxing. see the
		github docs for information on the strucure of this file
	help
		prints help

Class

Simply:

require 'warehaus'

And then you can do:

Warehaus::Getter.new(URL, ROOT_PATH, NAME);

Or:

WareHause::Getter.from_hash(HASH_OF_RESOURCES)

Hash/JSON import format

{
	"dir":"path/to/root/dir",
	"models":{
		"name_of_model1":"http://urltomodel1onsketchup.com/blah",
		"name_of_model2":"content_id_of_model_2"
	}
}