• R/O
  • SSH
  • HTTPS

autocodeforsql: Commit


Commit MetaInfo

Revisão383 (tree)
Hora2020-09-15 11:42:46
Autorhilinwei

Mensagem de Log

Mudança Sumário

Diff

--- AutoEpub3/Logic/DEP3/cDep3_003.vb (revision 382)
+++ AutoEpub3/Logic/DEP3/cDep3_003.vb (revision 383)
@@ -102,7 +102,7 @@
102102
103103 Dim iTemp As Integer = 1
104104
105- For ctrChapter As Integer = indexFrom + 1 To indexTo - 1
105+ For ctrChapter As Integer = indexFrom + 1 To indexTo
106106
107107
108108 Dim ncxChapter As ncxNavPointNavPoint = ncxSection.navPoint(ctrChapter)
--- AutoEpub3/Logic/DEP3/cDep3_004.vb (revision 382)
+++ AutoEpub3/Logic/DEP3/cDep3_004.vb (revision 383)
@@ -6,7 +6,7 @@
66
77 Public mEpub As New List(Of modelSection)
88
9- Dim listSkip As List(Of String) = {"版权", "目录", "书名页", "版权页", "作家榜经典文库", "勇者物语", "书籍导读", "封面", "书名页", "扉页"}.ToList
9+ Dim listSkip As List(Of String) = {"版权", "目录", "书名页", "版权页", "作家榜经典文库", "勇者物语", "书籍导读", "封面", "书名页", "扉页", "书名", "麒麟之翼", "作者简介", "内容简介"}.ToList
1010 Dim listMobiRight As List(Of String) = {"signature"}.ToList()
1111
1212
@@ -43,12 +43,10 @@
4343 Dim mSection As New modelSection()
4444 mSection.Title = cTools.listNav_SE(ncxSection.navLabel.text, "《", "》", False)(0)
4545
46- If mSection.Title.IndexOf("第一章") > -1 Then
47- Dim sStop As String = "1"
48- End If
4946
50- Dim ncxVolume As List(Of ncxNavPointNavPoint) = ncxSection.navPoint.Where(Function(x) x.navLabel.text.IndexOf("第") > -1).ToList()
5147
48+ Dim ncxVolume As List(Of ncxNavPointNavPoint) = ncxSection.navPoint.Where(Function(x) x.navLabel.text.IndexOf("章") > -1).ToList()
49+
5250 If ncxVolume.Count = 0 Then
5351 ncxVolume = ncxSection.navPoint.ToList()
5452 End If
@@ -59,7 +57,14 @@
5957 Dim mVolume As New modelVolume
6058 mVolume.Title = ncxVolume(ctrVolume).navLabel.text
6159
60+ mVolume.Title = mVolume.Title.Replace("《", "")
61+ mVolume.Title = mVolume.Title.Replace("》", "")
62+ mVolume.Title = mVolume.Title.Replace("卷", "")
6263
64+ If mVolume.Title = "第四章" Then
65+ Dim sStop As String = ""
66+ End If
67+
6368 If listSkip.Any(Function(x) mVolume.Title.IndexOf(x) > -1) Then
6469 Continue For
6570 End If
@@ -97,46 +102,59 @@
97102
98103 mVolume.listText = listText
99104
100- End If
105+ Else
101106
107+ Dim iTemp As Integer = 1
102108
103- Dim iTemp As Integer = 1
109+ For ctrChapter As Integer = indexFrom + 1 To indexTo
104110
105- For ctrChapter As Integer = indexFrom + 1 To indexTo - 1
106111
112+ Dim ncxChapter As ncxNavPointNavPoint = ncxSection.navPoint(ctrChapter)
107113
108- Dim ncxChapter As ncxNavPointNavPoint = ncxSection.navPoint(ctrChapter)
114+ Dim mChapter As New modelChapter
109115
110- Dim mChapter As New modelChapter
116+ mChapter.Title = iTemp
117+ mChapter.Scr = ncxChapter.content.src
111118
112- mChapter.Title = iTemp
113- mChapter.Scr = ncxChapter.content.src
119+ If listSkip.Any(Function(x) mChapter.Title.IndexOf(x) > -1) Then
120+ Continue For
121+ End If
114122
115- If listSkip.Any(Function(x) mChapter.Title.IndexOf(x) > -1) Then
116- Continue For
117- End If
123+ If mChapter.Scr.IndexOf("text00989") > -1 Then
124+ Dim sStop As String = ""
125+ End If
118126
119127
120- Dim sPath As String = Path.Combine(bookPath, mChapter.Scr).Split("#").ToList(0)
121128
122- Dim sChapter As String = sFileEditRead(sPath, emEpub6.emDep.Dep3)
123- Dim listText As List(Of String) = cTools.listText_P(sChapter)
129+ Dim sPath As String = Path.Combine(bookPath, mChapter.Scr).Split("#").ToList(0)
124130
125- mChapter.listText = listText
131+ Dim sChapter As String = sFileEditRead(sPath, emEpub6.emDep.Dep3)
132+ Dim listText As List(Of String) = cTools.listText_P(sChapter)
126133
127- 'If listText.Count > 0 Then
128- ' If listText(0).Trim().IndexOf(mVolume.Title) > -1 Then
129- ' listText.RemoveAt(0)
130- ' End If
131- 'End If
134+ mChapter.listText = listText
132135
136+ 'If listText.Count > 0 Then
137+ ' If listText(0).Trim().IndexOf(mVolume.Title) > -1 Then
138+ ' listText.RemoveAt(0)
139+ ' End If
140+ 'End If
133141
134- mVolume.listChapter.Add(mChapter)
135142
136- iTemp += 1
137- Next
143+ mVolume.listChapter.Add(mChapter)
138144
145+ iTemp += 1
139146
147+ Next
148+
149+
150+
151+ End If
152+
153+
154+
155+
156+
157+
140158 mSection.listVolume.Add(mVolume)
141159
142160 Next
@@ -174,10 +192,27 @@
174192
175193 If listDel1 IsNot Nothing Then
176194 For Each uDel As HtmlAgilityPack.HtmlNode In listDel1
195+ Console.WriteLine(uDel.InnerText)
177196 sHtml = sHtml.Replace(uDel.OuterHtml, "")
178197 Next
179198 End If
180199
200+
201+
202+ Dim listDel2 = hapHtml.DocumentNode.SelectNodes(("//h[contains(@class, 'calibre8')]"))
203+
204+ If listDel2 IsNot Nothing Then
205+ For Each uDel As HtmlAgilityPack.HtmlNode In listDel2
206+ Console.WriteLine(uDel.InnerText)
207+ sHtml = sHtml.Replace(uDel.OuterHtml, "")
208+ Next
209+ End If
210+
211+
212+
213+
214+
215+
181216 End Sub
182217
183218 Private Sub EditHref00(ByRef sHtml As String)
@@ -356,6 +391,8 @@
356391
357392 For iCtr3 As Integer = 0 To mEpub(iCtr1).listVolume(iCtr2).listChapter.Count - 1
358393 chkListTopLine(mEpub(iCtr1).listVolume(iCtr2).listChapter(iCtr3).listText, mEpub(iCtr1).listVolume(iCtr2).listChapter(iCtr3).Title)
394+ chkListTopLine(mEpub(iCtr1).listVolume(iCtr2).listChapter(iCtr3).listText, mEpub(iCtr1).listVolume(iCtr2).Title)
395+
359396 Next
360397 Next
361398 Next
Show on old repository browser