Comments (4)
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:
- 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.)
- Clone the repositories in sources.yaml.
- 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.
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.
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.
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)
- Single Color Scheme HOT 1
- Update doesn't find git executable HOT 21
- update doesn't respect shell environment
- "inject -s" syntax doesn't match "build -s" syntax HOT 5
- Correct Readme HOT 3
- Update to base16 0.9.1 HOT 8
- Return non-zero code on an error HOT 6
- pybase16 update prompts for Github credentials HOT 4
- distinguish between missing templates and schemes HOT 2
- Python <3.6 compatibility HOT 4
- PyPI Request: Update HOT 1
- Licensing Question HOT 1
- If a template doesn't provide a file extension the output file names have None appended HOT 1
- Failed to Update HOT 3
- Bad characters \u2026
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from base16-builder-python.