Skip to content

Converterter to turn adhoc structure of parsed renew files into a normalized structure.

Notifications You must be signed in to change notification settings

laszlokorte/renewex_converter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RenewEx Converter

RenewEx

Renew file converter to turn files parsed with RenewEx (Repository) into a canonical structure that can be worked with more easily (for example be imported into a database).

Hex.pm Documentation


Test cases

The conveter is tested on more than 1000 example files.

Running tests

All test:

mix test

Only fast tests:

mix test --exclude slow

Example Usage

# Read rnw file
{:ok, file_content} = File.read("example.rnw")

# Parse file content
{:ok, %Renewex.Document{} = document} = Renewex.parse_document(file_content)
{:ok, %LayeredDocument{
	version: version, 
	# ^ 11
	kind: kind, 
	# ^ de.renew.gui.CPNDrawing
	layers: layers, 
	# ^ [%RenewexConverter.Layer{
	#	id: _,
	#	content: _,
	#	tag: "de.renew.gui.PlaceFigure",
	#	z_index: 0,
	#	hidden: false} | _]
	hierarchy: hierarchy, 
	# ^ [%LayeredDocument.Nesting{
	#	ancestor_id: _,
	#	descendant_id: _,
	#	depth: 0} | _]
	hyperlinks: hyperlinks,
	# ^ [%LayeredDocument.Hyperlink{
	#	source_id: _,
	#	target_id: _} | _]
}} = RenewexConverter.consume_document(doc)

www.laszlokorte.de

About

Converterter to turn adhoc structure of parsed renew files into a normalized structure.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages