mirror of
https://github.com/gedoor/legado.git
synced 2024-07-06 23:47:49 +08:00
rename epublib to book,库里面包含umd
This commit is contained in:
parent
440279be8d
commit
8b95adaf57
@ -197,7 +197,7 @@ dependencies {
|
|||||||
implementation('org.jsoup:jsoup:1.15.4')
|
implementation('org.jsoup:jsoup:1.15.4')
|
||||||
implementation('com.jayway.jsonpath:json-path:2.7.0')
|
implementation('com.jayway.jsonpath:json-path:2.7.0')
|
||||||
implementation('cn.wanghaomiao:JsoupXpath:2.5.3')
|
implementation('cn.wanghaomiao:JsoupXpath:2.5.3')
|
||||||
implementation(project(path: ':epublib'))
|
implementation implementation(project(path: ':book'))
|
||||||
|
|
||||||
//JS rhino
|
//JS rhino
|
||||||
//implementation('com.github.gedoor:rhino-android:1.8')
|
//implementation('com.github.gedoor:rhino-android:1.8')
|
||||||
|
0
epublib/.gitignore → book/.gitignore
vendored
0
epublib/.gitignore → book/.gitignore
vendored
@ -5,7 +5,7 @@ plugins {
|
|||||||
android {
|
android {
|
||||||
compileSdk = compile_sdk_version
|
compileSdk = compile_sdk_version
|
||||||
buildToolsVersion = build_tool_version
|
buildToolsVersion = build_tool_version
|
||||||
namespace 'me.ag2s.epublib'
|
namespace 'me.ag2s'
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdk 21
|
minSdk 21
|
||||||
targetSdk 33
|
targetSdk 33
|
@ -1,11 +1,10 @@
|
|||||||
package me.ag2s.epublib.domain;
|
package me.ag2s.epublib.domain;
|
||||||
|
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
import me.ag2s.epublib.util.StringUtil;
|
import me.ag2s.epublib.util.StringUtil;
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents one of the authors of the book
|
* Represents one of the authors of the book
|
||||||
*
|
*
|
@ -1,8 +1,9 @@
|
|||||||
package me.ag2s.epublib.domain;
|
package me.ag2s.epublib.domain;
|
||||||
|
|
||||||
import me.ag2s.epublib.util.StringUtil;
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
import me.ag2s.epublib.util.StringUtil;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* These are references to elements of the book's guide.
|
* These are references to elements of the book's guide.
|
@ -1,10 +1,11 @@
|
|||||||
package me.ag2s.epublib.domain;
|
package me.ag2s.epublib.domain;
|
||||||
|
|
||||||
import me.ag2s.epublib.util.StringUtil;
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
|
import me.ag2s.epublib.util.StringUtil;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A Book's identifier.
|
* A Book's identifier.
|
||||||
*
|
*
|
@ -2,11 +2,12 @@ package me.ag2s.epublib.domain;
|
|||||||
|
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
import me.ag2s.epublib.util.IOUtil;
|
|
||||||
import java.io.ByteArrayInputStream;
|
import java.io.ByteArrayInputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
|
|
||||||
|
import me.ag2s.epublib.util.IOUtil;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A Resource that loads its data only on-demand from a EPUB book file.
|
* A Resource that loads its data only on-demand from a EPUB book file.
|
||||||
* This way larger books can fit into memory and can be opened faster.
|
* This way larger books can fit into memory and can be opened faster.
|
@ -1,9 +1,10 @@
|
|||||||
package me.ag2s.epublib.domain;
|
package me.ag2s.epublib.domain;
|
||||||
|
|
||||||
import me.ag2s.epublib.util.StringUtil;
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
import me.ag2s.epublib.util.StringUtil;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Manages mediatypes that are used by epubs
|
* Manages mediatypes that are used by epubs
|
@ -1,7 +1,5 @@
|
|||||||
package me.ag2s.epublib.domain;
|
package me.ag2s.epublib.domain;
|
||||||
|
|
||||||
import me.ag2s.epublib.util.StringUtil;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
@ -10,6 +8,8 @@ import java.util.Map;
|
|||||||
|
|
||||||
import javax.xml.namespace.QName;
|
import javax.xml.namespace.QName;
|
||||||
|
|
||||||
|
import me.ag2s.epublib.util.StringUtil;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A Book's collection of Metadata.
|
* A Book's collection of Metadata.
|
||||||
* In the future it should contain all Dublin Core attributes, for now
|
* In the future it should contain all Dublin Core attributes, for now
|
@ -1,15 +1,16 @@
|
|||||||
package me.ag2s.epublib.domain;
|
package me.ag2s.epublib.domain;
|
||||||
|
|
||||||
import me.ag2s.epublib.Constants;
|
|
||||||
import me.ag2s.epublib.util.IOUtil;
|
|
||||||
import me.ag2s.epublib.util.StringUtil;
|
|
||||||
import me.ag2s.epublib.util.commons.io.XmlStreamReader;
|
|
||||||
import java.io.ByteArrayInputStream;
|
import java.io.ByteArrayInputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.Reader;
|
import java.io.Reader;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
import me.ag2s.epublib.Constants;
|
||||||
|
import me.ag2s.epublib.util.IOUtil;
|
||||||
|
import me.ag2s.epublib.util.StringUtil;
|
||||||
|
import me.ag2s.epublib.util.commons.io.XmlStreamReader;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents a resource that is part of the epub.
|
* Represents a resource that is part of the epub.
|
||||||
* A resource can be a html file, image, xml, etc.
|
* A resource can be a html file, image, xml, etc.
|
@ -1,7 +1,6 @@
|
|||||||
package me.ag2s.epublib.domain;
|
package me.ag2s.epublib.domain;
|
||||||
|
|
||||||
import me.ag2s.epublib.Constants;
|
import android.util.Base64;
|
||||||
import me.ag2s.epublib.util.StringUtil;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@ -12,7 +11,9 @@ import java.util.List;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
import android.util.Base64;
|
|
||||||
|
import me.ag2s.epublib.Constants;
|
||||||
|
import me.ag2s.epublib.util.StringUtil;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* All the resources that make up the book.
|
* All the resources that make up the book.
|
@ -1,11 +1,12 @@
|
|||||||
package me.ag2s.epublib.domain;
|
package me.ag2s.epublib.domain;
|
||||||
|
|
||||||
import me.ag2s.epublib.util.StringUtil;
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import me.ag2s.epublib.util.StringUtil;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The spine sections are the sections of the book in the order in which the book should be read.
|
* The spine sections are the sections of the book in the order in which the book should be read.
|
||||||
*
|
*
|
@ -2,7 +2,10 @@ package me.ag2s.epublib.epub;
|
|||||||
|
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
import me.ag2s.epublib.Constants;
|
import org.xml.sax.EntityResolver;
|
||||||
|
import org.xml.sax.InputSource;
|
||||||
|
import org.xmlpull.v1.XmlPullParserFactory;
|
||||||
|
import org.xmlpull.v1.XmlSerializer;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
@ -17,10 +20,7 @@ import javax.xml.parsers.DocumentBuilder;
|
|||||||
import javax.xml.parsers.DocumentBuilderFactory;
|
import javax.xml.parsers.DocumentBuilderFactory;
|
||||||
import javax.xml.parsers.ParserConfigurationException;
|
import javax.xml.parsers.ParserConfigurationException;
|
||||||
|
|
||||||
import org.xml.sax.EntityResolver;
|
import me.ag2s.epublib.Constants;
|
||||||
import org.xml.sax.InputSource;
|
|
||||||
import org.xmlpull.v1.XmlPullParserFactory;
|
|
||||||
import org.xmlpull.v1.XmlSerializer;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Various low-level support methods for reading/writing epubs.
|
* Various low-level support methods for reading/writing epubs.
|
@ -1,7 +1,8 @@
|
|||||||
package me.ag2s.epublib.epub;
|
package me.ag2s.epublib.epub;
|
||||||
|
|
||||||
import me.ag2s.epublib.domain.Resource;
|
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
|
|
||||||
|
import me.ag2s.epublib.domain.Resource;
|
||||||
@SuppressWarnings("unused")
|
@SuppressWarnings("unused")
|
||||||
public interface HtmlProcessor {
|
public interface HtmlProcessor {
|
||||||
|
|
@ -1,7 +1,5 @@
|
|||||||
package me.ag2s.epublib.util;
|
package me.ag2s.epublib.util;
|
||||||
|
|
||||||
import android.util.Log;
|
|
||||||
|
|
||||||
import java.io.ByteArrayOutputStream;
|
import java.io.ByteArrayOutputStream;
|
||||||
import java.io.Closeable;
|
import java.io.Closeable;
|
||||||
import java.io.EOFException;
|
import java.io.EOFException;
|
||||||
@ -20,7 +18,6 @@ import java.nio.CharBuffer;
|
|||||||
import java.nio.channels.ReadableByteChannel;
|
import java.nio.channels.ReadableByteChannel;
|
||||||
import java.nio.charset.Charset;
|
import java.nio.charset.Charset;
|
||||||
|
|
||||||
import me.ag2s.epublib.epub.PackageDocumentReader;
|
|
||||||
import me.ag2s.epublib.util.commons.io.IOConsumer;
|
import me.ag2s.epublib.util.commons.io.IOConsumer;
|
||||||
|
|
||||||
/**
|
/**
|
@ -17,6 +17,7 @@
|
|||||||
package me.ag2s.epublib.util.commons.io;
|
package me.ag2s.epublib.util.commons.io;
|
||||||
|
|
||||||
|
|
||||||
|
import static me.ag2s.epublib.util.IOUtil.EOF;
|
||||||
|
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
|
|
||||||
@ -28,8 +29,6 @@ import java.util.List;
|
|||||||
|
|
||||||
import me.ag2s.epublib.util.IOUtil;
|
import me.ag2s.epublib.util.IOUtil;
|
||||||
|
|
||||||
import static me.ag2s.epublib.util.IOUtil.EOF;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class is used to wrap a stream that includes an encoded {@link ByteOrderMark} as its first bytes.
|
* This class is used to wrap a stream that includes an encoded {@link ByteOrderMark} as its first bytes.
|
@ -18,14 +18,14 @@ package me.ag2s.epublib.util.commons.io;
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
import static me.ag2s.epublib.util.IOUtil.EOF;
|
||||||
|
|
||||||
import java.io.FilterInputStream;
|
import java.io.FilterInputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
|
|
||||||
import me.ag2s.epublib.util.IOUtil;
|
import me.ag2s.epublib.util.IOUtil;
|
||||||
|
|
||||||
import static me.ag2s.epublib.util.IOUtil.EOF;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A Proxy stream which acts as expected, that is it passes the method
|
* A Proxy stream which acts as expected, that is it passes the method
|
@ -6,7 +6,6 @@ import androidx.annotation.NonNull;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
|
|
||||||
|
|
||||||
import me.ag2s.umdlib.domain.UmdBook;
|
import me.ag2s.umdlib.domain.UmdBook;
|
||||||
import me.ag2s.umdlib.domain.UmdCover;
|
import me.ag2s.umdlib.domain.UmdCover;
|
||||||
import me.ag2s.umdlib.domain.UmdHeader;
|
import me.ag2s.umdlib.domain.UmdHeader;
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user