• R/O
  • SSH
  • HTTPS

autocodeforsql: Commit


Commit MetaInfo

Révision399 (tree)
l'heure2020-11-05 11:28:42
Auteurhilinwei

Message de Log

Change Summary

Modification

--- AutoEpub3/AutoEpub8.Designer.vb (revision 398)
+++ AutoEpub3/AutoEpub8.Designer.vb (revision 399)
@@ -27,6 +27,7 @@
2727 Me.Button2 = New System.Windows.Forms.Button()
2828 Me.Button3 = New System.Windows.Forms.Button()
2929 Me.Button4 = New System.Windows.Forms.Button()
30+ Me.Button6 = New System.Windows.Forms.Button()
3031 Me.SuspendLayout()
3132 '
3233 'Button5
@@ -74,11 +75,21 @@
7475 Me.Button4.Text = "NCX Dep 2"
7576 Me.Button4.UseVisualStyleBackColor = True
7677 '
78+ 'Button6
79+ '
80+ Me.Button6.Location = New System.Drawing.Point(378, 350)
81+ Me.Button6.Name = "Button6"
82+ Me.Button6.Size = New System.Drawing.Size(173, 69)
83+ Me.Button6.TabIndex = 21
84+ Me.Button6.Text = "El His Mon"
85+ Me.Button6.UseVisualStyleBackColor = True
86+ '
7787 'AutoEpub8
7888 '
7989 Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 12.0!)
8090 Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
8191 Me.ClientSize = New System.Drawing.Size(800, 450)
92+ Me.Controls.Add(Me.Button6)
8293 Me.Controls.Add(Me.Button4)
8394 Me.Controls.Add(Me.Button3)
8495 Me.Controls.Add(Me.Button2)
@@ -95,4 +106,5 @@
95106 Friend WithEvents Button2 As Button
96107 Friend WithEvents Button3 As Button
97108 Friend WithEvents Button4 As Button
109+ Friend WithEvents Button6 As Button
98110 End Class
--- AutoEpub3/AutoEpub8.vb (revision 398)
+++ AutoEpub3/AutoEpub8.vb (revision 399)
@@ -192,6 +192,30 @@
192192
193193 End Sub
194194
195+ Private Sub Button6_Click(sender As Object, e As EventArgs) Handles Button6.Click
195196
197+
198+ Dim sChapter As String = cTools.sFileReader("C:/Users/DTC_PC07/Downloads/Jhis/OEBPS/text00012.html", cEpub6.encUTF8)
199+
200+ Dim apHtml As HtmlAgilityPack.HtmlDocument = New HtmlAgilityPack.HtmlDocument()
201+ apHtml.LoadHtml(sChapter)
202+
203+ Dim listHdr = apHtml.DocumentNode.Descendants.Where(Function(x) x.Name = "img")
204+
205+ For Each ukke As HtmlAgilityPack.HtmlNode In listHdr
206+
207+
208+ Dim kke = ukke.OuterHtml
209+ Dim kk21 = ukke.InnerHtml
210+
211+
212+
213+ Next
214+
215+
216+
217+
218+
219+ End Sub
196220 End Class
197221
--- AutoEpub3/Logic/DEP3/cDep3_006.vb (revision 398)
+++ AutoEpub3/Logic/DEP3/cDep3_006.vb (revision 399)
@@ -56,7 +56,7 @@
5656 mSection.Scr = ncxSection.content.src
5757 Dim sPath As String = Path.Combine(bookPath, mSection.Scr).Split("#").ToList(0)
5858 Dim sTemp As String = sFileEditRead(sPath, emEpub6.emDep.Dep0)
59- Dim listText As List(Of String) = cTools.listText_P(sTemp, listMobiRight)
59+ Dim listText As List(Of String) = GetListText(sTemp)
6060 mSection.listText = listText
6161 mEpub.Add(mSection)
6262 Continue For
@@ -82,7 +82,7 @@
8282 mVolume.Scr = ncxVolume.content.src
8383 Dim sPath As String = Path.Combine(bookPath, mVolume.Scr).Split("#").ToList(0)
8484 Dim sTemp As String = sFileEditRead(sPath, emEpub6.emDep.Dep0)
85- Dim listText As List(Of String) = cTools.listText_P(sTemp, listMobiRight)
85+ Dim listText As List(Of String) = GetListText(sTemp)
8686 mVolume.listText = listText
8787 mSection.listVolume.Add(mVolume)
8888 Continue For
@@ -106,7 +106,7 @@
106106 Dim sPath As String = Path.Combine(bookPath, mChapter.Scr).Split("#").ToList(0)
107107
108108 Dim sChapter As String = sFileEditRead(sPath, emEpub6.emDep.Dep3)
109- Dim listText As List(Of String) = cTools.listText_P(sChapter, listMobiRight)
109+ Dim listText As List(Of String) = GetListText(sChapter)
110110
111111 mChapter.listText = listText
112112
@@ -394,6 +394,24 @@
394394 End Sub
395395
396396
397+ Private Function GetListText(ByVal sHtml) As List(Of String)
397398
399+ GetListText = New List(Of String)
400+ Dim apHtml As HtmlAgilityPack.HtmlDocument = New HtmlAgilityPack.HtmlDocument()
401+ apHtml.LoadHtml(sHtml)
402+ Dim listHtmlNode = apHtml.DocumentNode.Descendants.Where(Function(x) x.Name = "p" OrElse x.Name = "h3" OrElse x.Name = "img")
403+ For Each uHtmlNode As HtmlAgilityPack.HtmlNode In listHtmlNode
404+ Dim sTarget As String = uHtmlNode.InnerHtml
405+ If listMobiRight.Any(Function(x) sTarget.Contains(x)) Then
406+ sTarget = sTarget + emEpub6.spDl_Right
407+ End If
408+ GetListText.Add(sTarget)
398409
410+ Next
411+
412+ End Function
413+
414+
415+
416+
399417 End Class
Afficher sur ancien navigateur de dépôt.