From 43ba92ca005bc6d0efef7ae8ca40aa2e5b121f8c Mon Sep 17 00:00:00 2001 From: BattleCh1cken Date: Tue, 2 Jan 2024 17:50:02 -0500 Subject: [PATCH 01/19] =?UTF-8?q?=F0=9F=93=84=20Add=20MIT=20license=20to?= =?UTF-8?q?=20the=20repository?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LICENSE | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..8424226 --- /dev/null +++ b/LICENSE @@ -0,0 +1,7 @@ +Copyright © 2024 Felix Hass + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. From 82edf8c5b06d6306aab322858e3bec860b57fa95 Mon Sep 17 00:00:00 2001 From: BattleCh1cken Date: Fri, 5 Jan 2024 17:16:56 -0500 Subject: [PATCH 02/19] =?UTF-8?q?=F0=9F=90=9B=20Stopped=20the=20global=20v?= =?UTF-8?q?ars=20from=20being=20exposed?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib.typ | 1 - 1 file changed, 1 deletion(-) diff --git a/lib.typ b/lib.typ index 1d46ae3..f34eb3a 100644 --- a/lib.typ +++ b/lib.typ @@ -1,6 +1,5 @@ #import "./internals.typ": * #import "./entries.typ": * -#import "./globals.typ": * #import "./utils.typ" #import "./themes/themes.typ" #import "./glossary.typ" From d300292a55b7c34cccb798e9e00aa250616fd698 Mon Sep 17 00:00:00 2001 From: BattleCh1cken Date: Sun, 7 Jan 2024 12:22:05 -0500 Subject: [PATCH 03/19] =?UTF-8?q?=F0=9F=94=A8=20Added=20a=20just=20install?= =?UTF-8?q?=20script?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs.typ | 35 +++++++--------- flake.nix | 1 + justfile | 8 ++++ scripts/{format.sh => format} | 0 scripts/package | 77 +++++++++++++++++++++++++++++++++++ 5 files changed, 101 insertions(+), 20 deletions(-) create mode 100644 justfile rename scripts/{format.sh => format} (100%) create mode 100755 scripts/package diff --git a/docs.typ b/docs.typ index 74b0916..f2e6a27 100644 --- a/docs.typ +++ b/docs.typ @@ -25,35 +25,30 @@ The best way to install the Notebookinator is as a local package. Make sure you have the following software installed on your computer: -- Typst -- Git -- VSCode +- #link("https://github.com/casey/just#installation")[Typst] +- #link("https://github.com/casey/just#installation")[Git] +- #link("https://code.visualstudio.com/")[VSCode] +- #link("https://github.com/casey/just#installation")[just] -Once you have those, find the matching command for you operating system, and -then run it: +Once you've installed everything, simply run the following commands: -*Linux:* ```bash -git clone https://github.com/BattleCh1cken/notebookinator \ -~/.local/share/typst/packages/local/ -``` - -*MacOS:* -```zsh -git clone https://github.com/BattleCh1cken/notebookinator \ -~/Library/Application Support/typst/packages/local/ -``` - -*Windows:* -// FIXME: find the correct syntax highlighting for powershell -```pwsh -git clone https://github.com/BattleCh1cken/notebookinator %APPDATA%\typst\packages\local\ +git clone https://github.com/BattleCh1cken/notebookinator +cd notebookinator +just install ``` = Basic Usage Once the template is installed, you can import it into your project like this: +#raw( + block: true, + lang: "typ", + "#import \"@local/notebookinator:"+ version + "\": *" +) + + ```typ #import "@local/notebookinator": * ``` diff --git a/flake.nix b/flake.nix index 8db93bc..ff4c572 100644 --- a/flake.nix +++ b/flake.nix @@ -29,6 +29,7 @@ typstfmt.packages.${system}.default pkgs.act pkgs.nodePackages_latest.prettier + pkgs.just ]; }; diff --git a/justfile b/justfile new file mode 100644 index 0000000..bcc8393 --- /dev/null +++ b/justfile @@ -0,0 +1,8 @@ +package target: + ./scripts/package "{{target}}" + +install: + ./scripts/package "@local" + +docs: + typst compile docs.typ docs.pdf diff --git a/scripts/format.sh b/scripts/format similarity index 100% rename from scripts/format.sh rename to scripts/format diff --git a/scripts/package b/scripts/package new file mode 100755 index 0000000..3c67d21 --- /dev/null +++ b/scripts/package @@ -0,0 +1,77 @@ +#!/usr/bin/env bash +set -eu + +# Credit to the Cetz package for this script +# https://github.com/johannes-wolf/cetz/blob/master/scripts/package + +PKG_PREFIX="notebookinator" + +# List of all files that get packaged +files=( + lib.typ + entries.typ + glossary.typ + utils.typ + globals.typ + internals.typ + themes/ + typst.toml + LICENSE + README.md + docs.typ + docs-template.typ + docs.pdf +) + +# Local package directories per platform +if [[ "$OSTYPE" == "linux"* ]]; then + DATA_DIR="${XDG_DATA_HOME:-$HOME/.local/share}" +elif [[ "$OSTYPE" == "darwin"* ]]; then + DATA_DIR="$HOME/Library/Application Support" +else + DATA_DIR="${APPDATA}" +fi + +if (( $# < 1 )) || [[ "${1:-}" == "help" ]]; then + echo "package TARGET" + echo "" + echo "Packages all relevant files into a directory named '${PKG_PREFIX}/'" + echo "at TARGET. If TARGET is set to @local, the local Typst package directory" + echo "will be used so that the package gets installed for local use." + echo "The version is read from 'typst.toml' in the project root." + echo "" + echo "Local package prefix: $DATA_DIR/typst/package/local" + exit 1 +fi + +function read-toml() { + local file="$1" + local key="$2" + # Read a key value pair in the format: = "" + # stripping surrounding quotes. + perl -lne "print \"\$1\" if /^${key}\\s*=\\s*\"(.*)\"/" < "$file" +} + +SOURCE="$(cd "$(dirname "$0")"; pwd -P)/.." # macOS has no realpath +TARGET="${1:?Missing target path or @local}" +VERSION="$(read-toml "$SOURCE/typst.toml" "version")" + +if [[ "$TARGET" == "@local" ]] || [[ "$TARGET" == "install" ]]; then + TARGET="${DATA_DIR}/typst/packages/local/" + echo "Install dir: $TARGET" +fi + +TMP="$(mktemp -d)" + +for f in "${files[@]}"; do + mkdir -p "$TMP/$(dirname "$f")" 2>/dev/null + cp -r "$SOURCE/$f" "$TMP/$f" +done + +TARGET="${TARGET:?}/${PKG_PREFIX:?}/${VERSION:?}" +echo "Packaged to: $TARGET" +if rm -rf "${TARGET:?}" 2>/dev/null; then + echo "Overwriting existing version." +fi +mkdir -p "$TARGET" +mv "$TMP"/* "$TARGET" From 68f0bb0abf8a040a4dbc5e7a00344b7977fd0305 Mon Sep 17 00:00:00 2001 From: BattleCh1cken Date: Sun, 7 Jan 2024 13:00:34 -0500 Subject: [PATCH 04/19] =?UTF-8?q?=F0=9F=94=A5=20Fixed=20an=20incorrect=20p?= =?UTF-8?q?ath?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- themes/radial/components/tournament.typ | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/radial/components/tournament.typ b/themes/radial/components/tournament.typ index 2d77815..d085935 100644 --- a/themes/radial/components/tournament.typ +++ b/themes/radial/components/tournament.typ @@ -36,7 +36,7 @@ let bool_icon(input) = { cell[ #set align(horizon + center) - #if input { image("/template/icons/check.svg", width: 1.5em) } else { image("/template/icons/x.svg", width: 1.5em) } + #if input { image("../icons/check.svg", width: 1.5em) } else { image("../icons/x.svg", width: 1.5em) } ] } From e35fb2851ed5514a5842a6dac04754b5f753ab45 Mon Sep 17 00:00:00 2001 From: BattleCh1cken Date: Sun, 7 Jan 2024 13:00:34 -0500 Subject: [PATCH 05/19] =?UTF-8?q?=F0=9F=94=A5=20Fixed=20an=20incorrect=20p?= =?UTF-8?q?ath?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- themes/radial/components/components.typ | 4 ---- themes/radial/components/tournament.typ | 2 +- themes/radial/entries.typ | 9 +++------ themes/radial/rules.typ | 10 ++++++---- 4 files changed, 10 insertions(+), 15 deletions(-) diff --git a/themes/radial/components/components.typ b/themes/radial/components/components.typ index a371a58..a91ba0e 100644 --- a/themes/radial/components/components.typ +++ b/themes/radial/components/components.typ @@ -1,7 +1,3 @@ -#import "./headings.typ": * -#import "./code-blocks.typ": * -#import "./title.typ": * - #import "./toc.typ": * #import "./glossary.typ": * diff --git a/themes/radial/components/tournament.typ b/themes/radial/components/tournament.typ index 2d77815..d085935 100644 --- a/themes/radial/components/tournament.typ +++ b/themes/radial/components/tournament.typ @@ -36,7 +36,7 @@ let bool_icon(input) = { cell[ #set align(horizon + center) - #if input { image("/template/icons/check.svg", width: 1.5em) } else { image("/template/icons/x.svg", width: 1.5em) } + #if input { image("../icons/check.svg", width: 1.5em) } else { image("../icons/x.svg", width: 1.5em) } ] } diff --git a/themes/radial/entries.typ b/themes/radial/entries.typ index 7189752..b69eca3 100644 --- a/themes/radial/entries.typ +++ b/themes/radial/entries.typ @@ -1,6 +1,6 @@ #import "./colors.typ": * #import "./icons/icons.typ" -#import "./components/components.typ" +#import "./components/title.typ" as components #import "/utils.typ" #import "./metadata.typ": entry_type_metadata @@ -23,11 +23,8 @@ header: components.title( beginning: image.decode( utils.change_icon_color(raw_icon: metadata.icon, fill: white), height: 1em, - ), - - end: context.start_date.display(), color: metadata.color, context.title, - ), - footer: [ + ), end: context.start_date.display(), color: metadata.color, context.title, + ), footer: [ #line(length: 100%) #align(left, [ *Designed by:* \ diff --git a/themes/radial/rules.typ b/themes/radial/rules.typ index b7d1d31..00ba54e 100644 --- a/themes/radial/rules.typ +++ b/themes/radial/rules.typ @@ -1,4 +1,6 @@ -#import "./components/components.typ" +#import "./components/headings.typ" as components_heading +#import "./components/code-blocks.typ" as components_code + #let rules(doc) = { set text(font: "Calibri", size: 11pt) @@ -23,10 +25,10 @@ _ #it.caption.body _ ] - show raw.where(block: false): components.raw_not_block - show raw.where(block: true): it => components.raw_block(it) + show raw.where(block: false): components_code.raw_not_block + show raw.where(block: true): it => components_code.raw_block(it) - show heading: components.heading + show heading: components_heading.heading // Display the whole document doc From b273585c28c4b537424b0ee7e4e6541c4e15b726 Mon Sep 17 00:00:00 2001 From: BattleCh1cken Date: Sun, 7 Jan 2024 13:18:16 -0500 Subject: [PATCH 06/19] =?UTF-8?q?=E2=9C=A8=20Added=20the=20pie=20chart?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- themes/radial/components/components.typ | 1 + themes/radial/components/graphs.typ | 81 +++++++++++++++++++++++++ 2 files changed, 82 insertions(+) create mode 100644 themes/radial/components/graphs.typ diff --git a/themes/radial/components/components.typ b/themes/radial/components/components.typ index a91ba0e..c08833e 100644 --- a/themes/radial/components/components.typ +++ b/themes/radial/components/components.typ @@ -5,3 +5,4 @@ #import "./pro-con.typ": * #import "./decision-matrix.typ": * #import "./tournament.typ": * +#import "graphs.typ": * diff --git a/themes/radial/components/graphs.typ b/themes/radial/components/graphs.typ new file mode 100644 index 0000000..a7df141 --- /dev/null +++ b/themes/radial/components/graphs.typ @@ -0,0 +1,81 @@ +#import "../colors.typ": * + +#import "@preview/cetz:0.1.2" + +#let pie_chart(..data) = { + let total; + let percentages = (); + + for value in data.pos() { + total += value.at(0); + } + + for value in data.pos() { + percentages.push(calc.round(value.at(0) / total * 100)) + } + + cetz.canvas( + { + import cetz.draw: * + + let chart(..values, name: none) = { + let values = values.pos() + let anchor_angles = () + + let offset = 0 + let total = values.fold(0, (s, v) => s + v.at(0)) + + let segment(from, to) = { + merge-path(close: true, { + stroke((paint: black, join: "round", thickness: 0pt)) + line((0, 0), (rel: (360deg * from, 2))) + arc((), start: from * 360deg, stop: to * 360deg, radius: 2) + }) + } + + let chart = group(name: name, { + stroke((paint: black, join: "round")) + + for v in values { + fill(v.at(1)) + let value = v.at(0) / total + + // Draw the segment + segment(offset, offset + value) + + // Place an anchor for each segment + let angle = offset * 360deg + value * 180deg + anchor(v.at(2), (angle, 1.75)) + anchor_angles.push(angle) + + offset += value + } + }) + + return (chart, anchor_angles) + } + + // Draw the chart + let (chart, angles) = chart(..data, name: "chart") + + chart + + set-style(mark: (fill: white, start: "o", stroke: black), content: (padding: .1)) + for (index, value) in data.pos().enumerate() { + let anchor = "chart." + value.at(2) + let angle = angles.at(index) + + let (line_end, anchor_direction) = if angle > 90deg and angle < 275deg { + ((-0.5, 0), "right") + } else { + ((0.5, 0), "left") + } + + line(anchor, (to: anchor, rel: (angle, 0.5)), (rel: line_end)) + + content((), [#value.at(2)], anchor: "bottom-" + anchor_direction) + content((), [ #percentages.at(index)% ], anchor: "top-" + anchor_direction) + } + }, + ) +} From e095aff4dc9e136431e7303c8ea7b68ce7f09035 Mon Sep 17 00:00:00 2001 From: BattleCh1cken Date: Sun, 7 Jan 2024 13:52:54 -0500 Subject: [PATCH 07/19] =?UTF-8?q?=F0=9F=93=9D=20Documented=20the=20pie=20c?= =?UTF-8?q?hart?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs.typ | 3 +++ themes/radial/components/components.typ | 2 +- themes/radial/components/graphs.typ | 13 +++++++++++++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/docs.typ b/docs.typ index 74b0916..eb54d15 100644 --- a/docs.typ +++ b/docs.typ @@ -210,6 +210,9 @@ Minimal starting point: #let radial_tournament_module = tidy.parse-module(read("./themes/radial/components/tournament.typ")) #show-module(radial_tournament_module) +#let radial_graph_module = tidy.parse-module(read("./themes/radial/components/graphs.typ")) +#show-module(radial_graph_module) + = Developer Documentation == Project Architecture diff --git a/themes/radial/components/components.typ b/themes/radial/components/components.typ index c08833e..772f703 100644 --- a/themes/radial/components/components.typ +++ b/themes/radial/components/components.typ @@ -5,4 +5,4 @@ #import "./pro-con.typ": * #import "./decision-matrix.typ": * #import "./tournament.typ": * -#import "graphs.typ": * +#import "./graphs.typ": * diff --git a/themes/radial/components/graphs.typ b/themes/radial/components/graphs.typ index a7df141..048917f 100644 --- a/themes/radial/components/graphs.typ +++ b/themes/radial/components/graphs.typ @@ -2,6 +2,19 @@ #import "@preview/cetz:0.1.2" +/// Creates a labeled pie chart. +/// +/// Example Usage: +/// +/// ```typ +/// #pie_chart( +/// (8, green, "wins"), +/// (2, red, "losses") +/// ) +/// ``` +/// +/// - ..data (array): The first field is the value, the second the color, and the third is the name of the data. +/// -> content #let pie_chart(..data) = { let total; let percentages = (); From ccdeeb4b9256fea54ffce716c2ee3a2c65cb0393 Mon Sep 17 00:00:00 2001 From: BattleCh1cken Date: Sun, 7 Jan 2024 15:08:13 -0500 Subject: [PATCH 08/19] =?UTF-8?q?=F0=9F=93=9D=20Included=20the=20datatypes?= =?UTF-8?q?=20of=20the=20pie=20chart=20fields=20in=20its=20documentation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- themes/radial/components/graphs.typ | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/themes/radial/components/graphs.typ b/themes/radial/components/graphs.typ index 048917f..2060648 100644 --- a/themes/radial/components/graphs.typ +++ b/themes/radial/components/graphs.typ @@ -13,7 +13,12 @@ /// ) /// ``` /// -/// - ..data (array): The first field is the value, the second the color, and the third is the name of the data. +/// - ..data (array): Each array must contain 3 fields. +/// + `` The value of the section +/// + `` The value of the section +/// + `` The name of the section +/// Here's an example of one of these arrays: +/// `(2, blue, "bicycles")` /// -> content #let pie_chart(..data) = { let total; From 9a6172194ebdcb288b35e07b04b87562847dcf9d Mon Sep 17 00:00:00 2001 From: BattleCh1cken Date: Mon, 8 Jan 2024 15:33:58 -0500 Subject: [PATCH 09/19] =?UTF-8?q?=F0=9F=91=B7=20Added=20a=20CI=20check=20f?= =?UTF-8?q?or=20the=20docs=20and=20the=20installation=20process?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..70b4dc8 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,30 @@ +name: Tests +on: [push, pull_request] + +jobs: + ci: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + submodules: recursive + - uses: awalsh128/cache-apt-pkgs-action@latest + with: + packages: cargo + version: 1.0 + - name: Install typos-cli from crates.io + uses: baptiste0928/cargo-install@v2 + with: + crate: typos-cli + - name: Install just from crates.io + uses: baptiste0928/cargo-install@v2 + with: + crate: just + - uses: yusancky/setup-typst@v3 + id: setup-typst + with: + version: "v0.10.0" + - run: | + just install + just docs + # TODO: run unit tests here From 64ffa6cc9bf0eecfb71db6439472221677048713 Mon Sep 17 00:00:00 2001 From: BattleCh1cken Date: Mon, 8 Jan 2024 15:38:42 -0500 Subject: [PATCH 10/19] =?UTF-8?q?=F0=9F=92=9A=20I=20hate=20github=20action?= =?UTF-8?q?s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 70b4dc8..b072eda 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,10 +8,6 @@ jobs: - uses: actions/checkout@v3 with: submodules: recursive - - uses: awalsh128/cache-apt-pkgs-action@latest - with: - packages: cargo - version: 1.0 - name: Install typos-cli from crates.io uses: baptiste0928/cargo-install@v2 with: From a651fb315aafb2f38e4a73e33dd7855a5ba87076 Mon Sep 17 00:00:00 2001 From: BattleCh1cken Date: Mon, 8 Jan 2024 15:45:24 -0500 Subject: [PATCH 11/19] =?UTF-8?q?=F0=9F=92=9A=20I=20have=20no=20way=20of?= =?UTF-8?q?=20knowing=20whether=20this=20will=20work=20or=20not?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b072eda..9423a94 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,19 +8,15 @@ jobs: - uses: actions/checkout@v3 with: submodules: recursive - - name: Install typos-cli from crates.io - uses: baptiste0928/cargo-install@v2 - with: - crate: typos-cli - name: Install just from crates.io uses: baptiste0928/cargo-install@v2 with: crate: just - - uses: yusancky/setup-typst@v3 + - name: "Install Typst" + uses: yusancky/setup-typst@v3 id: setup-typst - with: - version: "v0.10.0" - - run: | + - name: "Run checks" + run: | just install just docs # TODO: run unit tests here From 3d8b6e6b62f708d090381ba314a5c8ff597bb8be Mon Sep 17 00:00:00 2001 From: BattleCh1cken Date: Thu, 4 Jan 2024 14:25:43 -0500 Subject: [PATCH 12/19] =?UTF-8?q?=F0=9F=93=9D=20Added=20badges=20to=20the?= =?UTF-8?q?=20README?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 96d6514..39e1ec7 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,12 @@ # Notebookinator +
+ ![GitHub Repo stars](https://img.shields.io/github/stars/battlech1cken/notebookinator?style=for-the-badge) + ![GitHub Downloads](https://img.shields.io/github/downloads/battlech1cken/notebookinator/total?style=for-the-badge) + ![GitHub License](https://img.shields.io/github/license/battlech1cken/notebookinator?style=for-the-badge) + ![Discord](https://img.shields.io/discord/1183511612322222183?style=for-the-badge&logo=discord&label=Discord) +
+ This is the Notebookinator, a [Typst](https://github.com/typst/typst) template designed for the Vex Robotics Competition. This template aims to make it as easy as possible to get you up and running with a clean and organized notebooking environment, with minimal overhead. It provides multiple themes, and can even be extended with your own. To get started, read the [documentation](./docs.pdf). From 272d87d3d48eb210a0c2fc565fa71367b335164f Mon Sep 17 00:00:00 2001 From: BattleCh1cken Date: Thu, 4 Jan 2024 14:31:55 -0500 Subject: [PATCH 13/19] =?UTF-8?q?=F0=9F=93=9D=20Fixed=20badges?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 39e1ec7..2404f26 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,12 @@ # Notebookinator
- ![GitHub Repo stars](https://img.shields.io/github/stars/battlech1cken/notebookinator?style=for-the-badge) - ![GitHub Downloads](https://img.shields.io/github/downloads/battlech1cken/notebookinator/total?style=for-the-badge) - ![GitHub License](https://img.shields.io/github/license/battlech1cken/notebookinator?style=for-the-badge) - ![Discord](https://img.shields.io/discord/1183511612322222183?style=for-the-badge&logo=discord&label=Discord) + +![GitHub Repo stars](https://img.shields.io/github/stars/battlech1cken/notebookinator?style=for-the-badge) +![GitHub Downloads](https://img.shields.io/github/downloads/battlech1cken/notebookinator/total?style=for-the-badge) +![GitHub License](https://img.shields.io/github/license/battlech1cken/notebookinator?style=for-the-badge) +![Discord](https://img.shields.io/discord/1183511612322222183?style=for-the-badge&logo=discord&label=Discord) +
This is the Notebookinator, a [Typst](https://github.com/typst/typst) template designed for the Vex Robotics Competition. This template aims to make it as easy as possible to get you up and running with a clean and organized notebooking environment, with minimal overhead. It provides multiple themes, and can even be extended with your own. From 230cab481212285110018e50c23aa3435ec0c9cc Mon Sep 17 00:00:00 2001 From: BattleCh1cken Date: Thu, 4 Jan 2024 14:32:47 -0500 Subject: [PATCH 14/19] =?UTF-8?q?=F0=9F=93=9D=20Aligned=20the=20title=20to?= =?UTF-8?q?=20center?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 2404f26..a0ff6b3 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,9 @@ +
+ # Notebookinator +
+
![GitHub Repo stars](https://img.shields.io/github/stars/battlech1cken/notebookinator?style=for-the-badge) From 3d713ea63025025a812d7334b00e5bfc87847feb Mon Sep 17 00:00:00 2001 From: BattleCh1cken Date: Thu, 4 Jan 2024 14:33:35 -0500 Subject: [PATCH 15/19] =?UTF-8?q?=F0=9F=93=9D=20Added=20the=20word=20the?= =?UTF-8?q?=20word=20"the"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a0ff6b3..73b970f 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@
-# Notebookinator +# The Notebookinator
From 542d9f31bf0fa11bf46c4272f98412fef594e8cf Mon Sep 17 00:00:00 2001 From: BattleCh1cken Date: Mon, 8 Jan 2024 16:03:09 -0500 Subject: [PATCH 16/19] =?UTF-8?q?=F0=9F=93=9D=20Added=20a=20CI=20badge?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 73b970f..eb880e3 100644 --- a/README.md +++ b/README.md @@ -7,8 +7,9 @@
![GitHub Repo stars](https://img.shields.io/github/stars/battlech1cken/notebookinator?style=for-the-badge) -![GitHub Downloads](https://img.shields.io/github/downloads/battlech1cken/notebookinator/total?style=for-the-badge) +![GitHub contributors](https://img.shields.io/github/contributors/battlech1cken/notebookinator?style=for-the-badge) ![GitHub License](https://img.shields.io/github/license/battlech1cken/notebookinator?style=for-the-badge) +![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/battlech1cken/notebookinator/ci.yml?style=for-the-badge&label=CI) ![Discord](https://img.shields.io/discord/1183511612322222183?style=for-the-badge&logo=discord&label=Discord)
From beafac5d64c2df0096ba80aead5fcea9b890374f Mon Sep 17 00:00:00 2001 From: BattleCh1cken Date: Mon, 8 Jan 2024 20:22:16 -0500 Subject: [PATCH 17/19] =?UTF-8?q?=F0=9F=92=9A=20Fixed=20things=20for=20con?= =?UTF-8?q?sistency=20or=20something?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9423a94..b504a40 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,17 +5,17 @@ jobs: ci: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: recursive - name: Install just from crates.io uses: baptiste0928/cargo-install@v2 with: crate: just - - name: "Install Typst" + - name: Install Typst uses: yusancky/setup-typst@v3 id: setup-typst - - name: "Run checks" + - name: Run checks run: | just install just docs From f1146a1f5189e25497bca7b0db6b5584cd07980e Mon Sep 17 00:00:00 2001 From: Felix Hass <75806385+BattleCh1cken@users.noreply.github.com> Date: Mon, 8 Jan 2024 20:24:41 -0500 Subject: [PATCH 18/19] =?UTF-8?q?=F0=9F=91=B7=20Add=20some=20CI=20checks?= =?UTF-8?q?=20(#11)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 👷 Added a CI check for the docs and the installation process * 💚 I hate github actions * 💚 I have no way of knowing whether this will work or not * 💚 Fixed things for consistency or something --- .github/workflows/ci.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..b504a40 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,22 @@ +name: Tests +on: [push, pull_request] + +jobs: + ci: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + - name: Install just from crates.io + uses: baptiste0928/cargo-install@v2 + with: + crate: just + - name: Install Typst + uses: yusancky/setup-typst@v3 + id: setup-typst + - name: Run checks + run: | + just install + just docs + # TODO: run unit tests here From 7fb5487d558579995234b8642acb8aaa4743159d Mon Sep 17 00:00:00 2001 From: BattleCh1cken Date: Tue, 9 Jan 2024 17:44:36 -0500 Subject: [PATCH 19/19] =?UTF-8?q?=F0=9F=9A=91=EF=B8=8FThe=20dates=20were?= =?UTF-8?q?=20being=20displayed=20wrong?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- themes/radial/entries.typ | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/radial/entries.typ b/themes/radial/entries.typ index b69eca3..9a1d81a 100644 --- a/themes/radial/entries.typ +++ b/themes/radial/entries.typ @@ -23,7 +23,7 @@ header: components.title( beginning: image.decode( utils.change_icon_color(raw_icon: metadata.icon, fill: white), height: 1em, - ), end: context.start_date.display(), color: metadata.color, context.title, + ), end: context.start_date.display("[year]/[month]/[day]"), color: metadata.color, context.title, ), footer: [ #line(length: 100%) #align(left, [