Skip to content

TwiRp/ultheme-vala

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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.

About

A library to convert Ulysses Themes to GtkSourceView Markdown Styles

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published