-
Notifications
You must be signed in to change notification settings - Fork 197
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
Better export to epub #1144
Open
CD-Z
wants to merge
18
commits into
LNReader:master
Choose a base branch
from
CD-Z:feature/export_to_epub_version_bump
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Better export to epub #1144
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
32c3358
updated epubIconButton for consistend appbar
CD-Z b329ef7
updated exportEpubLocationModal for more consistent style
CD-Z d9d4f86
add app css to epub
CD-Z ba1ceea
reorganized export to epub filestructure
CD-Z 6b56636
switched from px lineheight and textsize to rem for better epub compa…
CD-Z 6fd7b11
removed console.logs
CD-Z 8543580
installed @cd-z npm packages
CD-Z 4baaaf8
replace chapter with #chapter in epub css
CD-Z 532a087
optimizied readerValueChange for epub
CD-Z 88d9607
fixed lint issue
CD-Z 8c2f8e6
fixed lint issues again
CD-Z dd4cb3f
removed dep package
CD-Z 0c245df
changed to Filemanager.pickfolder
CD-Z 2f36985
forced ascending
CD-Z 48f1779
disable manual change of folder path
CD-Z d563c8a
Added settings warning
CD-Z 53c4f81
lint
CD-Z fbe7b4c
Merge branch 'master' into feature/export_to_epub_version_bump
CD-Z File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
const fs = require('fs'); | ||
const path = require('path'); | ||
|
||
const cssFilePath = path.resolve( | ||
__dirname + '/../android/app/src/main/assets/css/', | ||
'index.css', | ||
); | ||
const jsFilePath = path.resolve( | ||
__dirname + '/../android/app/src/main/assets/css/', | ||
'index.js', | ||
); | ||
Comment on lines
+8
to
+11
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If this file is created in building time only, it should be ignore from git. |
||
|
||
fs.readFile(cssFilePath, 'utf8', (err, data) => { | ||
if (err) { | ||
console.error('Error reading CSS file:', err); | ||
return; | ||
} | ||
|
||
const jsContent = `export default \`\n${data}\n\`;`; | ||
|
||
fs.writeFile(jsFilePath, jsContent, 'utf8', err => { | ||
if (err) { | ||
console.error('Error writing JS file:', err); | ||
return; | ||
} | ||
|
||
console.info('CSS file successfully converted to JS module.'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any usage in app?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It belongs to my package as dependency, however if you don't install it manually, for some reason it says the package is not linked and can't be used. Which means the export feature is broken.