From 6ad62016ed3193def4464e5949dc8afc52a6d420 Mon Sep 17 00:00:00 2001 From: Fausto Núñez Alberro Date: Sat, 16 Jan 2021 14:13:30 +0100 Subject: Automate weekly build process with pybase16 and GH Actions --- .github/workflows/update.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/update.yml (limited to '.github/workflows/update.yml') diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml new file mode 100644 index 0000000..aed0bdc --- /dev/null +++ b/.github/workflows/update.yml @@ -0,0 +1,25 @@ +name: Update the repository with the latest base16 colorschemes +on: + schedule: + - cron: "0 0 * * 0" # https://crontab.guru/every-week +jobs: + run: + runs-on: ubuntu-latest + steps: + - name: Set up Python + uses: actions/setup-python@v1 + with: + python-version: 3.8 + - name: Upgrade pip + run: python -m pip install --upgrade pip + - name: Install pybase16 + run: pip install pybase16-builder + - name: Fetch the repository code + uses: actions/checkout@v2 + - name: Run make + run: make + - name: Commit the changes, if any + uses: stefanzweifel/git-auto-commit-action@v4.1.1 + with: + commit_message: Update repository with the latest base16 colorschemes + branch: ${{ github.head_ref }} -- cgit v1.2.3 From 2ce0a40c53dea90ad4415b5fbaedf90a87c38bb5 Mon Sep 17 00:00:00 2001 From: Jamy Golden Date: Sun, 19 Jun 2022 13:48:52 +0200 Subject: Add base16-project-bot details to github action --- .github/workflows/update.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to '.github/workflows/update.yml') diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml index aed0bdc..7f886a9 100644 --- a/.github/workflows/update.yml +++ b/.github/workflows/update.yml @@ -19,7 +19,12 @@ jobs: - name: Run make run: make - name: Commit the changes, if any - uses: stefanzweifel/git-auto-commit-action@v4.1.1 + uses: stefanzweifel/git-auto-commit-action@v4 with: - commit_message: Update repository with the latest base16 colorschemes + token: ${{ secrets.BOT_ACCESS_TOKEN }} + commit_message: Update with the latest base16-project colorschemes branch: ${{ github.head_ref }} + commit_user_name: base16-project-bot + commit_user_email: base16themeproject@proton.me + commit_author: base16-project-bot + -- cgit v1.2.3 From 4292a20b29467e37e922d1336a821f85e0662adf Mon Sep 17 00:00:00 2001 From: Jamy Golden Date: Sun, 19 Jun 2022 13:52:05 +0200 Subject: Change cron schedule timer to test "update" workflow --- .github/workflows/update.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows/update.yml') diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml index 7f886a9..79b8513 100644 --- a/.github/workflows/update.yml +++ b/.github/workflows/update.yml @@ -1,7 +1,7 @@ name: Update the repository with the latest base16 colorschemes on: schedule: - - cron: "0 0 * * 0" # https://crontab.guru/every-week + - cron: "* * * * *" # https://crontab.guru/every-minute jobs: run: runs-on: ubuntu-latest -- cgit v1.2.3 From 695e4a4ab7e9164def517f8a6c8f1271dccf82a6 Mon Sep 17 00:00:00 2001 From: Jamy Golden Date: Sun, 19 Jun 2022 14:03:33 +0200 Subject: Change update schedule back to one a week and add manual dispatch option --- .github/workflows/update.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to '.github/workflows/update.yml') diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml index 79b8513..8e74a70 100644 --- a/.github/workflows/update.yml +++ b/.github/workflows/update.yml @@ -1,7 +1,9 @@ name: Update the repository with the latest base16 colorschemes on: + workflow_dispatch: schedule: - - cron: "* * * * *" # https://crontab.guru/every-minute + - cron: "* * * * 0" # https://crontab.guru/every-week + jobs: run: runs-on: ubuntu-latest -- cgit v1.2.3 From fb850feeedfddb519bbe5f0141829063eb9e6661 Mon Sep 17 00:00:00 2001 From: Jamy Golden Date: Sun, 19 Jun 2022 14:07:10 +0200 Subject: Upgrade action runner to v3 --- .github/workflows/update.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows/update.yml') diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml index 8e74a70..34c6dfa 100644 --- a/.github/workflows/update.yml +++ b/.github/workflows/update.yml @@ -17,7 +17,7 @@ jobs: - name: Install pybase16 run: pip install pybase16-builder - name: Fetch the repository code - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Run make run: make - name: Commit the changes, if any -- cgit v1.2.3 From d31f301a68228babc9bdd52e15aab0bc8fa6b4d8 Mon Sep 17 00:00:00 2001 From: Jamy Golden Date: Sun, 19 Jun 2022 14:09:23 +0200 Subject: Move github actions token into actions/checkout@v3 --- .github/workflows/update.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to '.github/workflows/update.yml') diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml index 34c6dfa..1ebf8da 100644 --- a/.github/workflows/update.yml +++ b/.github/workflows/update.yml @@ -1,4 +1,4 @@ -name: Update the repository with the latest base16 colorschemes +name: Update with the latest base16 colorschemes on: workflow_dispatch: schedule: @@ -18,12 +18,13 @@ jobs: run: pip install pybase16-builder - name: Fetch the repository code uses: actions/checkout@v3 + with: + token: ${{ secrets.BOT_ACCESS_TOKEN }} - name: Run make run: make - name: Commit the changes, if any uses: stefanzweifel/git-auto-commit-action@v4 with: - token: ${{ secrets.BOT_ACCESS_TOKEN }} commit_message: Update with the latest base16-project colorschemes branch: ${{ github.head_ref }} commit_user_name: base16-project-bot -- cgit v1.2.3 From b97803edefe1d486530ba1a526ba261d784c81fc Mon Sep 17 00:00:00 2001 From: Jamy Golden Date: Mon, 20 Jun 2022 23:16:42 +0200 Subject: Change back to weekly cron job --- .github/workflows/update.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows/update.yml') diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml index 1ebf8da..c8a277f 100644 --- a/.github/workflows/update.yml +++ b/.github/workflows/update.yml @@ -2,7 +2,7 @@ name: Update with the latest base16 colorschemes on: workflow_dispatch: schedule: - - cron: "* * * * 0" # https://crontab.guru/every-week + - cron: "0 0 * * 0" # https://crontab.guru/every-week jobs: run: -- cgit v1.2.3 From 0fca56efdc43ef878d9aead0bb1254154f316757 Mon Sep 17 00:00:00 2001 From: Jamy Date: Sat, 25 Jun 2022 02:12:52 +0200 Subject: Use base16-builder-go to generate colorschemes (#58) - Update contribution information - Add bug report and feature request templates - Ensure a max of 72 chars per line in markdown files --- .github/ISSUE_TEMPLATE/bug_report.md | 39 +++++++++------- .github/ISSUE_TEMPLATE/feature_request.md | 24 ++++++---- .github/workflows/update.yml | 21 ++++----- .gitignore | 9 ---- CONTRIBUTING.md | 70 +++++++++++++++++++--------- Makefile | 22 --------- README.md | 76 ++++++++++++++++++++++--------- 7 files changed, 151 insertions(+), 110 deletions(-) delete mode 100644 Makefile (limited to '.github/workflows/update.yml') diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index ba1e400..dc0e021 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -2,30 +2,37 @@ name: Bug report about: Create a report to help us improve title: "[Bug report] " -labels: '' -assignees: '' - +labels: ["bug"] +assignees: + - base16-project/vim --- -**Describe the bug** +## Describe the bug + -**Expected behavior** +## Expected behavior + -**Screenshots** +## Screenshots + -**System** -Vim or Neovim: -Vim or Neovim version: -Any other plugins you may consider relevant: +## **System** + +**Vim or Neovim:** -**Minimal configuration file** -```vim -" Add a minimal configuration file to dramatically increase -" your chances of receiving help from a maintainer. -``` +**Vim or Neovim version:** + +**Any other plugins you may consider relevant:** + +## Minimal configuration file + + + +## Additional context -**Additional context** + diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index d6fc74f..d9b663b 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -2,19 +2,25 @@ name: Feature request about: Suggest an idea for this project title: "[Feature request] " -labels: '' -assignees: '' - +labels: ["feature"] +assignees: + - base16-project/vim --- -**Is your feature request related to a problem? Please describe.** +## Is your feature request related to a problem? Please describe. + -**Describe the solution you'd like** +## Describe the solution you'd like + -**Describe alternatives you've considered** - +## Describe alternatives you've considered + + + +## Additional context -**Additional context** - + diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml index c8a277f..b18b58a 100644 --- a/.github/workflows/update.yml +++ b/.github/workflows/update.yml @@ -1,4 +1,4 @@ -name: Update with the latest base16 colorschemes +name: Update with the latest base16-project/base16-schemes on: workflow_dispatch: schedule: @@ -8,20 +8,18 @@ jobs: run: runs-on: ubuntu-latest steps: - - name: Set up Python - uses: actions/setup-python@v1 - with: - python-version: 3.8 - - name: Upgrade pip - run: python -m pip install --upgrade pip - - name: Install pybase16 - run: pip install pybase16-builder - name: Fetch the repository code uses: actions/checkout@v3 with: token: ${{ secrets.BOT_ACCESS_TOKEN }} - - name: Run make - run: make + - name: Fetch the schemes repository + uses: actions/checkout@v3 + with: + repository: base16-project/base16-schemes + path: schemes + token: ${{ secrets.BOT_ACCESS_TOKEN }} + - name: Update schemes + uses: base16-project/base16-builder-go@latest - name: Commit the changes, if any uses: stefanzweifel/git-auto-commit-action@v4 with: @@ -30,4 +28,3 @@ jobs: commit_user_name: base16-project-bot commit_user_email: base16themeproject@proton.me commit_author: base16-project-bot - diff --git a/.gitignore b/.gitignore index 7e37512..9de291b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,10 +1 @@ -sources schemes -sources.yaml - -templates/* - -!/templates/config.yaml -!/templates/default.mustache - -.venv diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 382d0e1..9f459b1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,39 +1,67 @@ # Contributing +This repository includes a [GitHub Action][4] that builds the +colorschemes once a week. This keeps the colorschemes up-to-date +automatically. + ## Building -Dependencies: +### Dependencies + +- `>=0.2.0` [base16-builder-go][1] +- golang `>=1.16` to build base16-builder-go -- Python, at least version 3.5 -- The `pybase16` command from - [base16-builder-python](https://github.com/InspectorMustache/base16-builder-python) -- The `make` command +### Usage for template editing -For example on a Debian-based distribution: +1. Clone [base16-builder-go][1] somewhere on your system. +1. Run `cd /path/to/base-builder-go && go build` to generate a binary: +`/path/to/base-builder-go/base16-builder-go` +1. Now execute the binary you generated while giving the `-template-dir` +arg the path to `base16-vim` repository: `./base16-builder-go +-template-dir ../base16-vim` +Or the above steps represented in shell commands: + +```shell +cd /path/to/base16-vim/../ # This repos parent dir +git clone git@github.com:base16-project/base16-builder-go.git +cd base16-builder-go +go build ./base16-builder-go/base16-builder-go \ + -template-dir ../base16-vim ``` -# Install dependencies (you probably already have pip/pip3 and make) -apt install build-essential # for make -pip3 install pybase16-builder -# Build the packages -make +### Usage for adding or editing a colorscheme + +If you want to add or edit a colorscheme but want to test it out, you +simply need to pass in your local [base16-schemes][2] directory when +executing the `base16-builder-go` binary. + +```shell +base16-builder-go \ + -schemes-dir /path/to/base16-schemes \ + -template-dir /path/to/base16-vim ``` -## Submitting a PR +If you have more questions about [base16-builder-go][1], have a look at +the information on the GitHub page. -After you've installed the build dependencies, and before you submit your PR: +## Submitting a PR -- Run `make` after you've made your changes. This will build all the themes - based on the changes you've made. For instance, instead of manually editing - files under `colors/`, you should edit `templates/default.mustache` -- Make sure to commit the changes from `make` and include them in your PR. -- Please abide by what's requested in the [PR - template](/.github/pull_request_template.md). +- Run the colorscheme generation using [base16-builder-go][1] and commit + the changes in your PR. Don't make changes directly to the generated + colorschemes, make changes to the template instead. +- Please abide by what's requested in the [PR template][4]. ## Submitting an issue Please follow the instructions in the issue templates: -- [Issue template for bug reports](/.github/ISSUE_TEMPLATE/bug_report.md) -- [Issue template for feature requests](/.github/ISSUE_TEMPLATE/feature_request.md) +- [Issue template for bug reports][5] +- [Issue template for feature requests][6] + +[1]: https://github.com/base16-project/base16-builder-go +[2]: https://github.com/base16-project/base16-schemes +[3]: .github/workflows/update.yml +[4]: .github/pull_request_template.md +[5]: .github/ISSUE_TEMPLATE/bug_report.md +[6]: .github/ISSUE_TEMPLATE/feature_request.md diff --git a/Makefile b/Makefile deleted file mode 100644 index 555bdfc..0000000 --- a/Makefile +++ /dev/null @@ -1,22 +0,0 @@ -# Ref: https://github.com/theova/base16-qutebrowser -.PHONY: all clean update build - -BUILD=pybase16 -REPO=$(shell pwd) -TEMPLATE=$(shell basename ${REPO}) -THEME_DIR=colors -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}/${THEME_DIR}/ ${THEME_DIR}/ - -clean: - rm -rf ${OUTPUT} ${TEMPLATE_DIR}/*/ diff --git a/README.md b/README.md index d5e94d7..8c34608 100644 --- a/README.md +++ b/README.md @@ -1,26 +1,29 @@ # Base16 Vim -This theme was built with [base16-builder-python](https://github.com/InspectorMustache/base16-builder-python). +Supports console [Vim][1], graphical Vim and [Neovim][2]. Supports graphical Vim and console Vim. -Over [70 themes](https://github.com/base16-project/base16-schemes) plus light/dark variations are available. Here are some of our favorites: +Over [200 themes][3] plus light/dark variations are available. Here are +some of our favorites: The `classic-dark` theme: -![base16-vim classic-dark](/screenshots/base16-vim-screenshot-classic-dark.png) +![base16-vim classic-dark][10] The `horizon-dark` theme: -![base16-vim horizon-dark](/screenshots/base16-vim-screenshot-horizon-dark.png) +![base16-vim horizon-dark][11] The `onedark` theme: -![base16-vim onedark](/screenshots/base16-vim-screenshot-onedark.png) +![base16-vim onedark][12] ## Terminal Themes -For terminal Vim (non-gui) please ensure you are using a base16 terminal theme. Have a look at the list of [official](https://github.com/base16-project/base16#official-templates) and [unofficial](https://github.com/base16-project/base16#unofficial-templates) themes for your terminal of choice. +For terminal Vim (non-gui) please ensure you are using a base16 terminal +theme. Have a look at the list of [official][4] and [unofficial][5] +themes for your terminal of choice. ## Installation @@ -67,20 +70,27 @@ cp base16/colors/*.vim . ## 256 colorspace -If using a Base16 terminal theme designed to keep the 16 ANSI colors intact (a "256" variation) **and** have sucessfully modified your 256 colorspace with [base16-shell](https://github.com/base16-project/base16-shell) you'll need to add the following to your `~/.vimrc` **before** the colorsheme declaration. +If using a Base16 terminal theme designed to keep the 16 ANSI colors +intact (a "256" variation) **and** have sucessfully modified your 256 +colorspace with [base16-shell][6] you'll need to add the following to +your `~/.vimrc` **before** the colorsheme declaration. - let base16colorspace=256 " Access colors present in 256 colorspace +```vim +let base16colorspace=256 " Access colors present in 256 colorspace +``` -This will cause vim to access the colours in the modified 256 colorspace. Please **do not** enable this simply because you have a 256 color terminal as this will cause colors to be displayed incorrectly. +This will cause vim to access the colours in the modified 256 +colorspace. Please **do not** enable this simply because you have a 256 +color terminal as this will cause colors to be displayed incorrectly. ## Troubleshooting -There is a script to help troubleshoot colour issues called `colortest` available in the [Base16 Shell](https://github.com/base16-project/base16-shell) repository. +There is a script to help troubleshoot colour issues called `colortest` +available in the [Base16 Shell][6] repository. -If you are using a ISO-8613-3 compatible terminal ( -[vim docs](https://github.com/vim/vim/blob/23c1b2b018c8121ca5fcc247e37966428bf8ca66/runtime/doc/options.txt#L7876), -[neovim docs](https://neovim.io/doc/user/options.html#'termguicolors')), and -you see a green or blue line, try to enable `termguicolors`: +If you are using a ISO-8613-3 compatible terminal ([vim docs][7], +[neovim docs][8]), and you see a green or blue line, try to enable +`termguicolors`: ```vim set termguicolors @@ -88,19 +98,28 @@ set termguicolors ### Green line numbers -![green line numbers screenshot](/screenshots/without-base16colorspace-256-with-256-terminal-theme.png) +![green line numbers screenshot][13] -If your Vim looks like the above image you are using a 256 terminal theme without setting `let base16colorspace=256` in your `~/.vimrc`. Either set `let base16colorspace=256` in your `~/.vimrc` or use a non 256 terminal theme. +If your Vim looks like the above image you are using a 256 terminal +theme without setting `let base16colorspace=256` in your `~/.vimrc`. +Either set `let base16colorspace=256` in your `~/.vimrc` or use a non +256 terminal theme. ### Blue line numbers -![blue line numbers screenshot](/screenshots/with-base16colorspace-256-without-base16-shell.png) +![blue line numbers screenshot][14] -If your Vim looks like the above image you are setting `let base16colorspace=256` in your `~/.vimrc` but either not running [Base16 Shell](https://github.com/base16-project/base16-shell) or [Base16 Shell](https://github.com/base16-project/base16-shell) is not working for your terminal. Either ensure [Base16 Shell](https://github.com/base16-project/base16-shell) is working by running the `colortest` available in the [Base16 Shell](https://github.com/base16-project/base16-shell) repository or not setting `let base16colorspace=256` in your `~/.vimrc`. +If your Vim looks like the above image you are setting `let +base16colorspace=256` in your `~/.vimrc` but either not running [Base16 +Shell][6] or [Base16 Shell][6] is not working for your terminal. Either +ensure [Base16 Shell][6] is working by running the `colortest` available +in the [Base16 Shell][6] repository or not setting `let +base16colorspace=256` in your `~/.vimrc`. ## Customization -If you want to do some local customization, you can add something like this to your `~/.vimrc`: +If you want to do some local customization, you can add something like +this to your `~/.vimrc`: ```vim function! s:base16_customize() abort @@ -115,5 +134,20 @@ augroup END ## Contributing -See [`CONTRIBUTING.md`](/CONTRIBUTING.md), which contains building and -contributing instructions. +See [`CONTRIBUTING.md`][9], which contains building and contributing +instructions. + +[1]: https://github.com/vim/vim +[2]: https://github.com/neovim/neovim +[3]: https://github.com/base16-project/base16-schemes +[4]: https://github.com/base16-project/base16#official-templates +[5]: https://github.com/base16-project/base16#unofficial-templates +[6]: https://github.com/base16-project/base16-shell +[7]: https://github.com/vim/vim/blob/23c1b2b018c8121ca5fcc247e37966428bf8ca66/runtime/doc/options.txt#L7876 +[8]: https://neovim.io/doc/user/options.html#'termguicolors' +[9]: CONTRIBUTING.md +[10]: screenshots/base16-vim-screenshot-classic-dark.png +[11]: screenshots/base16-vim-screenshot-horizon-dark.png +[12]: screenshots/base16-vim-screenshot-onedark.png +[13]: screenshots/without-base16colorspace-256-with-256-terminal-theme.png +[14]: screenshots/with-base16colorspace-256-without-base16-shell.png -- cgit v1.2.3