• R/O
  • SSH
  • HTTPS

autocodeforsql: Commit


Commit MetaInfo

Revisão356 (tree)
Hora2020-03-19 12:38:01
Autorhilinwei

Mensagem de Log

Mudança Sumário

Diff

--- AutoEpub3/AutoEpub7.vb (revision 355)
+++ AutoEpub3/AutoEpub7.vb (revision 356)
@@ -302,9 +302,7 @@
302302
303303 Dim listImg As List(Of String) = cTools.listNav_SE(sChapter, "<img", "/>", True)
304304 For Each uImg As String In listImg
305-
306305 Dim sImgUrl As String = cTools.listNav_SE(uImg, "src=""", """/>", False)(0)
307-
308306 If uImg.IndexOf("alone") > -1 Then
309307 Dim sImgKey As String = cTools.sMapImg(sImgUrl, emEpub6.emUrlImgDep.Chapter)
310308 sChapter = sChapter.Replace(uImg, sImgKey)
@@ -312,8 +310,6 @@
312310 Dim sImgKey As String = cTools.sGaiji(sImgUrl, emEpub6.emUrlImgDep.Chapter)
313311 sChapter = sChapter.Replace(uImg, sImgKey)
314312 End If
315-
316-
317313 Next
318314
319315
@@ -713,7 +709,7 @@
713709
714710 Try
715711
716- Dim ncxFilePath As String = "C:\Users\DataTrade\Downloads\XSS\OEBPS\"
712+ Dim ncxFilePath As String = "C:\Users\DataTrade\Downloads\QT\"
717713
718714 Dim fs As System.IO.FileStream = New System.IO.FileStream(ncxFilePath & "toc.ncx", System.IO.FileMode.Open)
719715 Dim serializer As System.Xml.Serialization.XmlSerializer = New System.Xml.Serialization.XmlSerializer(GetType(ncx))
@@ -748,6 +744,10 @@
748744 mChapter.Scr = fileChapter.content.src
749745 mChapter.Scr = mChapter.Scr.Split("#")(0)
750746
747+ Dim sKey As Integer = cTools.listNav_SE(mChapter.Scr, "part", ".html", False)(0) + 1
748+
749+ mChapter.Scr = "text/part" & sKey.ToString().PadLeft(4, "0") & ".html"
750+
751751 Dim sChapter As String = cTools.sFileReader(ncxFilePath & mChapter.Scr, cEpub6.encUTF8)
752752
753753 Dim listText As List(Of String) = cTools.listText_P(sChapter)
@@ -757,7 +757,6 @@
757757 Next
758758
759759
760-
761760 End If
762761
763762
@@ -767,110 +766,12 @@
767766 Next
768767
769768
770-
771-
772- 'Dim mEpubNew As New List(Of modelVolume)
773-
774- 'Dim addNew As New modelVolume
775-
776- 'addNew.Title = "新宋壹・十字"
777-
778-
779- 'For iCtrNew As Integer = 0 To 2
780- ' Dim uVolumn As modelVolume = mEpub(iCtrNew)
781- ' For Each uChapter As modelChapter In uVolumn.listChapter
782- ' addNew.listChapter.Add(uChapter)
783- ' Next
784- 'Next
785-
786- 'mEpubNew.Add(addNew)
787-
788-
789- 'addNew = New modelVolume
790- 'addNew.Title = "新宋贰・权柄"
791-
792- 'For iCtrNew As Integer = 3 To 7
793- ' Dim uVolumn As modelVolume = mEpub(iCtrNew)
794- ' For Each uChapter As modelChapter In uVolumn.listChapter
795- ' addNew.listChapter.Add(uChapter)
796- ' Next
797- 'Next
798- 'mEpubNew.Add(addNew)
799-
800-
801- 'addNew = New modelVolume
802- 'addNew.Title = "新宋叁・燕云"
803-
804- 'For iCtrNew As Integer = 8 To 14
805- ' Dim uVolumn As modelVolume = mEpub(iCtrNew)
806- ' For Each uChapter As modelChapter In uVolumn.listChapter
807- ' addNew.listChapter.Add(uChapter)
808- ' Next
809- 'Next
810- 'mEpubNew.Add(addNew)
811-
812-
813-
814- 'For Each editU As modelVolume In mEpubNew
815-
816- ' For iCtrC As Integer = 0 To editU.listChapter.Count - 1
817-
818-
819- ' Dim sChapter As String = String.Empty
820-
821- ' If iCtrC <> editU.listChapter.Count - 1 Then
822-
823- ' Dim iFrom As Integer = cTools.listNav_SE(editU.listChapter(iCtrC).Scr, "part", ".xhtml", False)(0)
824- ' Dim iTo As Integer = cTools.listNav_SE(editU.listChapter(iCtrC + 1).Scr, "part", ".xhtml", False)(0)
825-
826- ' For iCtrL As Integer = iFrom To iTo - 1
827- ' sChapter += cTools.sFileReader(ncxFilePath & "Text/part" & iCtrL.ToString().PadLeft(4, "0") & ".xhtml", cEpub6.encUTF8)
828- ' Next
829- ' Else
830- ' Dim iFrom As Integer = cTools.listNav_SE(editU.listChapter(iCtrC).Scr, "part", ".xhtml", False)(0)
831-
832- ' sChapter += cTools.sFileReader(ncxFilePath & "Text/part" & iFrom.ToString().PadLeft(4, "0") & ".xhtml", cEpub6.encUTF8)
833- ' End If
834-
835- ' sChapter = sChapter.Replace("<span style=""line-height: 1.618; text-indent: 2em;""><br/></span>", "")
836- ' sChapter = sChapter.Replace("<span style=""line-height: 1.618; text-indent: 2em;""></span>", "")
837-
838-
839- ' Dim listRep As List(Of String) = cTools.listNav_SE(sChapter, "href=""", """>", False)
840- ' For Each eachRep As String In listRep
841- ' Dim listSplit As List(Of String) = eachRep.Split("#").ToList()
842- ' If listSplit.Count = 2 Then
843- ' sChapter = sChapter.Replace(eachRep, "#" & listSplit(1))
844- ' End If
845- ' Next
846-
847- ' Dim listText As List(Of String) = cTools.listText_P(sChapter)
848- ' 'listText.RemoveAt(0)
849- ' editU.listChapter(iCtrC).listText = listText
850-
851- ' Next
852-
853-
854- 'Next
855-
856-
857-
858-
859-
860-
861-
862-
863-
864-
865-
866-
867-
868- Dim cEpub As New cEpub6(emEpub6.emEncCode.GB2321, emEpub6.emLan.ZH, "新宋", "阿越", "XS_202003")
869- cEpub.bConvertToMobi = False
769+ Dim cEpub As New cEpub6(emEpub6.emEncCode.GB2321, emEpub6.emLan.ZH, "齐天传", "楚阳冬", "QTZ_202003")
770+ cEpub.bConvertToMobi = True
870771 cEpub.CreateEpub(mEpub)
871772 MessageBox.Show("Finished")
773+ System.Diagnostics.Process.Start(cEpub.sOutPutPathFolder)
872774
873-
874775 Catch ex As Exception
875776
876777 MessageBox.Show(ex.Message)
Show on old repository browser