Skip to content

A library to convert Ulysses Themes to GtkSourceView Markdown Styles

License

Notifications You must be signed in to change notification settings

TwiRp/ultheme-vala

Repository files navigation

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.

Releases

No releases published

Packages

No packages published