@@ -137,16 +137,19 @@ | ||
137 | 137 | |
138 | 138 | Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click |
139 | 139 | |
140 | - Dim cAutoEpub As New cDep2_004("C:\Users\DTC_PC07\Downloads\je\") | |
141 | - cAutoEpub.CreadEpub() | |
140 | + initDB_AutoEpub.initDB() | |
142 | 141 | |
143 | - Dim cEpub As New cEpub6(emEpub6.emEncCode.GB2321, emEpub6.emLan.ZH, "全怪谈:扶桑鬼话", "合集", "TXDZ_202009") | |
144 | - cEpub.bConvertToMobi = True | |
145 | - cEpub.CreateEpub(cAutoEpub.mEpub) | |
146 | - MessageBox.Show("Finished") | |
147 | - System.Diagnostics.Process.Start(cEpub.sOutPutPathFolder) | |
148 | 142 | |
143 | + 'Dim cAutoEpub As New cDep2_004("C:\Users\DTC_PC07\Downloads\je\") | |
144 | + 'cAutoEpub.CreadEpub() | |
149 | 145 | |
146 | + 'Dim cEpub As New cEpub6(emEpub6.emEncCode.GB2321, emEpub6.emLan.ZH, "全怪谈:扶桑鬼话", "合集", "TXDZ_202009") | |
147 | + 'cEpub.bConvertToMobi = True | |
148 | + 'cEpub.CreateEpub(cAutoEpub.mEpub) | |
149 | + 'MessageBox.Show("Finished") | |
150 | + 'System.Diagnostics.Process.Start(cEpub.sOutPutPathFolder) | |
151 | + | |
152 | + | |
150 | 153 | End Sub |
151 | 154 | |
152 | 155 |
@@ -1895,6 +1895,8 @@ | ||
1895 | 1895 | |
1896 | 1896 | Private Sub Button14_Click(sender As Object, e As EventArgs) Handles Button14.Click |
1897 | 1897 | |
1898 | + | |
1899 | + | |
1898 | 1900 | Dim sPathTarget As String = "D:\Soft\Epub\20190003_IM\Koziseigo\koziseigoSep02.txt" |
1899 | 1901 | Dim sJsonTarget As String = cTools.sFileReader(sPathTarget) |
1900 | 1902 | Dim mEpubTarget As List(Of modelVolume) = JsonConvert.DeserializeObject(sJsonTarget, GetType(List(Of modelVolume))) |
@@ -0,0 +1,51 @@ | ||
1 | +Imports System.Data.SQLite | |
2 | +Imports System.IO | |
3 | +Imports System.Text | |
4 | + | |
5 | + | |
6 | + | |
7 | +Public Class cSQLIte | |
8 | + | |
9 | + | |
10 | + | |
11 | + | |
12 | +End Class | |
13 | + | |
14 | +Public Class initDB_AutoEpub | |
15 | + | |
16 | + Public Shared sSQLitePath As String = Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory, "SQLite\APP_DB.db") | |
17 | + | |
18 | + | |
19 | + | |
20 | + Public Shared Sub initDB() | |
21 | + Dim connSQL As SQLiteConnection = New SQLiteConnection("data source=" & sSQLitePath) | |
22 | + connSQL.Open() | |
23 | + | |
24 | + | |
25 | + Dim cmd As SQLiteCommand = New SQLiteCommand | |
26 | + cmd.CommandText = sCreat_TRN_EPUB() | |
27 | + | |
28 | + cmd.ExecuteNonQuery() | |
29 | + | |
30 | + | |
31 | + End Sub | |
32 | + | |
33 | + | |
34 | + | |
35 | + | |
36 | + Private Shared Function sCreat_TRN_EPUB() As String | |
37 | + | |
38 | + Dim sbCmd As New StringBuilder | |
39 | + sbCmd.AppendLine(" CREATE TABLE IF NOT EXISTS TRN_EPUB(") | |
40 | + sbCmd.AppendLine(" BOOK_NM TEXT NOT NULL PRIMARY KEY, ") | |
41 | + sbCmd.AppendLine(" BOOK_ER TEXT NULL, ") | |
42 | + sbCmd.AppendLine(" BOOK_JSON TEXT NULL, ") | |
43 | + sbCmd.AppendLine(" CRT_DT TEXT NULL, ") | |
44 | + sbCmd.AppendLine(" UPD_DT TEXT NULL ") | |
45 | + sbCmd.AppendLine(")") | |
46 | + sCreat_TRN_EPUB = sbCmd.ToString() | |
47 | + | |
48 | + End Function | |
49 | + | |
50 | + | |
51 | +End Class |