var fs= require('fs');
var epubZip= require('epub-zip');
var content = epubZip('./tests/epubs/epub1');
var content2= epubZip('./tests/epubs/epub2');
fs.writeFileSync("./tests/dist/epub1.epub",content);
fs.writeFileSync("./tests/dist/epub2.epub",content
查找转换 a epub to mobi和calibre:
nicholas@gondor:~/ebooks$
nicholas@gondor:~/ebooks$ flatpak --command="sh" run com.calibre_ebook.calibre -c "ebook-convert ~/in.epub ~/out.mobi"
Cannot read from /home/nicholas/in.epub
nicholas@gondor:~/ebooks$
nicholas@gondor:~/ebooks$ ll
total 1200
dr
我的目标是通过AppleScript创建一个EPUB文件,我从半手动生成EPUB文件开始。我的问题是IDPF EPUB验证器报告我的MIMETYPE文件不是我的EPUB包中的第一个文件,或者我的MIMETYPE不存在。我的AppleScript正在创建EPUB文件夹结构和一个MIMETYPE文件:
set EPUBMIMETYPEfilepath to ((EPUBfolderPath & ":MIMETYPE") as string)
set referenceToEPUBMIMETYPEfile to a reference to file EPUBMIMETYP
我可以打开一个zip条目并调整其内容,但我不知道如何保存它们。
缺少CL ZIP的。
规格:
ZIP
Quicklisp
MacPorts CLISP 2.49
Aquamacs 2.1 (Emacs 23.2)
Mac OS X 10.6.4
MacBook专业版5,1
; Removes newlines at the beginning of PRE tags in Sigil-edited ePub files.
;
; See http://code.google.com/p/sigil/issues/detail?id=655
;
; Andrew Pennebaker
; 16
如何阅读epub书籍并使用python打开它。我无法从实现EbookLib 0.15
下面是我正在尝试的代码
from ebooklib import epub
book = epub.read_epub('test.epub')
我得到以下错误:
AttributeError: 'builtin_function_or_method' object has no attribute 'rfind'
我试图使用Xamarin.Android在文本视图中显示来自html的图像。我设法显示了html,但无法显示图片。任何想法都会受到欢迎。
Epub epub = new Epub(Android.OS.Environment.ExternalStorageDirectory.Path + "/Download/testBook.epub");
//Get book title (Every epub file can have multiple titles)
string title = epub.Title[0];
在Go中,我们如何在没有压缩的情况下将文件添加到zip归档中?
对于上下文,我将与一个一起创建一个epub zip文件。它显示了以下Python代码:
import zipfile, os
def create_archive(path='/path/to/our/epub/directory'):
'''Create the ZIP archive. The mimetype must be the first file in the archive
and it must not be compressed.''
当尝试用epub-rs打开一个损坏的epub/ZIP文件时,zip-s机箱错误(它不会使用失败)被epub-rs包装到一个failure::Error中。我想用一个不同的错误处理程序来处理每个zip-rs错误类型,并且需要一种方法来匹配潜在的错误。我怎样才能从失败中找回它呢?
fn main() {
match epub::doc::EpubDoc::new("a.epub") {
Ok(epub) => // do something with the epub
Err(error) => {
//
我有收集视图,用户可以下载epub文件并在下载完成后显示出来。我使用FolioReaderKit来打开epub文件,我也得到了正确的路径,而epub文件就在那里。我正在使用Alamofire下载,但是我得到了一堆错误,
2016-11-04 18:02:28.304 indodragon[9482:74592] [SSZipArchive] Error: The file “EPUB.epub” couldn’t be saved in the folder “Documents” because a file with the same name already exists.
2016-1
我试图读取r中的EPUB文件,它放在工作目录中。我写了这段代码:
library(epubr)
library(tm)
x <- epub("Perchisuonalacampana.epub") # parse entire e-book
但我得到了以下错误:
Error in file.exists(path) :
file name conversion problem -- name too long?
(我的EPUB文件包含一本小说。)
编辑
getwd()
[1] "C:/Users/Standard/Downloads/aaa"
list
我从一位离开公司的同事那里继承了一份脚本,我们可以说,他在写脚本和记笔记方面很懒。
它似乎工作得很好,除了它没有像它应该的那样写到CSV。它应该给我图像的文件名,宽度,高度和总的像素数。我得到的是文件名,空白,空白,变量名称变量名称。如有任何帮助,我们将不胜感激:
#!/bin/bash
#
# This script will display
# all images included
ORIGDIR=~/Desktop/EPUB_Fix/Needs_Work
DIRECTORY=~/Desktop/EPUB_Fix/Work_Area
DESTINATION=~/Desktop/EPU
我正在努力学习脚本,并找到了这个帖子从电子酒吧文件中提取TOC,它给了我一些我需要的解决方案,但是当我测试它时,得到了一个错误error: Extra content at the end of the document。
一点点背景:我有两个epub文件:1.epub和2.epub。我分别测试了每个文件,运行良好(从每个epub获得了TOC ),但是当我尝试使用do测试两个文件时,得到了上面的错误。
我在学剧本,不知道我是不是犯了什么错误。谁能指出我的错误是什么?
ps:我的剧本
#! /usr/bin/bash
EPUB_LIST="1.epub 2.epub"
fo
我想阅读位于资产文件夹中的EPUB文件。我有一个HTML文件。在其中,我参考了epub.min.js,并提供了一个读取该文件的epub文件位置。但是,epub文件没有加载。有人能建议我如何在Android中使用html和javascript读取epub文件吗?
文件位置
Asset/Sample/index.html
Asset/sample/epub.min.js
Asset/Sample/jquery-1.10.2.min.js
Asset/Sample/Epub file folder. All html, images are available in this folder
<