• R/O
  • SSH
  • HTTPS

autocodeforsql: Commit


Commit MetaInfo

Revisão321 (tree)
Hora2020-02-14 14:59:15
Autorhilinwei

Mensagem de Log

Mudança Sumário

Diff

--- AutoEpub3/AutoEpub6.vb (revision 320)
+++ AutoEpub3/AutoEpub6.vb (revision 321)
@@ -1,4 +1,5 @@
11 Imports System.IO
2+Imports System.Net
23 Imports System.Text
34 Imports System.Text.RegularExpressions
45 Imports System.Threading
@@ -10,7 +11,7 @@
1011 Private Sub btnNCXDep1_Click(sender As Object, e As EventArgs) Handles btnNCXDep1.Click
1112
1213 Dim listSkip As New List(Of String)
13- Dim bookPath As String = "C:\Users\vmware\Downloads\121432\"
14+ Dim bookPath As String = "C:\Users\DataTrade\Downloads\KKc\"
1415 Dim ncxFilePath As String = bookPath & "toc.ncx"
1516
1617 Dim fs As System.IO.FileStream = New System.IO.FileStream(ncxFilePath, System.IO.FileMode.Open)
@@ -19,81 +20,10 @@
1920 fs.Dispose()
2021 fs = Nothing
2122
23+ Dim listRemove As New List(Of String)
2224
2325
2426
25- Dim listRemove As New List(Of String)
26- listRemove.Add("坑双肝血。")
27- listRemove.Add("坑有双技。")
28- listRemove.Add("坑乐每号。")
29- listRemove.Add("阵圣狂技。")
30- listRemove.Add("坑岁池圾。")
31- listRemove.Add("阵广叼血。")
32- listRemove.Add("阵肝布巴。")
33- listRemove.Add("阵引丽技。")
34- listRemove.Add("阵纵节技。")
35- listRemove.Add("阵尽双圾。")
36- listRemove.Add("阵庄来划。")
37- listRemove.Add("阵土有巴。")
38- listRemove.Add("阵役岁划。")
39- listRemove.Add("阵记扔圾。")
40- listRemove.Add("阵爪边技。")
41- listRemove.Add("岛向爪扛。")
42- listRemove.Add("岛长记才。")
43- listRemove.Add("岛广上扛。")
44- listRemove.Add("岛东乐技。")
45- listRemove.Add("岛叨爪弟。")
46- listRemove.Add("岛巨庄划。")
47- listRemove.Add("岛估岛血。")
48- listRemove.Add("岛布亩技。")
49- listRemove.Add("岛役在扛。")
50- listRemove.Add("岛沟华号。")
51- listRemove.Add("呆大私弟。")
52- listRemove.Add("呆场丰圾。")
53- listRemove.Add("呆住肠才。")
54- listRemove.Add("阵记肝技。")
55- listRemove.Add("阵围反血。")
56- listRemove.Add("呆夹司弟。")
57- listRemove.Add("呆扔记号。")
58- listRemove.Add("呆叼有圾。")
59- listRemove.Add("呆妖吐技。")
60- listRemove.Add("将门虚掩。")
61- listRemove.Add("呆沟名划。")
62- listRemove.Add("呆肠页号。")
63- listRemove.Add("呆狂休扛。")
64- listRemove.Add("贞页讨亡。")
65- listRemove.Add("贞杂帅亡。")
66- listRemove.Add("贞岛以亡。")
67- listRemove.Add("贞贞匠圾。")
68- listRemove.Add("贞贞丽号。")
69- listRemove.Add("贞纵医技。")
70- listRemove.Add("贞系华划。")
71- listRemove.Add("贞以丽技。")
72- listRemove.Add("贞爪协弟。")
73- listRemove.Add("贞欢肠圾。")
74- listRemove.Add("贞在刚划。")
75- listRemove.Add("贞史见技。")
76- listRemove.Add("纵私序圾。")
77- listRemove.Add("纵助宏血。")
78- listRemove.Add("纵夹在圾。")
79- listRemove.Add("纵木央巴。")
80- listRemove.Add("纵沟阵号。")
81- listRemove.Add("坑华女技。")
82- listRemove.Add("坑刚扑扛。")
83- listRemove.Add("坑丰圣扛。")
84- listRemove.Add("坑丸在才。")
85- listRemove.Add("阵在页弟。")
86- listRemove.Add("岛台丸血。")
87- listRemove.Add("呆妖节血。")
88- listRemove.Add("贞介节血。")
89- listRemove.Add("贞以华才。")
90- listRemove.Add("贞亩助技。")
91- listRemove.Add("纵引余划。")
92- listRemove.Add("纵尽巨号。")
93- listRemove.Add("纵木找才。")
94- listRemove.Add("纵他团血。")
95-
96-
9727 Dim listPickString As New List(Of String)
9828
9929
@@ -1030,7 +960,7 @@
1030960 For Each eachValue As cValues In listValue
1031961
1032962
1033- Console .WriteLine (eachValue .sValue5 )
963+ Console.WriteLine(eachValue.sValue5)
1034964 Dim urlBook As New Uri("https://www.aozora.gr.jp/cards/001475" & eachValue.sValue3)
1035965 WebBrowser1.Url = urlBook
1036966 System.Threading.Thread.Sleep(1000)
@@ -1182,7 +1112,11 @@
11821112 eachLine = eachLine.Replace(eachDel, "")
11831113 Next
11841114
1115+ If eachLine.IndexOf("三日後") > -1 Then
1116+ Dim ke = "1"
1117+ End If
11851118
1119+
11861120 Dim dHtmlRuby As String = cAutoRuby.sSetRuby(eachLine)
11871121
11881122
@@ -1271,32 +1205,79 @@
12711205
12721206 End Sub
12731207
1208+
1209+
12741210 Private Sub Button7_Click(sender As Object, e As EventArgs) Handles Button7.Click
12751211
1276- Dim kke As String = cAutoRuby.sSetRuby("名もなき毒")
12771212
12781213
1279- Dim sDTL As String = cTools.sFileReader("D:\Soft\Ruby\Temp.txt", cEpub6.encShift_JIS)
1214+ 'Dim sTemp As String = "全ての人々と均質な"
12801215
1281- Dim listLine As List(Of String) = sDTL.Split({vbCrLf}, StringSplitOptions.None).ToList()
1216+ 'Dim sRet As String = cAutoRuby.sSetRuby(sTemp)
12821217
1283- Dim listNewLine As New List(Of String)
1284- For Each uLine As String In listLine
1218+ 'Dim sRetChk As String = sRet
12851219
1220+ 'Dim sHtml As String = cTools.sHtmlSample(sRet)
12861221
1287- Dim sRuby As String = cAutoRuby.sSetRuby(uLine)
1288- listNewLine.Add(sRuby)
1222+ 'System.IO.File.WriteAllText("D:\Soft\TEMP\HtmlSample.html", sHtml, cEpub6.encUTF8)
12891223
1290- Next
1224+ 'System.Diagnostics.Process.Start("D:\Soft\TEMP\")
12911225
1292- Dim sOutPut As String = String.Join("</br></br>", listNewLine)
12931226
12941227
1295- System.IO.File.WriteAllText("D:\Soft\Ruby\Temp1.txt", sOutPut)
12961228
1229+ 'Dim kke As String = "名もなき毒"
12971230
1231+ 'Dim utf8 = System.Text.Encoding.UTF8
12981232
1233+ ''Shift-JISでURLエンコードする
1234+ 'Dim enc As System.Text.Encoding = System.Text.Encoding.GetEncoding("shift_jis")
1235+ 'Dim urlEncSjis As String = System.Web.HttpUtility.UrlEncode(kke, utf8)
12991236
1237+
1238+ 'Dim ke As Integer = urlEncSjis.Length
1239+
1240+
1241+ 'Dim sGoogleURl As String = "http://www.google.com/transliterate?langpair=ja-Kanji|ja&text=" & urlEncSjis
1242+
1243+ 'Dim json = New WebClient().DownloadString(sGoogleURl)
1244+
1245+ 'Dim kk1 As String = cTools.sHtmlFromUrl(sGoogleURl)
1246+
1247+
1248+ 'Dim webRequest As HttpWebRequest = CType(webRequest.Create(sGoogleURl), HttpWebRequest)
1249+ 'webRequest.Method = "GET"
1250+ 'Dim webResponse As HttpWebResponse = CType(webRequest.GetResponse(), HttpWebResponse)
1251+ 'Dim sr As StreamReader = New StreamReader(webResponse.GetResponseStream(), utf8)
1252+ 'Dim kk As String = sr.ReadToEnd()
1253+
1254+
1255+
1256+
1257+
1258+
1259+
1260+ 'Dim sDTL As String = cTools.sFileReader("D:\Soft\Ruby\Temp.txt", cEpub6.encShift_JIS)
1261+
1262+ 'Dim listLine As List(Of String) = sDTL.Split({vbCrLf}, StringSplitOptions.None).ToList()
1263+
1264+ 'Dim listNewLine As New List(Of String)
1265+ 'For Each uLine As String In listLine
1266+
1267+
1268+ ' Dim sRuby As String = cAutoRuby.sSetRuby(uLine)
1269+ ' listNewLine.Add(sRuby)
1270+
1271+ 'Next
1272+
1273+ 'Dim sOutPut As String = String.Join("</br></br>", listNewLine)
1274+
1275+
1276+ 'System.IO.File.WriteAllText("D:\Soft\Ruby\Temp1.txt", sOutPut)
1277+
1278+
1279+
1280+
13001281 'Dim ke As String = cAutoRuby.sSetRuby("が流れると")
13011282
13021283 'Dim sHtml As String = cTools.sHtmlSample(ke)
--- AutoEpub3/AutoEpub7.vb (revision 320)
+++ AutoEpub3/AutoEpub7.vb (revision 321)
@@ -165,9 +165,10 @@
165165
166166
167167
168+
168169 Try
169170
170- Dim ncxFilePath As String = "C:\Users\DataTrade\Downloads\cd\toc.ncx"
171+ Dim ncxFilePath As String = "C:\Users\DataTrade\Downloads\KKc\toc.ncx"
171172
172173 Dim fs As System.IO.FileStream = New System.IO.FileStream(ncxFilePath, System.IO.FileMode.Open)
173174 Dim serializer As System.Xml.Serialization.XmlSerializer = New System.Xml.Serialization.XmlSerializer(GetType(ncx))
@@ -175,7 +176,7 @@
175176 Dim mEpub As New List(Of modelChapter)
176177
177178
178- For ctrChapter As Integer = 3 To fileNCX.navMap.Count - 1
179+ For ctrChapter As Integer = 2 To fileNCX.navMap.Count - 1
179180
180181 Dim fileChapter As ncxNavPoint = fileNCX.navMap(ctrChapter)
181182
@@ -183,7 +184,7 @@
183184 mChapter.Title = fileChapter.navLabel.text
184185 mChapter.Scr = fileChapter.content.src
185186 mChapter.Scr = mChapter.Scr.Split("#")(0)
186- Dim sChapter As String = cTools.sFileReader("C:\Users\DataTrade\Downloads\cd\" & mChapter.Scr, cEpub6.encUTF8)
187+ Dim sChapter As String = cTools.sFileReader("C:\Users\DataTrade\Downloads\KKc\" & mChapter.Scr, cEpub6.encUTF8)
187188 Dim listText As List(Of String) = cTools.listText_P(sChapter)
188189 listText.RemoveAt(0)
189190
@@ -193,7 +194,7 @@
193194 Next
194195
195196
196- Dim cEpub As New cEpub6(emEpub6.emEncCode.GB2321, emEpub6.emLan.ZH, "人民的名义", "周梅森", "RMDMY_201911")
197+ Dim cEpub As New cEpub6(emEpub6.emEncCode.GB2321, emEpub6.emLan.ZH, "蝲蛄吟唱的地方", "【美】迪莉娅·欧文斯", "LGYCDDF_202002")
197198 cEpub.bConvertToMobi = True
198199 cEpub.CreateEpub(mEpub)
199200 MessageBox.Show("Finished")
@@ -699,7 +700,7 @@
699700
700701 Try
701702
702- Dim ncxFilePath As String = "C:\Users\DataTrade\Downloads\cd\toc.ncx"
703+ Dim ncxFilePath As String = "C:\Users\DataTrade\Downloads\KKc\toc.ncx"
703704
704705 Dim fs As System.IO.FileStream = New System.IO.FileStream(ncxFilePath, System.IO.FileMode.Open)
705706 Dim serializer As System.Xml.Serialization.XmlSerializer = New System.Xml.Serialization.XmlSerializer(GetType(ncx))
@@ -711,6 +712,11 @@
711712
712713 For ctrVolume As Integer = 2 To fileNCX.navMap.Count - 1
713714
715+ If ctrVolume = fileNCX.navMap.Count - 1 Then
716+ Dim kke = "1"
717+ End If
718+
719+
714720 Dim fileVoluem As ncxNavPoint = fileNCX.navMap(ctrVolume)
715721
716722
@@ -717,30 +723,59 @@
717723 Dim mVolume As New modelVolume
718724 mVolume.Title = fileVoluem.navLabel.text
719725
726+ If fileVoluem.navPoint Is Nothing Then
720727
728+ Dim sChapter As String = cTools.sFileReader("C:\Users\DataTrade\Downloads\KKc\" & fileVoluem.content.src, cEpub6.encUTF8)
729+ Dim listText As List(Of String) = cTools.listText_P(sChapter)
730+ mVolume.listText = listText
721731
722732
723- For ctrChapter As Integer = 0 To fileVoluem.navPoint.Length - 1
733+ Else
734+ For ctrChapter As Integer = 0 To fileVoluem.navPoint.Length - 1
724735
725- Dim fileChapter As ncxNavPointNavPoint = fileVoluem.navPoint(ctrChapter)
736+ Dim fileChapter As ncxNavPointNavPoint = fileVoluem.navPoint(ctrChapter)
726737
727- Dim mChapter As New modelChapter
728- mChapter.Title = fileChapter.navLabel.text
729- mChapter.Scr = fileChapter.content.src
730- mChapter.Scr = mChapter.Scr.Split("#")(0)
738+ Dim mChapter As New modelChapter
739+ mChapter.Title = fileChapter.navLabel.text
740+ mChapter.Scr = fileChapter.content.src
741+ mChapter.Scr = mChapter.Scr.Split("#")(0)
731742
732- Dim sChapter As String = cTools.sFileReader("C:\Users\DataTrade\Downloads\cd\" & mChapter.Scr, cEpub6.encUTF8)
733- Dim listText As List(Of String) = cTools.listText_P(sChapter)
734- mChapter.listText = listText
735- mVolume.listChapter.Add(mChapter)
743+ Dim sChapter As String = cTools.sFileReader("C:\Users\DataTrade\Downloads\KKc\" & mChapter.Scr, cEpub6.encUTF8)
744+ Dim listText As List(Of String) = cTools.listText_P(sChapter)
736745
737- Next
738746
747+ If listText.Count = 1 Then
748+
749+ Dim iKey As Integer = CInt(cTools.listNav_SE(mChapter.Scr, "part", ".html", False)(0)) + 1
750+
751+ Dim sKey As String = "text/part" & iKey.ToString().PadLeft(4, "0") & ".html"
752+
753+ mChapter.Scr = sKey
754+
755+ sChapter = cTools.sFileReader("C:\Users\DataTrade\Downloads\KKc\" & mChapter.Scr, cEpub6.encUTF8)
756+ listText = cTools.listText_P(sChapter)
757+
758+
759+
760+ End If
761+
762+
763+
764+
765+ mChapter.listText = listText
766+ mVolume.listChapter.Add(mChapter)
767+
768+ Next
769+
770+
771+ End If
772+
773+
739774 mEpub.Add(mVolume)
740775
741776 Next
742777
743- Dim cEpub As New cEpub6(emEpub6.emEncCode.GB2321, emEpub6.emLan.ZH, "夜谭随录", "清•和邦额", "YTSL_202001")
778+ Dim cEpub As New cEpub6(emEpub6.emEncCode.GB2321, emEpub6.emLan.ZH, "蝲蛄吟唱的地方", "【美】迪莉娅·欧文斯", "LGYCDDF_202002")
744779 cEpub.bConvertToMobi = True
745780 cEpub.CreateEpub(mEpub)
746781 MessageBox.Show("Finished")
--- AutoEpub3/My Project/Application.Designer.vb (revision 320)
+++ AutoEpub3/My Project/Application.Designer.vb (revision 321)
@@ -32,7 +32,7 @@
3232
3333 <Global.System.Diagnostics.DebuggerStepThroughAttribute()> _
3434 Protected Overrides Sub OnCreateMainForm()
35- Me.MainForm = Global.AutoEpub3.StudyCode
35+ Me.MainForm = Global.AutoEpub3.AutoEpub7
3636 End Sub
3737 End Class
3838 End Namespace
Show on old repository browser