• R/O
  • SSH
  • HTTPS

autocodeforsql: 提交


Commit MetaInfo

修订版408 (tree)
时间2020-11-11 12:33:41
作者hilinwei

Log Message

更改概述

差异

--- AutoEpub3/AutoEpub8.vb (revision 407)
+++ AutoEpub3/AutoEpub8.vb (revision 408)
@@ -127,8 +127,8 @@
127127 cAutoEpub.CreadEpub()
128128
129129
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
132132 cEpub.CreateEpub(cAutoEpub.mEpub)
133133 MessageBox.Show("Finished")
134134 System.Diagnostics.Process.Start(cEpub.sOutPutPathFolder)
@@ -224,7 +224,7 @@
224224 cAutoEpub.CreadEpub()
225225
226226
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")
228228 cEpub.bConvertToMobi = False
229229 cEpub.CreateEpub(cAutoEpub.mEpub)
230230 MessageBox.Show("Finished")
--- AutoEpub3/Logic/DEP2/cDep2_006.vb (revision 407)
+++ AutoEpub3/Logic/DEP2/cDep2_006.vb (revision 408)
@@ -8,7 +8,7 @@
88
99 Public mEpub As New List(Of modelVolume)
1010
11- Dim listSkip As List(Of String) = {"版权", "目录", "书名页", "版权页", "作家榜经典文库", "勇者物语", "书籍导读", "封面", "书名页", "扉页", "书名", "麒麟之翼", "作者简介", "内容简介", "版权信息", "总目录"}.ToList
11+ Dim listSkip As List(Of String) = {"版权", "目录", "书名页", "版权页", "作家榜经典文库", "勇者物语", "书籍导读", "封面", "书名页", "扉页", "书名", "麒麟之翼", "作者简介", "内容简介", "版权信息", "总目录", "前折页", "后折页", "封底"}.ToList
1212 Dim listMobiRight As List(Of String) = {"right"}.ToList()
1313
1414 Sub New(_bookPath As String)
@@ -40,6 +40,8 @@
4040 Continue For
4141 End If
4242
43+ mVolume.Title = mVolume.Title.Replace("世界十大中短篇小说家.", "")
44+
4345 If ncxVolume.navPoint Is Nothing Then
4446 mVolume.Title = ncxVolume.navLabel.text
4547 mVolume.Scr = ncxVolume.content.src
@@ -146,26 +148,32 @@
146148
147149 Private Sub EditHref00(ByRef sHtml As String)
148150
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"))
152154
153- 'If linqHap IsNot Nothing Then
155+ If linqHap IsNot Nothing Then
154156
155- ' For Each uHap As HtmlNode In linqHap
157+ For Each uHap As HtmlNode In linqHap
156158
157- ' Dim sScr As String = uHap.Attributes("href").Value
158159
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
165162
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
167168
169+ End If
168170
171+
172+ Next
173+
174+ End If
175+
176+
169177 End Sub
170178
171179
--- AutoEpub3/cEpub6.vb (revision 407)
+++ AutoEpub3/cEpub6.vb (revision 408)
@@ -378,7 +378,7 @@
378378 NewSection = New cFile(sSectionName, sSectionURL, sSectionPath, sSectionTitle)
379379 NewSection.sFolder = sSectionNM
380380
381- NewSection.sbText.Append(htmlBodyStart(2))
381+ NewSection.sbText.Append(htmlBodyStart(emEpub6.emDep.Dep2))
382382 NewSection.sbText.Append(htmlAddTitle(NewSection.sTitle))
383383
384384 If sTitleSP.Length > 0 Then
@@ -771,7 +771,7 @@
771771
772772 #Region "html"
773773
774- Private Function htmlBodyStart(ByVal cssDep As Integer) As String
774+ Private Function htmlBodyStart(ByVal cssDep As emEpub6.emDep) As String
775775
776776 Dim sCSS1 As String = "stylesheet.css"
777777 Dim sCSS2 As String = "page_styles.css"
@@ -778,19 +778,19 @@
778778
779779 Dim sDep As String = String.Empty
780780
781- If cssDep = 1 Then
781+ If cssDep = emEpub6.emDep.Dep1 Then
782782 'sCSS1 = "../" & sCSS1
783783 'sCSS2 = "../" & sCSS2
784784 sDep = "../"
785785 End If
786786
787- If cssDep = 2 Then
787+ If cssDep = emEpub6.emDep.Dep2 Then
788788 'sCSS1 = "../../" & sCSS1
789789 'sCSS2 = "../../" & sCSS2
790790 sDep = "../../"
791791 End If
792792
793- If cssDep = 3 Then
793+ If cssDep = emEpub6.emDep.Dep3 Then
794794 'sCSS1 = "../../../" & sCSS1
795795 'sCSS2 = "../../../" & sCSS2
796796 sDep = "../../../"
@@ -797,13 +797,7 @@
797797
798798 End If
799799
800- If cssDep = 4 Then
801- 'sCSS1 = "../../../" & sCSS1
802- 'sCSS2 = "../../../" & sCSS2
803- sDep = "../../../"
804800
805- End If
806-
807801 sCSS1 = sDep & sCSS1
808802 sCSS2 = sDep & sCSS2
809803
@@ -1401,6 +1395,7 @@
14011395 End Enum
14021396
14031397 Enum emDep As Integer
1398+ Dep0
14041399 Dep1
14051400 Dep2
14061401 Dep3
Show on old repository browser