lelinhtinh / jepub Goto Github PK
View Code? Open in Web Editor NEWSimple EPUB builder library, works in modern browsers.
Home Page: https://lelinhtinh.github.io/jEpub/
License: ISC License
Simple EPUB builder library, works in modern browsers.
Home Page: https://lelinhtinh.github.io/jEpub/
License: ISC License
When doing import I am running into ./node_modules/jepub/src/jepub.js
Module not found: Can't resolve './tpl/OEBPS/front-cover.html' in '/Users/hemantv/workspace/tellado/tellado-webapp/node_modules/jepub/src'
any ideas what might be going on here?
Everything is working fine locally, but as soon as I deploy the project, it seems that ejs has an issue with a template. I couldn't figure out what's wrong and can't reproduce locally... any ideas?
Uncaught (in promise) ReferenceError: ejs:3
1| <?xml version="1.0" encoding="UTF-8" ?>
2| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
>> 3| <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<%= i18n.code %>">
4|
5| <head>
6| <title><%= i18n.info %></title>
i is not defined
at escapeFn (eval at compile (e2bc53435618f67931716dd55169ffaa66bb2a34.js?meteor_js_resource=true:formatted:21840), <anonymous>:4:72)
at eval (eval at compile (e2bc53435618f67931716dd55169ffaa66bb2a34.js?meteor_js_resource=true:formatted:21840), <anonymous>:26:16)
at Object.n.render (e2bc53435618f67931716dd55169ffaa66bb2a34.js?meteor_js_resource=true:formatted:21768)
at b.init (e2bc53435618f67931716dd55169ffaa66bb2a34.js?meteor_js_resource=true:formatted:21246)
at generateEPUB (e2bc53435618f67931716dd55169ffaa66bb2a34.js?meteor_js_resource=true:formatted:230087)
at e2bc53435618f67931716dd55169ffaa66bb2a34.js?meteor_js_resource=true:formatted:229997
at e2bc53435618f67931716dd55169ffaa66bb2a34.js?meteor_js_resource=true:formatted:493
The code up to that point is as simple as it gets:
var author_name = "xyz";
var story_name = "abc";
const options = {
i18n: 'en',
title: story_name,
author: author_name,
publisher: "somePublisher",
tags: [ 'epub' ]
}
//generate epub
import ejs from "ejs";
import jEpub from "jepub/dist/jepub";
const jepub = new jEpub()
jepub.init(options);
Hi folks, Is there any plan to provide a type definition file for this package?
Is there a way to change it?
Hello, how to add a or what is the way for add images in a section content?
@jeffmcneill, since the “new” EPUB3 is mostly a reversion to EPUB 3.0.1, that’s the model to follow. See https://w3c.github.io/publ-epub-revision/epub32/spec/epub-packages.html#sec-belongs-to-collection for the spec, though the examples at https://w3c.github.io/publ-epub-revision/epub32/spec/epub-packages.html#group-position are perhaps a bit more complete. Basically:
<meta id="num" property="belongs-to-collection">Series Name Goes Here</meta>
<meta property="collection-type" refines="#num">series</meta>
<meta property="group-position" refines="#num">1</meta>
Caveats:
set
instead of series
. The example shown puts a Harry Potter book in a set
, but would that have been the right decision when the books were still being released? How about a book series whose final length is not known at the moment?group-position
is “A single xsd:unsignedInt
or series of decimal-separated numbers (e.g., 1
or 2.2.1
).”)<meta property="belongs-to-collection" id="c02">Harry Potter</meta>
<meta refines="#c02" property="collection-type">set</meta>
<meta refines="#c02" property="group-position">2</meta>
<meta refines="#c02" property="dcterms:identifier">urn:uuid:99999999-8888-7777-6666-555555555555</meta>
Originally posted by @jcsalomon in w3c/epub-specs#326 (comment)
Mình ngoài nghành IT nhưng cũng thấy thư viện khá tốt, thao tác ngắn gọn đơn giản nhưng không hỗ trợ tạo TOC lồng nhau. mong bạn sớm hỗ trợ chức này này. :D
mình cũng đang dùng thằng python này thấy cũng same same nhưng hỗ trợ. https://github.com/anqxyr/mkepub
Hello,
In my case, I require jEpub in an UserLibrary then I require that UserLibrary into a normal UserScript.
E.g:
// ==UserScript==
// @name TangThuVien downloader
// @match http://truyen.tangthuvien.vn/doc-truyen/*
// @match https://truyen.tangthuvien.vn/doc-truyen/*
// @require https://greasyfork.org/scripts/383027-mb-downloader-library/code/MB%20Downloader%20Library.js?version=698206
// @connect self
// @run-at document-idle
// @noframes
// ==/UserScript==
But it is showing this
It will work if I changed from UserLibrary to UserScript. Do you know why this happening?
P/s: Thank you so much for creating TruyenCV_downloader, I steal lots of code from you :) 👍 👍 💯 💯
Bỏ dấu Tiếng Việt ở các phần như tiêu đề, giới thiệu, mục lục*
, ... trừ nội dung chương. Việc này sẽ giúp tránh lỗi phông chữ ở các phần đấy trên Kobo, Mobipocket Reader Desktop.
So I'm using Cordova to build an android app and it acts as a browser-side I believe. Now the code runs fine. but jepub.generate(type = 'blob');
doesn't generate any file.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.