-
Notifications
You must be signed in to change notification settings - Fork 191
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
base: master
Are you sure you want to change the base?
Better export to epub #1144
Conversation
Why should we export reader ui to epub? |
package.json
Outdated
"@cd-z/epub-constructor": "^3.0.1", | ||
"@cd-z/react-native-epub-creator": "^3.0.0", |
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.
Are they duplicated?
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.
I fucked up the dependency so i had to create another version and installed it manually to make sure it works, however it can be removed again since it lt's not neccessary.
@@ -51,6 +53,7 @@ | |||
"react-native-device-info": "^8.4.7", | |||
"react-native-drawer-layout": "^3.2.2", | |||
"react-native-error-boundary": "^1.1.16", | |||
"react-native-file-access": "^3.1.0", |
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.
const jsFilePath = path.resolve( | ||
__dirname + '/../android/app/src/main/assets/css/', | ||
'index.js', | ||
); |
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.
If this file is created in building time only, it should be ignore from git.
@@ -1,6 +1,6 @@ | |||
import React, { useState } from 'react'; | |||
import { StyleSheet, View } from 'react-native'; | |||
import { Modal, TextInput, Text } from 'react-native-paper'; | |||
import { Modal, TextInput, Text } from 'react-native-paper'; //@ts-ignore |
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.
import { Modal, TextInput, Text } from 'react-native-paper'; //@ts-ignore | |
import { Modal, TextInput, Text } from 'react-native-paper'; |
//@ts-ignore | ||
import css from '../../../../../android/app/src/main/assets/css/index'; |
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.
for static files, you should import by using require
to avoiding TS warning
Where do I export the reader ui? |
` + (css as string).replace(/chapter/g, '#chapter') |
Btw, you could use implemented |
28aea06
to
8c2f8e6
Compare
This comment was marked as outdated.
This comment was marked as outdated.
Not planed, since only a minority of users will open the epub |
F-r It would be nice to know. Not necessary tho. |
Performance issue: beta(2:25): YouCut_20240728_001100235.mp4Stable(1:10): YouCut_20240728_000134690.mp4Detail: i tested on a beta build that doesnt have the changes of this pr..Commit 7cf8692. It's as fast as stable. I assume this pr modifications are the cause. |
It comes from an imported EPUB entry. |
This comment was marked as resolved.
This comment was marked as resolved.
Suggestion: It's more comfortable. |
Why would you want that? What exactly is the use case to have js/css specific only for the epub. Especially when most epub readers don't support it. |
Well it won't come with this PR, for now I need to find the time to finish this one. A perma edit would be the best solution to it, however this would also need a lot of work. |
I finally found the time to work a bit on the library and implemented it in LNReader with a few changes for better compatibility.
This PR closes: