fix: adding in standard build
This commit is contained in:
parent
3f7681a55c
commit
ca5ea4684b
25 changed files with 18093 additions and 6281 deletions
26
.editorconfig
Normal file
26
.editorconfig
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
# EditorConfig is awesome: http://EditorConfig.org
|
||||||
|
|
||||||
|
# top-most EditorConfig file
|
||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
charset = utf-8
|
||||||
|
end_of_line = lf
|
||||||
|
indent_size = 4
|
||||||
|
indent_style = space
|
||||||
|
insert_final_newline = true
|
||||||
|
max_line_length = 80
|
||||||
|
tab_width = 4
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
|
||||||
|
[*.{js,ts}]
|
||||||
|
quote_type = double
|
||||||
|
|
||||||
|
[*.yaml]
|
||||||
|
indent_size = 4
|
||||||
|
tab_width = 4
|
||||||
|
indent_style = space
|
||||||
|
|
||||||
|
[package.json]
|
||||||
|
indent_size = 2
|
||||||
|
tab_width = 2
|
2
.envrc
Normal file
2
.envrc
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
export PATH=$PWD/scripts:$PWD/node_modules/.bin:$PATH
|
||||||
|
use flake || use nix
|
18
.gitignore
vendored
18
.gitignore
vendored
|
@ -1,9 +1,13 @@
|
||||||
*~
|
*~
|
||||||
*.epub
|
|
||||||
*.mobi
|
|
||||||
*.pdf
|
|
||||||
*.html
|
|
||||||
*.docx
|
|
||||||
dmoonfire*
|
|
||||||
|
|
||||||
node_modules/
|
node_modules/
|
||||||
|
.direnv/
|
||||||
|
tmp/
|
||||||
|
build/
|
||||||
|
|
||||||
|
.*-swp
|
||||||
|
dmoonfire*.pdf
|
||||||
|
dmoonfire*.docx
|
||||||
|
dmoonfire*.html
|
||||||
|
dmoonfire*.mobi
|
||||||
|
dmoonfire*.epub
|
||||||
|
*.bz2
|
||||||
|
|
17
.prettierignore
Normal file
17
.prettierignore
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
CHANGELOG.md
|
||||||
|
package-lock.json
|
||||||
|
yarn.lock
|
||||||
|
|
||||||
|
*~
|
||||||
|
|
||||||
|
archives/
|
||||||
|
build/
|
||||||
|
extras/
|
||||||
|
others/
|
||||||
|
node_modules/
|
||||||
|
submissions/
|
||||||
|
sample-edits/
|
||||||
|
maps/
|
||||||
|
.direnv/
|
||||||
|
tmp/
|
||||||
|
edit/
|
36
.woodpecker.yml
Normal file
36
.woodpecker.yml
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
clone:
|
||||||
|
git:
|
||||||
|
image: woodpeckerci/plugin-git
|
||||||
|
settings:
|
||||||
|
tags: true
|
||||||
|
|
||||||
|
pipeline:
|
||||||
|
build:
|
||||||
|
image: registry.gitlab.com/dmoonfire/nix-flake-docker:latest
|
||||||
|
commands:
|
||||||
|
- nix profile install 'nixpkgs#fontconfig'
|
||||||
|
- nix develop --command scripts/build.sh
|
||||||
|
secrets:
|
||||||
|
- gitea_token
|
||||||
|
- s3_bucket
|
||||||
|
- s3_endpoint
|
||||||
|
- s3_access_key_id
|
||||||
|
- s3_secret_access_key
|
||||||
|
when:
|
||||||
|
event: [push, pull_request, tag]
|
||||||
|
tag: v*
|
||||||
|
|
||||||
|
release:
|
||||||
|
image: registry.gitlab.com/dmoonfire/nix-flake-docker:latest
|
||||||
|
commands:
|
||||||
|
- nix profile install 'nixpkgs#fontconfig'
|
||||||
|
- nix develop --command scripts/release.sh
|
||||||
|
secrets:
|
||||||
|
- gitea_token
|
||||||
|
- s3_bucket
|
||||||
|
- s3_endpoint
|
||||||
|
- s3_access_key_id
|
||||||
|
- s3_secret_access_key
|
||||||
|
when:
|
||||||
|
event: push
|
||||||
|
branch: main
|
6
commitlint.config.js
Normal file
6
commitlint.config.js
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
module.exports = {
|
||||||
|
extends: ["@commitlint/config-conventional"],
|
||||||
|
rules: {
|
||||||
|
"body-max-line-length": [0],
|
||||||
|
},
|
||||||
|
};
|
69
fedran.json
69
fedran.json
|
@ -4,24 +4,85 @@
|
||||||
"character": {
|
"character": {
|
||||||
"pov": 48,
|
"pov": 48,
|
||||||
"name": "Karin",
|
"name": "Karin",
|
||||||
|
"character_slug": "karin",
|
||||||
"color": "hsl(20, 100%, 49%)"
|
"color": "hsl(20, 100%, 49%)"
|
||||||
},
|
},
|
||||||
"source": {
|
"source": {
|
||||||
"pov": 48,
|
"pov": 48,
|
||||||
"volume": 2,
|
"volume": 2,
|
||||||
"title": "Songbird in the Kitchen",
|
"title": "Songbird in the Kitchen",
|
||||||
"status": "unstable",
|
"word_count": 8034,
|
||||||
|
"length": "Story",
|
||||||
|
"title_slug": "songbird-in-the-kitchen",
|
||||||
|
"identifier_slug": "0048-02-songbird-in-the-kitchen",
|
||||||
|
"copyright_year": 2019,
|
||||||
|
"status": "Unstable",
|
||||||
"genres": [
|
"genres": [
|
||||||
"Drama"
|
"Drama"
|
||||||
],
|
],
|
||||||
|
"has_dedication": false,
|
||||||
"git": {
|
"git": {
|
||||||
"http_url": "https://gitlab.com/fedran/songbird-in-the-kitchen.git",
|
"http_url": "https://src.mfgames.com/fedran-sources/songbird-in-the-kitchen.git",
|
||||||
"branch": "master"
|
"branch": "master"
|
||||||
},
|
},
|
||||||
"links": {
|
"links": {
|
||||||
"development": {
|
"development": {
|
||||||
"git": "https://gitlab.com/fedran/songbird-in-the-kitchen"
|
"git": "https://src.mfgames.com/fedran-sources/songbird-in-the-kitchen/",
|
||||||
|
"issues": "https://src.mfgames.com/fedran-sources/songbird-in-the-kitchen/issues"
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"cover": {
|
||||||
|
"title_page_lines": [
|
||||||
|
"Songbird in",
|
||||||
|
"the Kitchen"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"warnings": {
|
||||||
|
"text": "This story contains no scenes of sexual assault."
|
||||||
|
},
|
||||||
|
"chapters": [
|
||||||
|
{
|
||||||
|
"title": "The Opened Cage",
|
||||||
|
"word_count": 643,
|
||||||
|
"summary": "Karin wakes up outside of San Graif after a miserable night. She commiserates with her friend, Roal, and they talk about their shared appreciate for beautiful woman (peaches for lesbians, apples for straights). The city has a no weapons policy and appears to be rather moralistic; they both decide there are peaches and apples willing to have a little fun.\n",
|
||||||
|
"teaser": "Karin wakes up outside of San Graif, a town of \"just and noble city with a high moral caliber.\" That means there might be some peaches (femme lesbians) willing to have a little fun.\n"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "Passing Surprise",
|
||||||
|
"word_count": 1188,
|
||||||
|
"summary": "Refreshed from a night of a comfortable bed, Karin goes shopping for supplies. On the way back, she hears a woman singing with an intense emotional song. Following the sound, she finds a crowd has gathered to listen to a beautiful young woman, Lilian, who is a waitress at a small bakery. An old lady outside encourages Karin to have a seat inside.\n",
|
||||||
|
"teaser": "While there is no greater pleasure than a comfortable bed after months of sleeping in wagons and grounds, Karin decides to spend a bit of time shopping. As she does, she stumbles onto one of the most beautiful voices she had ever heard.\n"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "Return Customer",
|
||||||
|
"word_count": 1472,
|
||||||
|
"summary": "Karin keeps coming back to Lilard's. After three days, Lilian is being informal with her. However, as Karin is settling down, she hears Tristoh da Lamaster talking to Lilian's father and Lilian is upset. She finds out that Lilian's father has accepted an offer of marriage from Tristoh against his daughter's will. Karin confronts Trisoh, but the law is against her.\n",
|
||||||
|
"teaser": "After three days, Karin quickly becomes a fixture of Lilard's. Even though Lilian hadn't taken her up on her suggested offers, she still enjoys the view and company. However, then she hears the laughter of a man she hated.\n"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "Table Settings",
|
||||||
|
"word_count": 680,
|
||||||
|
"summary": "Drunk in her hotel room, Karin decided to rescue Lilian.\n",
|
||||||
|
"teaser": "Upset at what was happening to Lilian, Karin comes up with the worst idea while drunk.\n"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "Customer Service",
|
||||||
|
"word_count": 2453,
|
||||||
|
"summary": "Prepared for war, Karin goes to rescue Lilian. She get tacit approval from Lilian's grandmother, Sindil, who was the old woman that offered a seat when she first arrived. There is a fight, Karin kisses Lilian who doesn't respond. Dejected, Karin still takes Lilian to Roal to get her to a better place where her voice could be free instead of trapped by Tristoh.\n",
|
||||||
|
"teaser": "Karin invades Lilard's to rescue Lilian. She gets help from an unexpected source.\n"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "Dessert",
|
||||||
|
"word_count": 629,
|
||||||
|
"summary": "Caught by Tristoh's men, Karin is brought in front of the city's elders for punishment. She upsets Tristoh by pointing out that he always left before trouble happened. He promises to find the most corrupt judge to ensure she will spend the rest in prison or executed in the most painful way possible.\n",
|
||||||
|
"teaser": "Caught by Tristoh's men, Karin is brought in front of the city's elders for punishment.\n"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "The Final Bill",
|
||||||
|
"word_count": 969,
|
||||||
|
"summary": "True to his nature, Tristoh left right before a swarm of monsters descended on the city. Roal, back from delivering Lilian to Stone Over Moon Waters, insists Karin's sharpening talent is needed to fight and Sindil leads the charge to get Karin out of prison. As they were leading Sindil talks about peaches but it takes Karin a little longer to realize it was the same subtle hints Karin was leaving for her Sindil's granddaughter.\n",
|
||||||
|
"teaser": "Imprisoned and waiting for Tristoh's corruption judge, Karin has an unexpected visitor with a surprising offer.\n"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
58
flake.lock
Normal file
58
flake.lock
Normal file
|
@ -0,0 +1,58 @@
|
||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"flake-utils": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1642700792,
|
||||||
|
"narHash": "sha256-XqHrk7hFb+zBvRg6Ghl+AZDq03ov6OshJLiSWOoX5es=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"rev": "846b2ae0fc4cc943637d3d1def4454213e203cba",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1643805626,
|
||||||
|
"narHash": "sha256-AXLDVMG+UaAGsGSpOtQHPIKB+IZ0KSd9WS77aanGzgc=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "554d2d8aa25b6e583575459c297ec23750adb6cb",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"id": "nixpkgs",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"type": "indirect"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixstable": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1622516815,
|
||||||
|
"narHash": "sha256-ZjBd81a6J3TwtlBr3rHsZspYUwT9OdhDk+a/SgSEf7I=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "7e9b0dff974c89e070da1ad85713ff3c20b0ca97",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"id": "nixpkgs",
|
||||||
|
"ref": "21.05",
|
||||||
|
"type": "indirect"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-utils": "flake-utils",
|
||||||
|
"nixpkgs": "nixpkgs",
|
||||||
|
"nixstable": "nixstable"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
28
flake.nix
Normal file
28
flake.nix
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
{
|
||||||
|
inputs = {
|
||||||
|
nixstable.url = "nixpkgs/21.05";
|
||||||
|
nixpkgs.url = "nixpkgs/nixos-unstable";
|
||||||
|
flake-utils.url = "github:numtide/flake-utils";
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = { self, nixpkgs, nixstable, flake-utils }:
|
||||||
|
flake-utils.lib.eachDefaultSystem (system:
|
||||||
|
let
|
||||||
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
|
stable = nixstable.legacyPackages.${system};
|
||||||
|
in {
|
||||||
|
devShell = pkgs.mkShell {
|
||||||
|
buildInputs = [
|
||||||
|
pkgs.epubcheck
|
||||||
|
pkgs.nixfmt
|
||||||
|
pkgs.nodejs-16_x
|
||||||
|
pkgs.pandoc
|
||||||
|
pkgs.pdftk
|
||||||
|
pkgs.python39Full
|
||||||
|
pkgs.python39Packages.weasyprint
|
||||||
|
pkgs.jq
|
||||||
|
pkgs.s3cmd
|
||||||
|
];
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
11
matter/about.md
Normal file
11
matter/about.md
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
---
|
||||||
|
title: About D. Moonfire
|
||||||
|
---
|
||||||
|
|
||||||
|
D. Moonfire is the remarkable intersection of a computer nerd and a scientist. He inherited a desire for learning, endless curiosity, and a talent for being a polymath from both of his parents. Instead of focusing on a single genre, he writes stories and novels in many different settings ranging from fantasy to science fiction. He also throws in the occasional romance or forensics murder mystery to mix things up.
|
||||||
|
|
||||||
|
In addition to having a borderline unhealthy obsession with the written word, he is also a developer who loves to code as much as he loves writing.
|
||||||
|
|
||||||
|
He lives near Cedar Rapids, Iowa with his wife, numerous pet computers, and a pair of highly mobile things of the male variety.
|
||||||
|
|
||||||
|
You can see more work by D. Moonfire at his website at [https://d.moonfire.us/](https://d.moonfire.us/). His fantasy world, Fedran, can be found at [https://fedran.com/](https://fedran.com/).
|
13
matter/fedran.md
Normal file
13
matter/fedran.md
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
---
|
||||||
|
title: Fedran
|
||||||
|
---
|
||||||
|
|
||||||
|
Fedran is a world caught on the cusp of two great ages.
|
||||||
|
|
||||||
|
For centuries, the Crystal Age shaped society through the exploration of magic. Every creature had the ability to affect the world using talents and spells. The only limitation was imagination, will, and the inescapable rules of resonance. But as society grew more civilized, magic became less reliable and weaker.
|
||||||
|
|
||||||
|
When an unexpected epiphany seemingly breaks the laws of resonance, everything changed. Artifacts no longer exploded when exposed to spells, but only if they were wrapped in cocoons of steel and brass. The humble fire rune becomes the fuel for new devices, ones powered by steam and pressure. These machines herald the birth of a new age, the Industrial Age.
|
||||||
|
|
||||||
|
Now, the powers of the old age struggle against the onslaught of new technologies and an alien way of approaching magic. Either the world will adapt or it will be washed away in the relentless march of innovation.
|
||||||
|
|
||||||
|
To explore the world of Fedran, check out [https://fedran.com/](https://fedran.com/). There you'll find stories, novels, character write-ups and more.
|
27
matter/legal.md
Normal file
27
matter/legal.md
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
---
|
||||||
|
title: Legal
|
||||||
|
---
|
||||||
|
|
||||||
|
Copyright © 2019 D. Moonfire\
|
||||||
|
Some Rights Reserved\
|
||||||
|
Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International
|
||||||
|
|
||||||
|
Cover art by D. Moonfire
|
||||||
|
|
||||||
|
All characters, events, and locations are fictitious. Any resemblance to persons, past, present, and future is coincidental and highly unlikely.
|
||||||
|
|
||||||
|
This story contains no scenes of sexual assault.
|
||||||
|
|
||||||
|
Broken Typewriter Press\
|
||||||
|
5001 1st Ave SE\
|
||||||
|
Ste 105 #243\
|
||||||
|
Cedar Rapids, IA 52402
|
||||||
|
|
||||||
|
Broken Typewriter Press\
|
||||||
|
[https://broken.typewriter.press/](https://broken.typewriter.press/)
|
||||||
|
|
||||||
|
{% if (edition.isbn) %}
|
||||||
|
ISBN {{edition.isbn}}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
Version {{edition.version}}
|
32
matter/license.md
Normal file
32
matter/license.md
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
---
|
||||||
|
title: License
|
||||||
|
---
|
||||||
|
|
||||||
|
This book is distributed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International license. More info can be found at [https://creativecommons.org/licenses/by-nc-sa/4.0/](https://creativecommons.org/licenses/by-nc-sa/4.0/). This means:
|
||||||
|
|
||||||
|
### You are free to:
|
||||||
|
|
||||||
|
- Share — copy and redistribute the material in any medium or format
|
||||||
|
- Adapt — remix, transform, and build upon the material
|
||||||
|
|
||||||
|
The licensor cannot revoke these freedoms as long as you follow the license terms.
|
||||||
|
|
||||||
|
### Under the following terms:
|
||||||
|
|
||||||
|
- Attribution — You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
|
||||||
|
- NonCommercial — You may not use the material for commercial purposes.
|
||||||
|
- ShareAlike — If you remix, transform, or build upon the material, you must distribute your contributions under the same license as the original.
|
||||||
|
|
||||||
|
No additional restrictions — You may not apply legal terms or technological measures that legally restrict others from doing anything the license permits.
|
||||||
|
|
||||||
|
### Preferred Attribution
|
||||||
|
|
||||||
|
The preferred attribution for this novel is:
|
||||||
|
|
||||||
|
> "Songbird in the Kitchen" by D. Moonfire is licensed under CC BY-NC-SA 4.0
|
||||||
|
|
||||||
|
In the above attribution, use the following links:
|
||||||
|
|
||||||
|
- Flight of the Scions: [https://fedran.com/songbird-in-the-kitchen/](https://fedran.com/songbird-in-the-kitchen/)
|
||||||
|
- D. Moonfire: https://d.moonfire.us/
|
||||||
|
- CC BY-NC-SA 4.0: https://creativecommons.org/licenses/by-nc-sa/4.0/
|
1
matter/pad.html
Normal file
1
matter/pad.html
Normal file
|
@ -0,0 +1 @@
|
||||||
|
<br />
|
14
matter/title.html
Normal file
14
matter/title.html
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
---
|
||||||
|
title: Title
|
||||||
|
---
|
||||||
|
|
||||||
|
<div class="title">
|
||||||
|
<div class="title-area">
|
||||||
|
<div class="large">Songbird in</div>
|
||||||
|
<div class="large">the Kitchen</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="author">D. Moonfire</div>
|
||||||
|
|
||||||
|
<div class="publisher">Broken Typewriter Press • Cedar Rapids</div>
|
||||||
|
</div>
|
23635
package-lock.json
generated
23635
package-lock.json
generated
File diff suppressed because it is too large
Load diff
93
package.json
93
package.json
|
@ -1,61 +1,50 @@
|
||||||
{
|
{
|
||||||
"name": "songbird-in-the-kitchen",
|
"name": "songbird-in-the-kitchen",
|
||||||
"private": true,
|
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
|
"private": true,
|
||||||
|
"description": "\"Songbird in the Kitchen\" is a story by D. Moonfire.",
|
||||||
|
"author": {
|
||||||
|
"name": "D. Moonfire"
|
||||||
|
},
|
||||||
|
"license": "CC-BY-NC-SA-4.0",
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git+https://src.mfgames.com/fedran-sources/songbird-in-the-kitchen.git"
|
||||||
|
},
|
||||||
|
"homepage": "https://fedran.com/songbird-in-the-kitchen/",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build:epub": "mfgames-writing-format build epub",
|
|
||||||
"build:pdf": "mfgames-writing-format build pdf",
|
"build:pdf": "mfgames-writing-format build pdf",
|
||||||
"build": "npm run build:epub && npm run build:pdf",
|
"build:epub": "mfgames-writing-format build epub",
|
||||||
"prebuild": "npm run lint",
|
"build:docx": "mfgames-writing-format build docx",
|
||||||
"lint": "fedran-lint --require-teaser"
|
"build": "run-s build:*",
|
||||||
},
|
"prepare": "husky install"
|
||||||
"release": {
|
|
||||||
"branch": "master",
|
|
||||||
"message": "chore(release): v${nextRelease.version}\n\n${nextRelease.notes}",
|
|
||||||
"verifyConditions": [
|
|
||||||
"@semantic-release/changelog",
|
|
||||||
"@semantic-release/git"
|
|
||||||
],
|
|
||||||
"analyzeCommits": [
|
|
||||||
"@semantic-release/commit-analyzer"
|
|
||||||
],
|
|
||||||
"prepare": [
|
|
||||||
"@semantic-release/changelog",
|
|
||||||
"@semantic-release/git"
|
|
||||||
],
|
|
||||||
"publish": [],
|
|
||||||
"success": [],
|
|
||||||
"fail": []
|
|
||||||
},
|
|
||||||
"commitlint": {
|
|
||||||
"extends": [
|
|
||||||
"@commitlint/config-conventional"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"config": {
|
|
||||||
"commitizen": {
|
|
||||||
"path": "./node_modules/cz-conventional-changelog"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"husky": {
|
|
||||||
"hooks": {
|
|
||||||
"pre-commit": "npm run lint",
|
|
||||||
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@commitlint/cli": "^8.2.0",
|
"@fedran/writing-hyphen": "^1.0.0",
|
||||||
"@commitlint/config-conventional": "^8.2.0",
|
"@fedran/writing-theme": "^4.0.2",
|
||||||
"@fedran/lint": "^0.1.0",
|
"@mfgames-writing/contracts": "^4.4.0",
|
||||||
"@fedran/writing-theme": "^2.0.2",
|
"@mfgames-writing/docx-format": "^1.0.2",
|
||||||
"@mfgames-writing/epub2": "^1.1.3",
|
"@mfgames-writing/epub2-format": "^2.1.1",
|
||||||
"@mfgames-writing/format": "^2.0.0",
|
"@mfgames-writing/format": "^3.3.1",
|
||||||
"@mfgames-writing/hyphen": "^0.4.3",
|
"@mfgames-writing/guillemet": "^1.0.0",
|
||||||
"@mfgames-writing/weasyprint": "^4.0.0",
|
"@mfgames-writing/hyphen-pipeline": "^1.0.2",
|
||||||
"@semantic-release/changelog": "^3.0.6",
|
"@mfgames-writing/liquid-theme": "^2.1.1",
|
||||||
"@semantic-release/git": "^7.0.18",
|
"@mfgames-writing/weasyprint-format": "^5.0.4",
|
||||||
"cz-conventional-changelog": "^3.0.2",
|
"markdown-it-multimd-table": "^4.1.3"
|
||||||
"husky": "^3.1.0",
|
},
|
||||||
"semantic-release": "^15.13.31"
|
"devDependencies": {
|
||||||
|
"@commitlint/cli": "^15.0.0",
|
||||||
|
"@commitlint/config-conventional": "^15.0.0",
|
||||||
|
"@saithodev/semantic-release-gitea": "^2.1.0",
|
||||||
|
"@semantic-release/changelog": "^6.0.1",
|
||||||
|
"@semantic-release/exec": "^6.0.3",
|
||||||
|
"@semantic-release/git": "^10.0.1",
|
||||||
|
"@semantic-release/npm": "^8.0.3",
|
||||||
|
"@semantic-release/release-notes-generator": "^10.0.3",
|
||||||
|
"husky": "^7.0.2",
|
||||||
|
"markdowny": "^0.2.1",
|
||||||
|
"npm-run-all": "^4.1.5",
|
||||||
|
"prettier": "^2.0.5",
|
||||||
|
"semantic-release": "^18.0.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
114
publication.json
Normal file
114
publication.json
Normal file
|
@ -0,0 +1,114 @@
|
||||||
|
{
|
||||||
|
"metadata": {
|
||||||
|
"title": "{{edition.fedran.source.title}}",
|
||||||
|
"author": "D. Moonfire",
|
||||||
|
"language": "en",
|
||||||
|
"theme": "@fedran/writing-theme",
|
||||||
|
"outputDirectory": ".",
|
||||||
|
"outputFilename": "dmoonfire-{{edition.fedran.source.title_slug}}-{{edition.name}}-{{edition.version}}.{{edition.ext}}",
|
||||||
|
"markdown": {
|
||||||
|
"extensions": [
|
||||||
|
{
|
||||||
|
"package": "markdown-it-multimd-table",
|
||||||
|
"options": {
|
||||||
|
"headerless": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"style": {
|
||||||
|
"css": "td { width: 6em; } td[colspan=\"2\"] { width: 12em; }"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"includes": [
|
||||||
|
{
|
||||||
|
"json": "./fedran.json",
|
||||||
|
"merge": "metadata.fedran"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"editions": {
|
||||||
|
"epub": {
|
||||||
|
"format": "@mfgames-writing/epub2-format",
|
||||||
|
"ext": "epub"
|
||||||
|
},
|
||||||
|
"pdf": {
|
||||||
|
"format": "@mfgames-writing/weasyprint-format",
|
||||||
|
"isbn": "",
|
||||||
|
"images": {
|
||||||
|
"grayscale": true,
|
||||||
|
"opaque": true
|
||||||
|
},
|
||||||
|
"ext": "pdf"
|
||||||
|
},
|
||||||
|
"docx": {
|
||||||
|
"format": "@mfgames-writing/docx-format",
|
||||||
|
"ext": "docx"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"contents": [
|
||||||
|
{
|
||||||
|
"element": "bastard",
|
||||||
|
"source": "matter/title.html",
|
||||||
|
"linear": false,
|
||||||
|
"exclude": {
|
||||||
|
"editions": ["epub", "html"],
|
||||||
|
"toc": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"element": "title",
|
||||||
|
"source": "matter/title.html",
|
||||||
|
"linear": false,
|
||||||
|
"exclude": {
|
||||||
|
"toc": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"element": "legal",
|
||||||
|
"source": "matter/legal.md",
|
||||||
|
"liquid": true,
|
||||||
|
"linear": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"element": "toc",
|
||||||
|
"linear": false,
|
||||||
|
"title": "Contents",
|
||||||
|
"exclude": {
|
||||||
|
"editions": ["pdf"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"element": "chapter",
|
||||||
|
"number": 1,
|
||||||
|
"directory": "chapters",
|
||||||
|
"source": "/^chapter-\\d+.(markdown|md)$/",
|
||||||
|
"start": true,
|
||||||
|
"page": 1,
|
||||||
|
"pipeline": [
|
||||||
|
{
|
||||||
|
"module": "@mfgames-writing/guillemet"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"module": "@fedran/writing-hyphen"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"module": "@mfgames-writing/hyphen-pipeline",
|
||||||
|
"exclude": ["`.*?`", "<code>.*?</code>"]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"element": "appendix",
|
||||||
|
"source": "matter/about.md"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"element": "appendix",
|
||||||
|
"source": "matter/fedran.md"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"element": "appendix",
|
||||||
|
"id": "license",
|
||||||
|
"source": "matter/license.md"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
39
release.config.js
Normal file
39
release.config.js
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
module.exports = {
|
||||||
|
branches: ["main"],
|
||||||
|
|
||||||
|
extends: ["@commitlint/config-conventional"],
|
||||||
|
message:
|
||||||
|
"chore(release): v${nextRelease.version} [skip ci]\n\n${nextRelease.notes}",
|
||||||
|
|
||||||
|
plugins: [
|
||||||
|
[
|
||||||
|
"@semantic-release/commit-analyzer",
|
||||||
|
|
||||||
|
{
|
||||||
|
preset: "conventionalcommits",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"@semantic-release/release-notes-generator",
|
||||||
|
"@semantic-release/npm",
|
||||||
|
[
|
||||||
|
"@semantic-release/exec",
|
||||||
|
{
|
||||||
|
prepareCmd: "npm run build",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"@semantic-release/changelog",
|
||||||
|
"@semantic-release/git",
|
||||||
|
|
||||||
|
[
|
||||||
|
"@saithodev/semantic-release-gitea",
|
||||||
|
{
|
||||||
|
giteaUrl: "https://src.mfgames.com",
|
||||||
|
assets: [
|
||||||
|
{ path: "*.epub", label: "EPUB2", type: "other" },
|
||||||
|
{ path: "*.pdf", label: "PDF", type: "other" },
|
||||||
|
{ path: "*.docx", label: "DOCX", type: "other" },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
],
|
||||||
|
};
|
18
scripts/build.sh
Executable file
18
scripts/build.sh
Executable file
|
@ -0,0 +1,18 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Set up logging.
|
||||||
|
log() { echo "🛠️ $(basename $0): $@"; }
|
||||||
|
|
||||||
|
# Move into the root folder.
|
||||||
|
cd $(dirname $(dirname $0))
|
||||||
|
|
||||||
|
# Make sure everything is set up.
|
||||||
|
log "setting up project"
|
||||||
|
./scripts/setup.sh || exit 1
|
||||||
|
|
||||||
|
# Build the project outputs.
|
||||||
|
log "building PDF"
|
||||||
|
npm run build:pdf || exit 1
|
||||||
|
|
||||||
|
log "building EPUB"
|
||||||
|
npm run build:epub || exit 1
|
27
scripts/check-env-bucket.sh
Executable file
27
scripts/check-env-bucket.sh
Executable file
|
@ -0,0 +1,27 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Checks the environment to see if we have all the requisite components needed
|
||||||
|
# to upload or download from the S3 bucket.
|
||||||
|
|
||||||
|
# Set up logging.
|
||||||
|
log() { echo "⚗️ $(basename $0): $@"; }
|
||||||
|
|
||||||
|
# Move into the root folder.
|
||||||
|
cd $(dirname $(dirname $0))
|
||||||
|
|
||||||
|
for i in S3_ACCESS_KEY_ID S3_SECRET_ACCESS_KEY S3_ENDPOINT S3_BUCKET
|
||||||
|
do
|
||||||
|
if [ "x${!i}" = "x" ]
|
||||||
|
then
|
||||||
|
log "missing environment variable $i"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ ! which s3cmd 2> /dev/null ]
|
||||||
|
then
|
||||||
|
log "cannot find 's3cmd' to execute"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
exit 0
|
40
scripts/release.sh
Executable file
40
scripts/release.sh
Executable file
|
@ -0,0 +1,40 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Builds the final versions of the book and then upload the results to various
|
||||||
|
# locations.
|
||||||
|
|
||||||
|
# Set up logging.
|
||||||
|
log() { echo "️🚢 $(basename $0): $@"; }
|
||||||
|
|
||||||
|
# Move into the root folder.
|
||||||
|
cd $(dirname $(dirname $0))
|
||||||
|
|
||||||
|
# Perform the basic environment checks and setup.
|
||||||
|
./scripts/setup.sh || exit 1
|
||||||
|
./scripts/check-env-bucket.sh || exit 1
|
||||||
|
|
||||||
|
# Clean up old versions of the file.
|
||||||
|
log "cleaning up prior versions which may not match versions"
|
||||||
|
rm -f dmoonfire*
|
||||||
|
|
||||||
|
# Perform the release process.
|
||||||
|
log "performing semantic release"
|
||||||
|
export GIT_CREDENTIALS="dmoonfire:$GITEA_TOKEN"
|
||||||
|
npx semantic-release || exit 1
|
||||||
|
|
||||||
|
# Create a tarball of the output files and upload them to S3.
|
||||||
|
if ls dmoonfire* &> /dev/null
|
||||||
|
then
|
||||||
|
log "packaging output into a tarball"
|
||||||
|
tar -cjf songbird-in-the-kitchen.tar.bz2 dmoonfire*
|
||||||
|
|
||||||
|
log "uploading tarball to bucket"
|
||||||
|
export AWS_ACCESS_KEY_ID=$S3_ACCESS_KEY_ID
|
||||||
|
export AWS_SECRET_ACCESS_KEY=$S3_SECRET_ACCESS_KEY
|
||||||
|
export AWS_ENDPOINT=$S3_ENDPOINT
|
||||||
|
export AWS_BUCKET=$S3_BUCKET
|
||||||
|
s3cmd --access_key=$S3_ACCESS_KEY_ID --access_token=$S3_SECRET_ACCESS_KEY --host=$S3_ENDPOINT --host-bucket=$S3_ENDPOINT -P put songbird-in-the-kitchen.tar.bz2 s3://$S3_BUCKET || exit 1
|
||||||
|
else
|
||||||
|
log "no files to upload"
|
||||||
|
fi
|
||||||
|
|
24
scripts/setup-fonts.sh
Executable file
24
scripts/setup-fonts.sh
Executable file
|
@ -0,0 +1,24 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Sets up the fonts for building the PDF output. It doesn't do it if we are not
|
||||||
|
# in a CI environment.
|
||||||
|
|
||||||
|
# Set up logging.
|
||||||
|
log() { echo "✒️ $(basename $0): $@"; }
|
||||||
|
|
||||||
|
# Move into the root directory.
|
||||||
|
cd $(dirname $(dirname $0))
|
||||||
|
|
||||||
|
# We only insert the fonts if we are on a CI server.
|
||||||
|
if [ "x$CI" == "x" ]
|
||||||
|
then
|
||||||
|
log "not in CI environment, not installing fonts"
|
||||||
|
else
|
||||||
|
log "installing fonts"
|
||||||
|
mkdir -p ~/.local/share/fonts
|
||||||
|
cp $(nix-build --no-out-link '<nixpkgs>' -A source-serif-pro)/share/fonts/opentype/*.otf ~/.local/share/fonts
|
||||||
|
cp $(nix-build --no-out-link '<nixpkgs>' -A source-sans-pro)/share/fonts/opentype/*.otf ~/.local/share/fonts
|
||||||
|
|
||||||
|
log "updating font caches"
|
||||||
|
fc-cache
|
||||||
|
fi
|
17
scripts/setup-node.sh
Executable file
17
scripts/setup-node.sh
Executable file
|
@ -0,0 +1,17 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Installs the required Node packages
|
||||||
|
|
||||||
|
# Set up logging.
|
||||||
|
log() { echo "📦️ $(basename $0): $@"; }
|
||||||
|
|
||||||
|
# Move into the root directory.
|
||||||
|
cd $(dirname $(dirname $0))
|
||||||
|
|
||||||
|
if [ -d ./node_modules ]
|
||||||
|
then
|
||||||
|
log "node_modules already exists"
|
||||||
|
else
|
||||||
|
log "setting up node"
|
||||||
|
npm install --ci
|
||||||
|
fi
|
9
scripts/setup.sh
Executable file
9
scripts/setup.sh
Executable file
|
@ -0,0 +1,9 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Move into the root folder.
|
||||||
|
cd $(dirname $(dirname $0))
|
||||||
|
|
||||||
|
# Run the setup commands.
|
||||||
|
./scripts/setup-fonts.sh || exit 1
|
||||||
|
|
||||||
|
./scripts/setup-node.sh || exit 1
|
Loading…
Reference in a new issue