6 |
7 | The [From Draft to EPUB](https://dmpop.gumroad.com/l/from-draft-to-epub) book provides in-depth information on using Bash Pubkit.
--------------------------------------------------------------------------------
/Book template/.vscode/tasks.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": "2.0.0",
3 | "tasks": [
4 | {
5 | "label": "Sync",
6 | "type": "shell",
7 | "command": "git pull -r && git push && :",
8 | "problemMatcher": []
9 | },
10 | {
11 | "label": "Hist",
12 | "type": "shell",
13 | "command": "git hist",
14 | "problemMatcher": []
15 | },
16 | {
17 | "label": "Save",
18 | "type": "shell",
19 | "command": "git add -A && git commit -m \"${input:msg}\" && git config remote.origin.url && git push && :",
20 | "problemMatcher": []
21 | },
22 | {
23 | "label": "Redo",
24 | "type": "shell",
25 | "command": "git add -A && git commit --amend --no-edit && git config remote.origin.url && git push -f && :",
26 | "problemMatcher": []
27 | },
28 | {
29 | "label": "!!Undo",
30 | "type": "shell",
31 | "command": "git revert --no-edit \"${input:hash}\" && git config remote.origin.url && git push",
32 | "problemMatcher": []
33 | },
34 | {
35 | "label": "Compile",
36 | "type": "shell",
37 | "command": "compile.sh \"${workspaceFolder}\"",
38 | "problemMatcher": []
39 | }
40 | ],
41 | "inputs": [
42 | {
43 | "id": "msg",
44 | "description": "Description:",
45 | "default": "Yet another revision",
46 | "type": "promptString"
47 | },
48 | {
49 | "id": "hash",
50 | "description": "Hash:",
51 | "default": "",
52 | "type": "promptString"
53 | },
54 | ]
55 | }
--------------------------------------------------------------------------------
/Book template/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "workbench.colorCustomizations": {
3 | "activityBar.activeBackground": "#78a379",
4 | "activityBar.activeBorder": "#d9d9e5",
5 | "activityBar.background": "#78a379",
6 | "activityBar.foreground": "#15202b",
7 | "activityBar.inactiveForeground": "#15202b99",
8 | "activityBarBadge.background": "#d9d9e5",
9 | "activityBarBadge.foreground": "#15202b",
10 | "sash.hoverBorder": "#78a379",
11 | "statusBar.background": "#5e8a5f",
12 | "statusBar.foreground": "#e7e7e7",
13 | "statusBarItem.hoverBackground": "#78a379",
14 | "statusBarItem.remoteBackground": "#5e8a5f",
15 | "statusBarItem.remoteForeground": "#e7e7e7",
16 | "titleBar.activeBackground": "#5e8a5f",
17 | "titleBar.activeForeground": "#e7e7e7",
18 | "titleBar.inactiveBackground": "#5e8a5f99",
19 | "titleBar.inactiveForeground": "#e7e7e799"
20 | },
21 | "peacock.color": "#5e8a5f",
22 | "kanban": {
23 | "columns": {
24 | "done": "Done",
25 | "inProgress": "Work in progress",
26 | "testing": "Language review",
27 | "todo": "Plan"
28 | }
29 | },
30 | "workbench.colorTheme": "Nüshu",
31 | "workbench.iconTheme": "material-icon-theme",
32 | "spellright.language": [
33 | "English (American)"
34 | ],
35 | "spellright.documentTypes": [
36 | "markdown",
37 | "latex",
38 | "plaintext"
39 | ],
40 | "todo-tree.general.tags": [
41 | "IDEA",
42 | "FIXME",
43 | "TODO"
44 | ],
45 | "todo-tree.highlights.backgroundColourScheme": [
46 | "orange",
47 | "yellow",
48 | "teal"
49 | ],
50 | "markdown.styles": [
51 | "stylesheet.css"
52 | ]
53 | }
--------------------------------------------------------------------------------
/zip-to-epub/favicon.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
84 |
--------------------------------------------------------------------------------
/Book template/stylesheet.css:
--------------------------------------------------------------------------------
1 | /* Styles and classes used in the book */
2 |
3 | h1 {
4 | text-align: center;
5 | font-family: "Open Sans", sans-serif;
6 | }
7 | h2 {
8 | text-align: left;
9 | font-family: "Open Sans", sans-serif;
10 | }
11 | h3 {
12 | text-align: left;
13 | font-family: "Open Sans", sans-serif;
14 | }
15 | ol.toc {
16 | padding: 0;
17 | margin-left: 1em;
18 | }
19 | ol.toc li {
20 | list-style-type: none;
21 | margin: 0;
22 | padding: 0;
23 | }
24 |
25 | body {
26 | text-align: justify;
27 | font-family: "Open Sans", "Fira Sans", sans-serif;
28 | font-size: medium;
29 | line-height: 150%;
30 | }
31 | code {
32 | text-align: left;
33 | font-family: monospace;
34 | }
35 |
36 | kbd {
37 | -moz-border-radius: 3px;
38 | -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2), 0 0 0 2px #fff inset;
39 | -webkit-border-radius: 3px;
40 | -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2), 0 0 0 2px #fff inset;
41 | background-color: #f7f7f7;
42 | border: 1px solid #ccc;
43 | border-radius: 3px;
44 | box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2), 0 0 0 2px #fff inset;
45 | color: #333;
46 | display: inline-block;
47 | font-family: Arial, Helvetica, sans-serif;
48 | font-size: 11px;
49 | line-height: 1.4;
50 | margin: 0 0.1em;
51 | padding: 0.1em 0.6em;
52 | text-shadow: 0 1px 0 #fff;
53 | }
54 |
55 | img {
56 | margin-bottom: 0.5em;
57 | vertical-align: middle;
58 | max-width: 100%;
59 | }
60 | div.figure {
61 | margin-left: auto;
62 | margin-right: auto;
63 | text-align: center;
64 | font-style: italic;
65 | }
66 |
67 | #colophon {
68 | text-align: center;
69 | }
70 |
71 | table {
72 | border-collapse: collapse;
73 | border-spacing: 0;
74 | box-sizing: border-box;
75 | display: block;
76 | margin-bottom: 16px;
77 | margin-top: 0;
78 | overflow: auto;
79 | text-indent: 0;
80 | width: 100%;
81 | }
82 | thead {
83 | box-sizing: border-box;
84 | display: table-header-group;
85 | vertical-align: middle;
86 | }
87 | tr {
88 | background-color: #fff;
89 | box-sizing: border-box;
90 | display: table-row;
91 | vertical-align: inherit;
92 | border-top: #ccc solid 1px;
93 | }
94 | th {
95 | box-sizing: border-box;
96 | display: table-cell;
97 | font-weight: bold;
98 | vertical-align: inherit;
99 | padding: 6px 13px;
100 | border: #ddd solid 1px;
101 | }
102 | td {
103 | box-sizing: border-box;
104 | display: table-cell;
105 | text-align: inherit;
106 | vertical-align: inherit;
107 | padding: 6px 13px;
108 | border: #ddd solid 1px;
109 | }
110 | tbody {
111 | box-sizing: border-box;
112 | display: table-row-group;
113 | vertical-align: middle;
114 | }
115 |
116 | @font-face {
117 | font-family: Open Sans;
118 | font-style: normal;
119 | font-weight: normal;
120 | src: url("OpenSans-Regular.ttf");
121 | }
122 | @font-face {
123 | font-family: Open Sans;
124 | font-style: normal;
125 | font-weight: bold;
126 | src: url("OpenSans-Bold.ttf");
127 | }
128 | @font-face {
129 | font-family: Open Sans;
130 | font-style: italic;
131 | font-weight: normal;
132 | src: url("OpenSans-Italic.ttf");
133 | }
134 | @font-face {
135 | font-family: Open Sans;
136 | font-style: italic;
137 | font-weight: bold;
138 | src: url("OpenSans-BoldItalic.ttf");
139 | }
140 |
--------------------------------------------------------------------------------
/compile.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # This program is free software; you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation; either version 2 of the License, or
6 | # (at your option) any later version.
7 | #
8 | # This program is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU General Public License
14 | # along with this program; if not, write to the Free Software
15 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
16 | # MA 02110-1301, USA.
17 |
18 | # Author: Dmitri Popov, dmpop@linux.com
19 | # Source code: https://github.com/dmpop/bash-pubkit
20 |
21 | ##-----Functions-----##
22 |
23 | # Usage prompt
24 | usage() {
25 | cat <Current upload limit is MB
43 |ZIP to EPUB is part of Bash Pubkit
71 |