Skip to content

Commit

Permalink
rename get-page-text.js with get-page-struct.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Zacharia2 committed Jul 14, 2023
1 parent d6d3377 commit f93b7af
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion epub2twpub/epub-reader.js
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ class EpubReader {
const file = this.zip.file(manifestItem.href),
encoding = BINARY_MEDIA_TYPES.includes(manifestItem["media-type"]) ? "base64" : "text";
if(file) {
// 仅使用图片文件名。
// Use only picture file names.
this.images[manifestItem.href] = {
type: manifestItem["media-type"],
text: await file.async(encoding)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* @param {*} doc DOM model instance of the current document
* @returns Returns a structure: {chunks: [], stylsheets: [text]}
*/
exports.getStructure = function(win,doc) {
exports.getPageStruct = function(win,doc) {
win = win || window;
doc = doc || document;

Expand Down
6 changes: 3 additions & 3 deletions epub2twpub/text-extractor.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/*
Class representing the jsdom wrapper for get-page-text.js
Class representing the jsdom wrapper for get-page-struct.js
*/

const { JSDOM } = require("jsdom");
const { getStructure } = require("./get-page-text");
const { getPageStruct } = require("./get-page-struct");
const URL_PREFIX = "https://example.com/";

class TextExtractor {
Expand Down Expand Up @@ -37,7 +37,7 @@ class TextExtractor {
runScripts: "dangerously"
}).window;
var document = window.document;
var result = getStructure(window, document);
var result = getPageStruct(window, document);
}
return result;
}
Expand Down
2 changes: 1 addition & 1 deletion epub2twpub/twpub-plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ class TwpubPlugin {
}

/**
* 制作文本Tiddler标题
* Make text tiddler title
* @param {*} index 0-n, integer
* @returns Similar: '$:/plugins/twpub/id/text/000000001'
*/
Expand Down

0 comments on commit f93b7af

Please sign in to comment.