Coder Social home page Coder Social logo

tobanteaudio / python-juce Goto Github PK

View Code? Open in Web Editor NEW
10.0 1.0 0.0 257 KB

Python bindings for manipulating Projucer .jucer files

License: MIT License

Python 65.82% Makefile 1.39% C++ 32.79%
juce cpp python juce-framework continuous-integration scripting automation projucer

python-juce's Introduction

Python JUCE

Python classes & functions for manipulating Projucer .jucer files. Only vanilla python is used. No dependencies!

Examples

Github Repository

Developer Documentation

Status

LICENSE Linux Windows Documentation Coverage
License: MIT Build Status AppVeyor Build status Read the Docs codecov

Features

  • Read & write .jucer files
  • Set project attributes (version, company, etc...)
  • Attribute validation

Install

Source

git clone https://github.com/tobanteAudio/python-juce.git
cd python-juce

make install    # pip install .
# or
make develop    # pip install -e .

Usage

from juce.projucer import JucerFile, Projucer

jucerFile = JucerFile('path/to/project.jucer')
# Attributes (get)
print(jucerFile.path)                           # path/to/project.jucer
print(jucerFile.name)                           # project
print(jucerFile.project_type)                   # audioplug
print(jucerFile.cpp_language_standard)          # 17

# Attributes (set)
jucerFile.path = 'new/path/to/project.jucer'
jucerFile.version = '0.2.1'

# Attributes (validation), the following lines fail silently
jucerFile.cpp_language_standard = '98'
jucerFile.project_line_feed = '98'
jucerFile.project_type = 'foo'
jucerFile.display_splash_screen = "98"
jucerFile.binary_data_namespace = 'BAD NS'
jucerFile.plugin_code = 'too'

# Turn on exceptions
jucerFile.silent_validation = False

# Attributes (validation), the following line will raise a ValueError
jucerFile.cpp_language_standard = '98'
# Write to file
jucerFile.save()
jucerFile.save_as('some/path/project.jucer')
# Create a controller for the Projucer executable.
# It searches in $PATH for Projucer
projucer = Projucer()

# Search in custom path
projucer = Projucer("/some/path")

# Info
print(projucer.which)
projucer.status("path/to/project.jucer")

projucer.resave("path/to/project.jucer")

projucer.set_version("path/to/project.jucer", "0.1.0")
projucer.get_version("path/to/project.jucer")

# Cleanup
projucer.fix_broken_include_paths("path/to/src")
projucer.trim_whitespace("path/to/src")
projucer.tidy_divider_comments("path/to/src")
projucer.remove_tabs("path/to/src")

Development

Makefile

make install        # pip install .
make deps           # pip install -r requirements-dev.txt
make develop        # pip install -e .
make test           # Unit tests (pytest)
make integration    # Integration tests (require Projucer in $PATH)
make lint           # Linting (pylint)
make docs           # Documentation (sphinx)
make stats          # Repository stats (cloc)

ToDO

  • Set preprocessor defines
  • Set enablePluginBinaryCopyStep
  • Set warning levels, optimizations
  • Warnings for useGlobalPath
  • Validate .jucer files

python-juce's People

Contributors

tobiashienzsch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 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.