Code Monkey home page Code Monkey logo

Comments (4)

InspectorMustache avatar InspectorMustache commented on September 25, 2024

Hi, and thanks for the kind words!

You can control which templates and schemes are downloaded as part of the update operation by editing the source files and then passing the -c flag. I'll try to explain a little more in detail:

The update operation basically consists of three steps:

  1. Create a file called sources.yaml. This file contains URLs to this repo and this repo. These repositories each contain a list of scheme and template repositories, respectively, and are maintained by the base16 author. (You probably already know this, seeing as the qutebrowser template is in there as well.)
  2. Clone the repositories in sources.yaml.
  3. Go into the two downloaded repositories from the previous step and open the file list.yaml in each of these. This is the file that contains a list of all the scheme or template repositories. Every repository in these two files is then cloned as well.

You can skip steps one and two by providing the -c/--custom flag. This effectively means that you can edit the list.yaml files and remove those template or scheme repositories you don't need. In your case, you could just remove every repository from sources/templates/list.yaml or just delete the file altogether. But update the builder first because a missing or empty source file caused an exception to be raised and I only just fixed this.

So in short: run update, delete everything you don't want, delete sources/templates/list.yaml and run update -c. If I understand correctly this also takes care of the problem with the default.yaml file, right?

This is probably not the most intuitive way for controlling the cloning process but I think it's the most flexible. I also can't think of a much better way of excluding specific repos from the update process.

from base16-builder-python.

theova avatar theova commented on September 25, 2024

Hi,

thank you very much for your detailed explanation.

Now I have a Makefile fullfilling my wishes:

BUILD=pybase16
TEMPLATE=qutebrowser
THEME_DIR=themes
SOURCE_DIR=sources
TEMPLATE_DIR=templates
OUTPUT=output

all: update build

update:
	$(BUILD) update
	rm -rf ${TEMPLATE_DIR}/*/
	rm -rf ${SOURCE_DIR}/${TEMPLATE_DIR}
	$(BUILD) update -c
build:
	mkdir -p ${TEMPLATE_DIR}/${TEMPLATE}/templates
	cp ${TEMPLATE_DIR}/*.* ${TEMPLATE_DIR}/${TEMPLATE}/templates
	$(BUILD) build -t ${TEMPLATE} -o ${OUTPUT}
	rm -rf ${THEME_DIR}
	mv ${OUTPUT}/${TEMPLATE}/templates/ ${THEME_DIR}/
	rm -rf ${OUTPUT}
	rm -rf ${TEMPLATE_DIR}/*/

Im not sure, if pybase16 update -c is even necessary.

If I understand correctly this also takes care of the problem with the default.yaml file, right?

Yes :-)

from base16-builder-python.

InspectorMustache avatar InspectorMustache commented on September 25, 2024

With that procedure, update -c isn't necessary because you're overwriting the old qutebrowser template with the new one in the next step. But you don't actually have to move stuff around so much. The -t flag of the build operation accepts a path to a template folder. So you could just cd into a directory outside of your repository and do:

pybase16 update
pybase16 build -t /path/to/your/qutebrowser/template/repo

from base16-builder-python.

theova avatar theova commented on September 25, 2024

Thanks a lot! Now I'm 100% satisfied.

Just for someone else, my Makefile is:

BUILD=pybase16
REPO=$(shell pwd)
TEMPLATE=$(shell basename ${REPO})
THEME_DIR=themes
TEMPLATE_DIR=templates
OUTPUT=output

all: update build

update:
	$(BUILD) update

build:
	$(BUILD) build -t ${REPO} -o ${OUTPUT}
	rm -rf ${THEME_DIR}
	mv ${OUTPUT}/${TEMPLATE}/themes/ ${THEME_DIR}/
	rm -rf ${OUTPUT} ${TEMPLATE_DIR}/*/

from base16-builder-python.

Related Issues (16)

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.