mirror of
https://github.com/NohamR/papeer.git
synced 2026-05-26 04:17:21 +00:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
29935be2c3 | ||
|
|
a6ba42f3e1 |
6
.github/workflows/release.yml
vendored
6
.github/workflows/release.yml
vendored
@@ -9,10 +9,14 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
goos: [linux, darwin, windows]
|
goos: [linux, darwin, windows]
|
||||||
|
goarch: [amd64, arm64]
|
||||||
|
exclude:
|
||||||
|
- goarch: arm64
|
||||||
|
goos: windows
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: wangyoucao577/go-release-action@v1.30
|
- uses: wangyoucao577/go-release-action@v1.30
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
goos: ${{ matrix.goos }}
|
goos: ${{ matrix.goos }}
|
||||||
goarch: amd64
|
goarch: ${{ matrix.goarch }}
|
||||||
|
|||||||
@@ -127,6 +127,22 @@ func ToEpub(c chapter, filename string) string {
|
|||||||
func AppendToEpub(e *epub.Epub, c chapter) {
|
func AppendToEpub(e *epub.Epub, c chapter) {
|
||||||
content := ""
|
content := ""
|
||||||
|
|
||||||
|
// append table of content
|
||||||
|
if len(c.SubChapters()) > 1 {
|
||||||
|
html := "<h1>Table of Contents</h1>"
|
||||||
|
|
||||||
|
html += "<ol>"
|
||||||
|
for _, sc := range c.SubChapters() {
|
||||||
|
html += fmt.Sprintf("<li>%s</li>", sc.Name())
|
||||||
|
}
|
||||||
|
html += "</ol>"
|
||||||
|
|
||||||
|
_, err := e.AddSection(html, "Table of Contents", "", "")
|
||||||
|
if err != nil {
|
||||||
|
log.Fatal(err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// chapter content
|
// chapter content
|
||||||
if c.config.Include {
|
if c.config.Include {
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -14,6 +14,6 @@ var versionCmd = &cobra.Command{
|
|||||||
Use: "version",
|
Use: "version",
|
||||||
Short: "Print the version number of papeer",
|
Short: "Print the version number of papeer",
|
||||||
Run: func(cmd *cobra.Command, args []string) {
|
Run: func(cmd *cobra.Command, args []string) {
|
||||||
fmt.Println("papeer v0.7.0")
|
fmt.Println("papeer v0.7.1")
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user