Git Product home page Git Product logo

harmonyparser's Introduction

harmonyparser

A project file parser for Toon Boom Harmony

Tested on Harmony 21.

What is it for?

Harmony xstage files are just huge XML files that you can easily read using a conventional approach. This parser attempts to organize the structure of the project with an object-oriented approach.

It currently supports:

Basic Usage

import harmonyparser

# Loading the scene project 
scene = harmonyparser.parse("/path/to/harmonyproject.xstage")

# Get scene information
scene_id = scene.id
start_frame = scene.start_frame
end_frame = scene.end_frame

# Get the elements (i.e. resources) used in the scene
elements = list(scene.iter_elements())

# Get the columns of the scene (i.e. use of elements)
columns = list(scene.iter_columns())

# Get the graph of the scene
graph = scene.get_graph()

# which can be traversed
for node in graph.iter_children(recursive=True):
    node_type = node.type
    node_path = node.get_path()

# Every object of the parser keep a reference to the xml node it is referring to
# You can use it to access data that is not exposed by the parser
harmony_version = scene.xml_node.attrib["version"]

harmonyparser's People

Contributors

polob avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.