@@ -127,8 +127,8 @@ | ||
127 | 127 | cAutoEpub.CreadEpub() |
128 | 128 | |
129 | 129 | |
130 | - Dim cEpub As New cEpub6(emEpub6.emEncCode.GB2321, emEpub6.emLan.ZH, "岩波日本史", "岩波出版社", "DYGW01_202009") | |
131 | - cEpub.bConvertToMobi = True | |
130 | + Dim cEpub As New cEpub6(emEpub6.emEncCode.GB2321, emEpub6.emLan.ZH, "岩波日本史", "DEP3", "岩波出版社", "DYGW01_202009") | |
131 | + cEpub.bConvertToMobi = False | |
132 | 132 | cEpub.CreateEpub(cAutoEpub.mEpub) |
133 | 133 | MessageBox.Show("Finished") |
134 | 134 | System.Diagnostics.Process.Start(cEpub.sOutPutPathFolder) |
@@ -224,7 +224,7 @@ | ||
224 | 224 | cAutoEpub.CreadEpub() |
225 | 225 | |
226 | 226 | |
227 | - Dim cEpub As New cEpub6(emEpub6.emEncCode.GB2321, emEpub6.emLan.ZH, "中短篇合集", "合集", "DYGW01_202009") | |
227 | + Dim cEpub As New cEpub6(emEpub6.emEncCode.GB2321, emEpub6.emLan.ZH, "中短篇合集", "合集", "ZDPXS_202011") | |
228 | 228 | cEpub.bConvertToMobi = False |
229 | 229 | cEpub.CreateEpub(cAutoEpub.mEpub) |
230 | 230 | MessageBox.Show("Finished") |
@@ -8,7 +8,7 @@ | ||
8 | 8 | |
9 | 9 | Public mEpub As New List(Of modelVolume) |
10 | 10 | |
11 | - Dim listSkip As List(Of String) = {"版权", "目录", "书名页", "版权页", "作家榜经典文库", "勇者物语", "书籍导读", "封面", "书名页", "扉页", "书名", "麒麟之翼", "作者简介", "内容简介", "版权信息", "总目录"}.ToList | |
11 | + Dim listSkip As List(Of String) = {"版权", "目录", "书名页", "版权页", "作家榜经典文库", "勇者物语", "书籍导读", "封面", "书名页", "扉页", "书名", "麒麟之翼", "作者简介", "内容简介", "版权信息", "总目录", "前折页", "后折页", "封底"}.ToList | |
12 | 12 | Dim listMobiRight As List(Of String) = {"right"}.ToList() |
13 | 13 | |
14 | 14 | Sub New(_bookPath As String) |
@@ -40,6 +40,8 @@ | ||
40 | 40 | Continue For |
41 | 41 | End If |
42 | 42 | |
43 | + mVolume.Title = mVolume.Title.Replace("世界十大中短篇小说家.", "") | |
44 | + | |
43 | 45 | If ncxVolume.navPoint Is Nothing Then |
44 | 46 | mVolume.Title = ncxVolume.navLabel.text |
45 | 47 | mVolume.Scr = ncxVolume.content.src |
@@ -146,26 +148,32 @@ | ||
146 | 148 | |
147 | 149 | Private Sub EditHref00(ByRef sHtml As String) |
148 | 150 | |
149 | - 'Dim hapHtmlEdit As HtmlAgilityPack.HtmlDocument = New HtmlAgilityPack.HtmlDocument() | |
150 | - 'hapHtmlEdit.LoadHtml(sHtml) | |
151 | - 'Dim linqHap = hapHtmlEdit.DocumentNode.SelectNodes(("//a")) | |
151 | + Dim hapHtmlEdit As HtmlAgilityPack.HtmlDocument = New HtmlAgilityPack.HtmlDocument() | |
152 | + hapHtmlEdit.LoadHtml(sHtml) | |
153 | + Dim linqHap = hapHtmlEdit.DocumentNode.SelectNodes(("//a")) | |
152 | 154 | |
153 | - 'If linqHap IsNot Nothing Then | |
155 | + If linqHap IsNot Nothing Then | |
154 | 156 | |
155 | - ' For Each uHap As HtmlNode In linqHap | |
157 | + For Each uHap As HtmlNode In linqHap | |
156 | 158 | |
157 | - ' Dim sScr As String = uHap.Attributes("href").Value | |
158 | 159 | |
159 | - ' If sScr.Split("#").Count = 2 Then | |
160 | - ' sHtml = sHtml.Replace(sScr, "#" & sScr.Split("#")(1)) | |
161 | - ' Else | |
162 | - ' Dim sError As String = "" | |
163 | - ' End If | |
164 | - ' Next | |
160 | + If uHap.Attributes("href") IsNot Nothing Then | |
161 | + Dim sScr As String = uHap.Attributes("href").Value | |
165 | 162 | |
166 | - 'End If | |
163 | + If sScr.Split("#").Count = 2 Then | |
164 | + sHtml = sHtml.Replace(sScr, "#" & sScr.Split("#")(1)) | |
165 | + Else | |
166 | + Dim sError As String = "" | |
167 | + End If | |
167 | 168 | |
169 | + End If | |
168 | 170 | |
171 | + | |
172 | + Next | |
173 | + | |
174 | + End If | |
175 | + | |
176 | + | |
169 | 177 | End Sub |
170 | 178 | |
171 | 179 |
@@ -378,7 +378,7 @@ | ||
378 | 378 | NewSection = New cFile(sSectionName, sSectionURL, sSectionPath, sSectionTitle) |
379 | 379 | NewSection.sFolder = sSectionNM |
380 | 380 | |
381 | - NewSection.sbText.Append(htmlBodyStart(2)) | |
381 | + NewSection.sbText.Append(htmlBodyStart(emEpub6.emDep.Dep2)) | |
382 | 382 | NewSection.sbText.Append(htmlAddTitle(NewSection.sTitle)) |
383 | 383 | |
384 | 384 | If sTitleSP.Length > 0 Then |
@@ -771,7 +771,7 @@ | ||
771 | 771 | |
772 | 772 | #Region "html" |
773 | 773 | |
774 | - Private Function htmlBodyStart(ByVal cssDep As Integer) As String | |
774 | + Private Function htmlBodyStart(ByVal cssDep As emEpub6.emDep) As String | |
775 | 775 | |
776 | 776 | Dim sCSS1 As String = "stylesheet.css" |
777 | 777 | Dim sCSS2 As String = "page_styles.css" |
@@ -778,19 +778,19 @@ | ||
778 | 778 | |
779 | 779 | Dim sDep As String = String.Empty |
780 | 780 | |
781 | - If cssDep = 1 Then | |
781 | + If cssDep = emEpub6.emDep.Dep1 Then | |
782 | 782 | 'sCSS1 = "../" & sCSS1 |
783 | 783 | 'sCSS2 = "../" & sCSS2 |
784 | 784 | sDep = "../" |
785 | 785 | End If |
786 | 786 | |
787 | - If cssDep = 2 Then | |
787 | + If cssDep = emEpub6.emDep.Dep2 Then | |
788 | 788 | 'sCSS1 = "../../" & sCSS1 |
789 | 789 | 'sCSS2 = "../../" & sCSS2 |
790 | 790 | sDep = "../../" |
791 | 791 | End If |
792 | 792 | |
793 | - If cssDep = 3 Then | |
793 | + If cssDep = emEpub6.emDep.Dep3 Then | |
794 | 794 | 'sCSS1 = "../../../" & sCSS1 |
795 | 795 | 'sCSS2 = "../../../" & sCSS2 |
796 | 796 | sDep = "../../../" |
@@ -797,13 +797,7 @@ | ||
797 | 797 | |
798 | 798 | End If |
799 | 799 | |
800 | - If cssDep = 4 Then | |
801 | - 'sCSS1 = "../../../" & sCSS1 | |
802 | - 'sCSS2 = "../../../" & sCSS2 | |
803 | - sDep = "../../../" | |
804 | 800 | |
805 | - End If | |
806 | - | |
807 | 801 | sCSS1 = sDep & sCSS1 |
808 | 802 | sCSS2 = sDep & sCSS2 |
809 | 803 |
@@ -1401,6 +1395,7 @@ | ||
1401 | 1395 | End Enum |
1402 | 1396 | |
1403 | 1397 | Enum emDep As Integer |
1398 | + Dep0 | |
1404 | 1399 | Dep1 |
1405 | 1400 | Dep2 |
1406 | 1401 | Dep3 |