Skip to content

Latest commit

 

History

History
64 lines (43 loc) · 1.53 KB

README.md

File metadata and controls

64 lines (43 loc) · 1.53 KB

ultheme Parser for Vala

Port of Ulysses2SourceView in Vala Library form. With a few fixes and a few more bugs.

Allows you to convert Ulysses Editor Themes to markdown syntax focused GtkSourceView Style Schemes.

Requirements

valac
libarchive-dev
libxml2-dev

Usage

ultheme.wrap

[wrap-git]
directory=vala-ultheme
url=https://github.com/TwiRp/ultheme-vala.git
revision=master

Place the ultheme.wrap in subprojects directory in your project.

In your meson.build, add:

ultheme_dep = dependency('ultheme-0.1', fallback : [ 'ultheme', 'libultheme_dep' ])

Then add ultheme_dep and dependency('clutter-1.0') to your dependencies.

Parsing a Theme

Download desired theme from Ulysses Editor Themes, or build one with a Theme Generator.

Themes contain both a light and dark version. To get the dark version, you can do:

public static int main (string[] args) {
    var ultheme = new Ultheme.Parser (File.new_for_path (args[1]));
    print (ultheme.get_dark_theme ());

    return 0;
}

For the light version:

public static int main (string[] args) {
    var ultheme = new Ultheme.Parser (File.new_for_path (args[1]));
    print (ultheme.get_light_theme ());

    return 0;
}

There's bugs and magic numbers. This is a best guess implementation.