diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..051d09d --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +eval "$(lorri direnv)" diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..124c265 --- /dev/null +++ b/default.nix @@ -0,0 +1,28 @@ +{ pkgs ? import { } }: + +let + nur = import (builtins.fetchTarball + "https://github.com/nix-community/NUR/archive/master.tar.gz") { + inherit pkgs; + }; + version = "devel"; +in pkgs.stdenv.mkDerivation { + pname = "Spellblade"; + inherit version; + src = ./.; + phases = "buildPhase installPhase"; + buildInputs = with pkgs; [ + calibre + nur.repos.mic92.pandoc-bin + ]; + + buildPhase = '' + cp -rf $src/src . + cd ./src && ./build.sh && cd .. + ''; + + installPhase = '' + mkdir -p $out + cp -vrf book/* $out + ''; +} diff --git a/out/.gitignore b/out/.gitignore new file mode 100644 index 0000000..3050176 --- /dev/null +++ b/out/.gitignore @@ -0,0 +1,6 @@ +!.gitkeep +!.gitignore + +*.epub +*.mobi +*.pdf diff --git a/out/.gitkeep b/out/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/plans.md b/plans.md index cd4a167..430f6d0 100644 --- a/plans.md +++ b/plans.md @@ -36,18 +36,18 @@ she wants to see where it will end up. The teachers have never seen this happen and deliberate before accepting Alicia and encouraging them to continue down that path. -- Cover the setting - - Introduce the bladecraft school - - Introduce spellcraft and frame it as an "other" - - Introduce Alicia undergoing a magical awakening - First battle + - Cover the setting + - Introduce the bladecraft school + - Introduce spellcraft and frame it as an "other" + - Introduce Alicia undergoing a magical awakening - Accidentally uses powers on the field - Leads to victory - - Get sus by Zekas + - Puts herself in the line of fire - Tongue-lashing for the absurdly crazy strategy - Meal hall - Bed, idle thoughts about her magic -- Spiritualist +- Spiritualist discussions - Various battles? - Flashbacks to her father noticing signs of this happening and teaching her how to suppress her gift diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..eb9f4fe --- /dev/null +++ b/shell.nix @@ -0,0 +1,16 @@ +{ pkgs ? import { } }: + +let + nur = import (builtins.fetchTarball + "https://github.com/nix-community/NUR/archive/master.tar.gz") { + inherit pkgs; + }; +in pkgs.mkShell { + buildInputs = with pkgs; [ + calibre + nur.repos.mic92.pandoc-bin + + # keep this line if you use bash + bashInteractive + ]; +} diff --git a/src/build.sh b/src/build.sh new file mode 100755 index 0000000..ad2dd22 --- /dev/null +++ b/src/build.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash +set -e + +[[ $DEBUG ]] && set -x + +FILES="$(ls ./**/*.md | grep -v plans)" + +echo $FILES + +pandoc -o ../out/Spellblade.epub --resource-path=. title.txt $FILES +ebook-convert ../out/Spellblade.epub ../out/Spellblade.mobi diff --git a/src/chapter-1/index.md b/src/chapter-1/index.md new file mode 100644 index 0000000..b743fda --- /dev/null +++ b/src/chapter-1/index.md @@ -0,0 +1 @@ +# Chapter 1 diff --git a/src/chapter-1/plans.md b/src/chapter-1/plans.md index 6c307a2..e2fb924 100644 --- a/src/chapter-1/plans.md +++ b/src/chapter-1/plans.md @@ -3,7 +3,7 @@ Introduction to the school of bladecraft. Alicia is shown to suppress their magic and tensions between spellcraft and bladecraft are hinted at. -- [x] The first battle between team red and team blue, team red barely wins, +- [ ] The first battle between team red and team blue, team red barely wins, Alicia has to hide their magic from Zekas - [ ] A dressing-down from the instructors, Alicia starts to feel fiery rage and has to suppress their magic again lest they fireball the instructors diff --git a/src/chapter-1/scene-1.md b/src/chapter-1/scene-1.md new file mode 100644 index 0000000..5d91b9b --- /dev/null +++ b/src/chapter-1/scene-1.md @@ -0,0 +1,70 @@ +Alicia scanned across the clearing. Her cat eyes darted across the field, her +ears focused forward and ready for victory. The battlefield was a wide open +grassy field without any good spots to take cover. Her team was losing. Badly. +Her team's flag was solidly in the hands of the enemy and every attempt to +wrestle it free had failed. Alicia looked over the field and got a very terrible +idea. She turned towards her friend Tistus and whispered "We're going to try a +pincer attack, when you get the flag, run like your life depends on it" into his +ear. Tistus nodded back and stretched his legs a little. Alicia told the other +group the plan via hand signals. Alicia sent the "go" signal and they all took +off sprinting. + +The two groups managed to pinch the blue team together, their backs against +eachother and tails interlocking for stability. Zekas, the blue team leader with +the red team's flag loomed over red team and readied his wooden sword. His plan +almost worked, if only he wasn't struck in the back on his right side by +Alicia's matching wooden sword. Zekas dropped his sword and growled at Alicia, +baring his shark teeth to her. Tistus managed to squeeze between the other blue +team members and yanked the flag free. He held it for dear life in his claws and +gave Alicia a signal with his tail. + +Alicia took a hit to the side from one of the guards she was struggling against +and a small trickle of blood started to run down her left leg. Zekas noticed +that his flag was missing and saw Alicia's cut, sending him into a rage. "You +witch, I'll kill you!". Zekas knocked Alicia to the ground with an uppercut and +Tistus sprinted off for home base while blue team surrounded Alicia. Zekas tried +to grab what he thought was the flag and got Alicia's blood on his hand. Zekas +growled again and looked around, seeing Tistus fleeing like his life depended on +it. + +"AFTER THEM!" + +Blue team took off and tried to catch up with Tistus, but the distraction was +long enough that his victory was all but guaranteed. The rest of red team didn't +bother to chase down blue team, they knew Tistus was the fastest sprinter at the +bladecraft school. + +The horn sound resonated throughout the area. Tistus had made it to the base and +the exercise was over. + +Red team had won. + +Puri helped Alicia up and gave her a bandage. Alicia dressed her wound and felt +a surge of lightning race up her hand. The exact kind of surge she didn't want +to have around other people. + +_No no no no no no. Focus, calm, let it drain to the lightning rod in my heart._ +Alicia ran through the exercises her father told her to do and the feeling +settled. The surge had stopped, but so had the bleeding. Alicia and the rest of +her team started walking back to camp, catching up with Zekas' slow gait. + +Zekas growled at Alicia in frustration, "Nice trick with that fake flag. You got +me." + +"Trick? Oh, the guard to my left cut my leg with his sword. I think you got +got." + +Zekas facepalmed and looked at Alicia. No real emotion, he just looked at her. +Alicia's roughly six foot snep frame. There was a trickle of blood down her left +side, but other than that her white fur and gray spots were well-kept, with her +chocolate brown hair tied into a battle bun. "Lemme see that wound." + +"I'm gonna let the apothecary take a look at it, it's still hurting but I can +walk on it." + +Alicia and Zekas started walking back to camp with the remnants of their teams. + +Zekas laughed, "At least you didn't let that witch beat you." and he lead the +way towards the teacher's garrison. + +Alicia nervously laughed back and followed suit. diff --git a/src/style.tex b/src/style.tex new file mode 100644 index 0000000..7afe9ce --- /dev/null +++ b/src/style.tex @@ -0,0 +1,6 @@ +\usepackage{titlesec} + +\titleclass{\section}{top} +\newcommand\sectionbreak{\clearpage} + +\usepackage[width=4.25in, height=7.5in, top=1.0in, papersize={6in,9in}]{geometry} diff --git a/src/title.txt b/src/title.txt new file mode 100644 index 0000000..26de837 --- /dev/null +++ b/src/title.txt @@ -0,0 +1,13 @@ +--- +title: Spellblade +author: Xe +rights: All Rights Reserved +language: en-US +# cover-image: ./Spellblade.png + +# pandoc LaTeX crud +documentclass: book +links-as-notes: true +toc-depth: 2 +fontfamily: bitter +---