Git Product home page Git Product logo

base16-builder-go's Introduction

base16-builder-go

A simple builder for base16 templates and schemes.

This currently implements version 0.11.0 of the base16 spec.

Building

Currently version 1.16 or higher of the Go compiler is needed.

Unfortunately, because the schemes are stored in a separate repo, the schemes submodule needs to be cloned before building.

The following command will clone the schemes directory

$ git submodule update --init

Now that the repo is cloned, you can use go build to create a binary. You may wish to update the schemes dir to get new included schemes.

Commands

By default, this builder will build the template in the the current directory using the compiled-in schemes. If you want to update schemes independently, you can use the -schemes-dir flag to point to another directory.

Usage of base16-builder-go:
  -schemes-dir string
    	Target directory for scheme data. The default value uses internal schemes. (default "-")
  -template-dir string
    	Target template directory to build. (default ".")
  -verbose
    	Log all debug messages

base16-builder-go's People

Contributors

belak avatar jamygolden avatar martinlindhe avatar mnussbaum avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

base16-builder-go's Issues

Usage Question

Hello!

I used base16-builder-go a couple years ago and it worked very nicely. I need to fix/adjust a theme and I'd like to use your tool again. I've removed the old binary from my system and made sure to start from scratch. I pulled in the latest version of this tool via go get and also cloned the schemes repo per the instructions. After running base16-builder-go without any flags, this is what returns:

INFO[0000] base16-builder-go                             commit=unknown date=unknown spec-version=0.10.1 version=dev
INFO[0000] Using internal schemes
WARN[0000] Scheme author should not be empty             file=seti.yaml
INFO[0000] Found 232 color schemes
PANI[0000] open templates/config.yaml: no such file or directory
panic: (*logrus.Entry) 0xc00010f490

goroutine 1 [running]:
github.com/sirupsen/logrus.(*Entry).log(0xc00010fb20, 0x0, {0xc000371fc0, 0x35})
        /Users/jon/go/src/github.com/sirupsen/logrus/entry.go:260 +0x4a7
github.com/sirupsen/logrus.(*Entry).Log(0xc00010fb20, 0x0, {0xc0000c9c90?, 0x7?, 0xc0000c9ca0?})
        /Users/jon/go/src/github.com/sirupsen/logrus/entry.go:304 +0x4f
github.com/sirupsen/logrus.(*Entry).Panic(...)
        /Users/jon/go/src/github.com/sirupsen/logrus/entry.go:342
main.main()
        /Users/jon/go/src/github.com/base16-project/base16-builder-go/main.go:109 +0x6b4

Seems that I am missing a templates/config.yaml file? My memory is a little foggy from the last time I did this, was I supposed to pull in another file for base16-builder-go to read from?

Sorry for the noob-ish question! Any tips you could give on how I can use this tool would be helpful :)

Cheers!

Distribute prebuilt binaries

As it stands, this seems to be one of the most complete base16 builders. It would be nice to have it available as a quick download.

Make template builders pluggable

It would be nice to make template builders pluggable, so stuff like multi-file templates could be created as well as more complex binary formats.

How can I add my theme?

Good afternoon, I liked your builder that it is written in Goland and it's great.
I would be very happy if you could tell me how to add your topic and collect all based on it.
The documentation simply says that it clones the repository and then builds it.

Incorrect color values

The builder is producing incorrect values in some cases. Here's an example from windows-command-prompt/base16-3024.reg:

-"ColorTable10"=dword:0043454a ; base02
+"ColorTable10"=dword:00434549 ; base02

Whereas 3024.yaml contains the following:

base02: "4a4543" #  --

Builder is breaking once it reaches templates/telegram-desktop/ themes

Hello,

There is an issue once the builder reaches telegram-desktop themes:

INFO[0002] Rendering template default in templates/telegram-desktop 
FATA[0002] open templates/telegram-desktop/themes/base16-atelier-savanna: is a directory

This same error is actually happening in another project (base16-vim-lightline), I've opened up an issue there as well. I'm pretty new to Go, but is there a way the builder can handle directories?

Fix install via `go install`

% go install github.com/base16-project/base16-builder-go@latest
go: downloading github.com/base16-project/base16-builder-go v0.2.7
go/pkg/mod/github.com/base16-project/[email protected]/main.go:15:12: pattern schemes/*.yaml: no matching files found

Because we use a submodule, go install doesn't work properly. We'll have to decide on a different way to handle scheme files so they work with go install.

Rename go.mod

go install github.com/base16-project/base16-builder-go@latest
go: downloading github.com/base16-project/base16-builder-go v0.2.6
go: github.com/base16-project/base16-builder-go@latest: github.com/base16-project/[email protected]: parsing go.mod:
        module declares its path as: github.com/belak/base16-builder-go
                but was required as: github.com/base16-project/base16-builder-go

Ignore missing themes

When tryng to to update I get some errors, because some themes don't exist anymore in that location.

INFO[0050] Updating templates                           
DEBU[0050] Cloning "https://github.com/aaron-williamson/base16-alacritty" to "templates/alacritty"  source=alacritty
DEBU[0051] Cloning "https://github.com/evanrichter/base16-binary-ninja" to "templates/binary-ninja"  source=binary-ninja
DEBU[0052] Cloning "https://github.com/niklaas/base16-blink.git" to "templates/blink"  source=blink
DEBU[0054] Cloning "https://github.com/hrbn/base16-bbedit" to "templates/bbedit"  source=bbedit
Username for 'https://github.com': 
Password for 'https://github.com': 

It then asks for a password (which shouldn't be necessary at all) and fails even if entered.
Maybe it would be an option to ignore these themes by default?

Also, would you mind supporting cloning via SSH instead of https://? This could be a flag e.g. --ssh

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.