• R/O
  • SSH
  • HTTPS

autocodeforsql: Commit


Commit MetaInfo

Revision198 (tree)
Time2019-04-08 18:15:49
Authorhilinwei

Log Message

Change Summary

Incremental Difference

--- AutoEpub3/AutoEpub6.vb (revision 197)
+++ AutoEpub3/AutoEpub6.vb (revision 198)
@@ -181,67 +181,67 @@
181181
182182
183183
184- Dim sText As String = String.Empty
185- Dim listLine As New List(Of String)
186- Dim listSkip As New List(Of String)
184+ 'Dim sText As String = String.Empty
185+ 'Dim listLine As New List(Of String)
186+ 'Dim listSkip As New List(Of String)
187187
188188
189189
190- Dim bookPath As String = "C:\Users\DataTrade\Downloads\JD\OEBPS\"
191- Dim ncxFilePath As String = Path.Combine(bookPath, "toc.ncx")
190+ 'Dim bookPath As String = "C:\Users\DataTrade\Downloads\JD\OEBPS\"
191+ 'Dim ncxFilePath As String = Path.Combine(bookPath, "toc.ncx")
192192
193- Dim fs As System.IO.FileStream = New System.IO.FileStream(ncxFilePath, System.IO.FileMode.Open)
194- Dim serializer As System.Xml.Serialization.XmlSerializer = New System.Xml.Serialization.XmlSerializer(GetType(ncx))
195- Dim model As ncx = CType(serializer.Deserialize(fs), ncx)
193+ 'Dim fs As System.IO.FileStream = New System.IO.FileStream(ncxFilePath, System.IO.FileMode.Open)
194+ 'Dim serializer As System.Xml.Serialization.XmlSerializer = New System.Xml.Serialization.XmlSerializer(GetType(ncx))
195+ 'Dim model As ncx = CType(serializer.Deserialize(fs), ncx)
196196
197- Dim mEpub As New List(Of modelChapter)
197+ 'Dim mEpub As New List(Of modelChapter)
198198
199- For iCtr As Integer = 1 To model.navMap.Length - 1
199+ 'For iCtr As Integer = 1 To model.navMap.Length - 1
200200
201- Dim unitOne As ncxNavPoint = model.navMap(iCtr)
201+ ' Dim unitOne As ncxNavPoint = model.navMap(iCtr)
202202
203- Dim uChapter As New modelChapter
204- uChapter.Title = unitOne.navLabel.text
203+ ' Dim uChapter As New modelChapter
204+ ' uChapter.Title = unitOne.navLabel.text
205205
206- Dim src As String = unitOne.content.src.Split("#")(0)
206+ ' Dim src As String = unitOne.content.src.Split("#")(0)
207207
208- Dim sTemp5 As String = cTools.sFileReader(Path.Combine(bookPath, src), cEpub6.encUTF8)
208+ ' Dim sTemp5 As String = cTools.sFileReader(Path.Combine(bookPath, src), cEpub6.encUTF8)
209209
210- sTemp5 = sTemp5.Replace("lk", "normaltext")
211- sTemp5 = sTemp5.Replace("normaltext1", "title2")
210+ ' sTemp5 = sTemp5.Replace("lk", "normaltext")
211+ ' sTemp5 = sTemp5.Replace("normaltext1", "title2")
212212
213213
214214
215215
216- Dim listTemp2 As List(Of String) = cTools.listNav_SE(sTemp5, "<p", "</p>", False)
216+ ' Dim listTemp2 As List(Of String) = cTools.listNav_SE(sTemp5, "<p", "</p>", False)
217217
218218
219- For Each sAdd As String In listTemp2
219+ ' For Each sAdd As String In listTemp2
220220
221- If sAdd.IndexOf("title1") > -1 Then
222- Continue For
223- End If
221+ ' If sAdd.IndexOf("title1") > -1 Then
222+ ' Continue For
223+ ' End If
224224
225- If sAdd.IndexOf("title2") > -1 Then
226- sAdd = sAdd.Replace(" class=""title2"">", emEpub6.spText_SubTitle)
227- Else
228- sAdd = sAdd.Replace(" class=""normaltext"">", "")
229- End If
225+ ' If sAdd.IndexOf("title2") > -1 Then
226+ ' sAdd = sAdd.Replace(" class=""title2"">", emEpub6.spText_SubTitle)
227+ ' Else
228+ ' sAdd = sAdd.Replace(" class=""normaltext"">", "")
229+ ' End If
230230
231- uChapter.listText.Add(sAdd)
232- Next
231+ ' uChapter.listText.Add(sAdd)
232+ ' Next
233233
234234
235- mEpub.Add(uChapter)
235+ ' mEpub.Add(uChapter)
236236
237237
238- Next
238+ 'Next
239239
240240
241- Dim cEpub As New cEpub6(emEpub6.emEncCode.SHIFT_JIS, emEpub6.emLan.ZH, "S2", "顾艳", "顾艳短篇小说集", "GY_201904")
242- cEpub.bConvertToMobi = True
243- cEpub.CreateEpub(mEpub)
244- MessageBox.Show("Finished")
241+ 'Dim cEpub As New cEpub6(emEpub6.emEncCode.SHIFT_JIS, emEpub6.emLan.ZH, "S2", "顾艳", "顾艳短篇小说集", "GY_201904")
242+ 'cEpub.bConvertToMobi = True
243+ 'cEpub.CreateEpub(mEpub)
244+ 'MessageBox.Show("Finished")
245245
246246
247247
@@ -250,81 +250,81 @@
250250
251251
252252
253- 'Dim sText As String = String.Empty
254- 'Dim listLine As New List(Of String)
255- 'Dim listSkip As New List(Of String)
253+ Dim sText As String = String.Empty
254+ Dim listLine As New List(Of String)
255+ Dim listSkip As New List(Of String)
256256
257257
258258
259- 'Dim bookPath As String = "C:\Users\DataTrade\Downloads\K1\OEBPS\"
260- 'Dim ncxFilePath As String = Path.Combine(bookPath, "toc.ncx")
259+ Dim bookPath As String = "C:\Users\DataTrade\Downloads\K1\OEBPS\"
260+ Dim ncxFilePath As String = Path.Combine(bookPath, "toc.ncx")
261261
262- 'Dim fs As System.IO.FileStream = New System.IO.FileStream(ncxFilePath, System.IO.FileMode.Open)
263- 'Dim serializer As System.Xml.Serialization.XmlSerializer = New System.Xml.Serialization.XmlSerializer(GetType(ncx))
264- 'Dim model As ncx = CType(serializer.Deserialize(fs), ncx)
262+ Dim fs As System.IO.FileStream = New System.IO.FileStream(ncxFilePath, System.IO.FileMode.Open)
263+ Dim serializer As System.Xml.Serialization.XmlSerializer = New System.Xml.Serialization.XmlSerializer(GetType(ncx))
264+ Dim model As ncx = CType(serializer.Deserialize(fs), ncx)
265265
266- 'Dim mEpub As New List(Of modelVolume)
266+ Dim mEpub As New List(Of modelVolume)
267267
268- 'For iCtr As Integer = 2 To model.navMap.Length - 1
268+ For iCtr As Integer = 2 To model.navMap.Length - 1
269269
270- ' Dim unitOne As ncxNavPoint = model.navMap(iCtr)
270+ Dim unitOne As ncxNavPoint = model.navMap(iCtr)
271271
272- ' For Each eachNax As ncxNavPointNavPoint In unitOne.navPoint
272+ For Each eachNax As ncxNavPointNavPoint In unitOne.navPoint
273273
274- ' Dim unitVolume As New modelVolume
275- ' unitVolume.Title = eachNax.navLabel.text
274+ Dim unitVolume As New modelVolume
275+ unitVolume.Title = eachNax.navLabel.text
276276
277277
278- ' For Each eachNaxSetp2 As ncxNavPointNavPointNavPoint In eachNax.navPoint
279- ' Dim mChapter As New modelChapter
278+ For Each eachNaxSetp2 As ncxNavPointNavPointNavPoint In eachNax.navPoint
279+ Dim mChapter As New modelChapter
280280
281- ' mChapter.Title = eachNaxSetp2.navLabel.text
281+ mChapter.Title = eachNaxSetp2.navLabel.text
282282
283- ' Dim src As String = eachNaxSetp2.content.src.Split("#")(0)
283+ Dim src As String = eachNaxSetp2.content.src.Split("#")(0)
284284
285- ' Dim sTemp5 As String = cTools.sFileReader(Path.Combine(bookPath, src), cEpub6.encUTF8)
285+ Dim sTemp5 As String = cTools.sFileReader(Path.Combine(bookPath, src), cEpub6.encUTF8)
286286
287- ' Dim listTemp As List(Of String) = cTools.listNav_SE(sTemp5, "<p", "</p>", False)
287+ Dim listTemp As List(Of String) = cTools.listNav_SE(sTemp5, "<p", "</p>", False)
288288
289- ' Dim listKK As New List(Of String)
289+ Dim listKK As New List(Of String)
290290
291- ' For Each edit As String In listTemp
291+ For Each edit As String In listTemp
292292
293- ' If edit.IndexOf("quote") > -1 Then
294- ' listKK.Add(edit.Replace(" class=""quote"">", emEpub6.spText_EmDash))
293+ If edit.IndexOf("quote") > -1 Then
294+ listKK.Add(edit.Replace(" class=""quote"">", emEpub6.spText_EmDash))
295295
296- ' Else
297- ' listKK.Add(edit.Replace(">", ""))
298- ' End If
296+ Else
297+ listKK.Add(edit.Replace(">", ""))
298+ End If
299299
300300
301- ' Next
301+ Next
302302
303303
304304
305305
306- ' mChapter.listText = listKK
306+ mChapter.listText = listKK
307307
308- ' unitVolume.listChapter.Add(mChapter)
308+ unitVolume.listChapter.Add(mChapter)
309309
310- ' Next
310+ Next
311311
312312
313- ' mEpub.Add(unitVolume)
313+ mEpub.Add(unitVolume)
314314
315315
316316
317- ' Next
317+ Next
318318
319319
320320
321- 'Next
321+ Next
322322
323323
324- 'Dim cEpub As New cEpub6(emEpub6.emEncCode.SHIFT_JIS, emEpub6.emLan.ZH, "有匪", "牧牧", "YF_201904")
325- 'cEpub.bConvertToMobi = True
326- 'cEpub.CreateEpub(mEpub)
327- 'MessageBox.Show("Finished")
324+ Dim cEpub As New cEpub6(emEpub6.emEncCode.SHIFT_JIS, emEpub6.emLan.ZH, "有匪", "牧牧", "YF_201904")
325+ cEpub.bConvertToMobi = True
326+ cEpub.CreateEpub(mEpub)
327+ MessageBox.Show("Finished")
328328
329329 End Sub
330330
Show on old repository browser