Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add partial support for sections properties #47

Open
wants to merge 16 commits into
base: main
Choose a base branch
from

Conversation

neclepsio
Copy link

@neclepsio neclepsio commented Oct 16, 2024

Fixes #40 and #46.

@@ -174,7 +175,7 @@ func (t *toc) addSubSection(parent string, index int, title string, relativePath
t.ncxXML.NavMap = append(t.ncxXML.NavMap, np)
} else {

parentRelativePath := filepath.Join(xhtmlFolderName, parent)
parentRelativePath := path.Join(xhtmlFolderName, parent)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why change filepath to path?
filepath choose the target runtime's file separators OS so it work correctly on window and Linux that has different separator

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a fix for #46.

Comment on lines 37 to 49
1. Download and extract EPUBCheck in the root directory of this project, e.g.

```
wget https://github.com/IDPF/epubcheck/releases/download/v4.2.5/epubcheck-4.2.5.zip
unzip epubcheck-4.2.5.zip
wget https://github.com/IDPF/epubcheck/releases/download/v5.1.0/epubcheck-5.1.0.zip
unzip epubcheck-5.1.0.zip
```

You can use this command to download and extract the latest versions of EPUBCheck (recommended).

```
curl -s https://api.github.com/repos/w3c/epubcheck/releases/latest | awk -F': "' '/browser_download_url/ && /epubcheck/ {gsub(/"$/, "", $2); print $2}' | xargs curl -Lo epubcheck.zip
unzip epubcheck.zip
```

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can just keep Curl command

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's what you proposed in the previous pull request.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes

Copy link

@Monirzadeh Monirzadeh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for PR i left some comment of them

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.24%. Comparing base (bd69104) to head (4ec2b79).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #47      +/-   ##
==========================================
- Coverage   85.12%   83.24%   -1.89%     
==========================================
  Files          12       12              
  Lines         995     1289     +294     
==========================================
+ Hits          847     1073     +226     
- Misses         81      149      +68     
  Partials       67       67              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The property "svg" should be declared in the OPF file
3 participants