• R/O
  • SSH
  • HTTPS

autocodeforsql: Commit


Commit MetaInfo

Revision432 (tree)
Zeit2022-05-23 14:20:08
Autorhilinwei

Log Message

Ändern Zusammenfassung

Diff

--- AutoEpub3/Logic/DEP2/cDep2_011.vb (revision 431)
+++ AutoEpub3/Logic/DEP2/cDep2_011.vb (revision 432)
@@ -19,9 +19,11 @@
1919
2020 Public Sub CreadEpub()
2121
22- mEpub.Add(volumeSP121())
22+ mEpub.Add(addVolumeQWJZ)
2323
2424
25+
26+
2527 Dim sText As String = String.Empty
2628 Dim listLine As New List(Of String)
2729
@@ -110,6 +112,7 @@
110112
111113 Next
112114
115+
113116 End Sub
114117
115118 Private Function sFileEditRead(ByVal sPath As String) As String
@@ -227,133 +230,44 @@
227230
228231 End Sub
229232
230- Private Function volumeSP121() As modelVolume
233+ Private Function addVolumeQWJZ() As modelVolume
231234
232235
233236
234237 'Dim iPage As Integer = 1
235238
236- volumeSP121 = New modelVolume
237- volumeSP121.Title = "前往金泽"
238- volumeSP121.listChapter.AddRange(listChapted21r("C:\Users\DTC_PC07\Downloads\DTZS\text\part0005.html"))
239+ Dim addVolume As New modelVolume
240+ addVolume.Title = "前往金泽"
241+ addVolume.listChapter.AddRange(listAddChapted("C:\Users\DTC_PC07\Downloads\DTZS\text\part0005.html"))
242+ addVolume.listChapter.AddRange(listAddChapted("C:\Users\DTC_PC07\Downloads\DTZS\text\part0009.html"))
243+ addVolume.listChapter.AddRange(listAddChapted("C:\Users\DTC_PC07\Downloads\DTZS\text\part0010.html"))
239244
240- 'Dim sPath As String = "C:\Users\DTC_PC07\Downloads\DTZS\text\part0005.html"
241- 'Dim sHtml As String = sFileEditRead(sPath)
242- 'Dim listTemp As List(Of String) = sHtml.Split({"bodycontent-center"}, StringSplitOptions.None).ToList()
243245
244- 'For iCtr As Integer = 1 To listTemp.Count - 1
245246
246- ' Dim mCharpter As New modelChapter
247- ' mCharpter.Title = iPage.ToString
248- ' Dim listText As List(Of String) = GetListText(listTemp(iCtr))
249- ' mCharpter.listText = listText
250- ' volumeSP1.listChapter.Add(mCharpter)
251- ' iPage += 1
252247
253- 'Next
248+ addVolumeQWJZ = addVolume
254249
255250
256251
257- 'Dim listDel As New List(Of String)
258- 'Dim listAdd As New List(Of String)
259252
260- 'For iCtr As Integer = 0 To volumeSP1.listChapter.Count - 2
261- ' Dim kke As List(Of HtmlNode) = GetListHref(String.Join(vbCrLf, volumeSP1.listChapter(iCtr).listText))
262253
263- ' For Each ekke As HtmlNode In kke
264- ' Dim pickUp = From dtSeq In volumeSP1.listChapter(volumeSP1.listChapter.Count - 1).listText.Where(Function(x) x.IndexOf(ekke.Id) > -1)
265- ' For Each sERE As String In pickUp
266- ' volumeSP1.listChapter(iCtr).listText.Add(sERE)
267- ' listDel.Add(sERE)
268- ' Next
269- ' Next
270-
271- 'Next
272-
273-
274- 'For Each editChapet As modelChapter In volumeSP1.listChapter
275-
276- ' Dim kke As List(Of HtmlNode) = GetListHref(String.Join(vbCrLf, editChapet.listText))
277-
278- 'Next
279-
280-
281- 'For Each udel As String In listDel
282- ' volumeSP1.listChapter(volumeSP1.listChapter.Count - 1).listText.Remove(udel)
283- 'Next
284-
285-
286-
287-
288-
289-
290-
291-
292- 'sPath = "C:\Users\DTC_PC07\Downloads\DTZS\text\part0009.html"
293- 'sHtml = sFileEditRead(sPath)
294- 'listTemp = sHtml.Split({"bodycontent-center"}, StringSplitOptions.None).ToList()
295-
296- 'For iCtr As Integer = 1 To listTemp.Count - 1
297-
298- ' Dim mCharpter As New modelChapter
299- ' mCharpter.Title = iPage.ToString
300-
301-
302- ' Dim listText As List(Of String) = GetListText(listTemp(iCtr))
303-
304-
305- ' mCharpter.listText = listText
306-
307- ' volumeSP1.listChapter.Add(mCharpter)
308-
309- ' iPage += 1
310- 'Next
311-
312- 'sPath = "C:\Users\DTC_PC07\Downloads\DTZS\text\part0010.html"
313- 'sHtml = sFileEditRead(sPath)
314- 'listTemp = sHtml.Split({"bodycontent-center"}, StringSplitOptions.None).ToList()
315-
316- 'For iCtr As Integer = 0 To listTemp.Count - 1
317-
318- ' Dim mCharpter As New modelChapter
319- ' mCharpter.Title = "尾声"
320-
321-
322- ' Dim listText As List(Of String) = GetListText(listTemp(iCtr))
323-
324-
325- ' mCharpter.listText = listText
326-
327- ' volumeSP1.listChapter.Add(mCharpter)
328-
329- ' iPage += 1
330- 'Next
331-
332-
333-
334-
335-
336-
337-
338-
339-
340-
341-
342254 End Function
343255
344256
345257
346- Private Function listChapted21r(ByVal sPath As String) As List(Of modelChapter)
258+ Private Function listAddChapted(ByVal sPath As String) As List(Of modelChapter)
347259
348260 Dim listChapter As New List(Of modelChapter)
349261
350262 Dim sHtml As String = sFileEditRead(sPath)
351- Dim listTemp As List(Of String) = sHtml.Split({"bodycontent-center"}, StringSplitOptions.None).ToList()
263+ Dim listTemp As List(Of String) = sHtml.Split({"<p class=""bodycontent-center"">"}, StringSplitOptions.None).ToList()
352264
353265 For iCtr As Integer = 1 To listTemp.Count - 1
266+
267+ Dim listText As List(Of String) = GetListText("<p>" & listTemp(iCtr))
268+
354269 Dim mChapter As New modelChapter
355- mChapter.Title = listTemp(0).Replace(""">", "").Replace("</p>", "")
356- Dim listText As List(Of String) = GetListText(listTemp(iCtr))
270+ mChapter.Title = listText(0)
357271 mChapter.listText = listText
358272 listChapter.Add(mChapter)
359273
@@ -361,9 +275,8 @@
361275
362276 Dim listDelete As New List(Of String)
363277
364-
365278 For iCtr As Integer = 0 To listChapter.Count - 2
366- Dim listNodeHref As List(Of HtmlNode) = GetListHref(sHtml)
279+ Dim listNodeHref As List(Of HtmlNode) = GetListHref(String.Join(vbCr, listChapter(iCtr).listText))
367280
368281 For Each uHref As HtmlNode In listNodeHref
369282 Dim linqHref = From dtSeq In listChapter(0).listText.Where(Function(x) x.IndexOf("href") > -1)
@@ -387,9 +300,10 @@
387300 listChapter(listChapter.Count - 1).listText.Remove(uDelete)
388301 Next
389302
390- listChapted21r = listChapter
303+ listAddChapted = listChapter
391304
392305 End Function
393306
394307
308+
395309 End Class
Show on old repository browser