diff --git a/Doc/A69WD.org b/Doc/A69WD.org index 7617a11..f6733ed 100644 --- a/Doc/A69WD.org +++ b/Doc/A69WD.org @@ -8,13 +8,32 @@ * TODO Inserire il conto dei link anche sul nome del file o fare report Inserire sul nome dei file, oltre alla data anche il numero di link che contengono, oppure fare un report che riassuma quanto fatto e che torna utile per confrontare due download diversi ecc... +* TODO Verificare il formato di salvataggio, perchè le accentuate e alcuni segni vengono male. +* TODO Fare parser di un file di link che inserisce quelli nuovi sul toDownload o li inserisce sul DB con lo stato ToDownload. * TODO Vrs 0.2.0.0 :WORKING: Applicazione che salva tutto su SQLite, inoltre è del tutto automatizzata e quindi basta avviarla e quando ha finito si spegne, altrimenti è sempre possibile fermarla a comando, senza perdere traccia di quanto fatto. -Per serializzare i dati +Per serializzare i dati utilizzo SQLlite con la tabella che mi permetta di risalire +velocemente ai link fatti, e a quelli da fare + +| URL | Tipo | Stato | Update | +|-----+------+-------+--------| + +- URL :: indica l'url a cui vi è la pagina da downloadare (sia indice che racconto) +- Tipo :: indica la tipologia della pagina, cioè Idx per le pagine che sono indici/elenchi + di racconti +- Stato :: Indica lo stato associato al link che sarà definito in basee alla seguente + enumerazione *LinkStatusEnum*: + - ToDownload + - Downloading + - Downloaded + e quindi all'avvio, mi basta caricare l'elenco dei link che hanno stato diverso da + Downloaded e riprendere il download +- Update :: indica la data in cui eseguo l'ultimo update al record + * Test funzionamento in consol: :ABORT: verifichiamo se è possibile operare come consol: diff --git a/Src/A69WD/A69WD.csproj b/Src/A69WD/A69WD.csproj index 4e79f57..1d7d8be 100644 --- a/Src/A69WD/A69WD.csproj +++ b/Src/A69WD/A69WD.csproj @@ -44,18 +44,31 @@ - + + + Form + + + frmDownloader.cs + + + + Form Form1.cs + Form1.cs + + frmDownloader.cs + ResXFileCodeGenerator Resources.Designer.cs @@ -74,7 +87,11 @@ Settings.settings True + + PreserveNewest + + + C:\Temporary\A69WD + + + A69DB.db + + + 1000 + + + + A69WD + + + + \ No newline at end of file diff --git a/Src/A69WD/cTools.cs b/Src/A69WD/cTools.cs deleted file mode 100644 index 08c91a3..0000000 --- a/Src/A69WD/cTools.cs +++ /dev/null @@ -1,25 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace A69WD { - public class cTools { - - - /// - /// Scrive il testo in un file con append=false e Encoding UTF8 - /// - /// Nome completo del file da creare/sovrascrivere - /// StringBuilder con il testo da riportare nel file - public static void WriteTextFile(string FullFileName, StringBuilder Text) { - System.IO.StreamWriter sw = new System.IO.StreamWriter(FullFileName, false, Encoding.UTF8); - sw.Write(Text.ToString()); - sw.Flush(); - sw.Close(); - } - - - - } -} diff --git a/Src/A69WD/frmDownloader.Designer.cs b/Src/A69WD/frmDownloader.Designer.cs new file mode 100644 index 0000000..a05bcd7 --- /dev/null +++ b/Src/A69WD/frmDownloader.Designer.cs @@ -0,0 +1,148 @@ +namespace A69WD { + partial class frmDownloader { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) { + if (disposing && (components != null)) { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() { + this.btbPath = new System.Windows.Forms.Button(); + this.tbPath = new System.Windows.Forms.TextBox(); + this.btnClose = new System.Windows.Forms.Button(); + this.btnHide = new System.Windows.Forms.Button(); + this.btnDownloadAll = new System.Windows.Forms.Button(); + this.lblST = new System.Windows.Forms.Label(); + this.wb1 = new System.Windows.Forms.WebBrowser(); + this.btnDownloadLink = new System.Windows.Forms.Button(); + this.SuspendLayout(); + // + // btbPath + // + this.btbPath.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.btbPath.Location = new System.Drawing.Point(-39, 53); + this.btbPath.Name = "btbPath"; + this.btbPath.Size = new System.Drawing.Size(20, 20); + this.btbPath.TabIndex = 17; + this.btbPath.Text = "."; + this.btbPath.UseVisualStyleBackColor = true; + // + // tbPath + // + this.tbPath.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.tbPath.Location = new System.Drawing.Point(132, 54); + this.tbPath.Name = "tbPath"; + this.tbPath.Size = new System.Drawing.Size(0, 20); + this.tbPath.TabIndex = 16; + this.tbPath.Text = "C:\\Temporary\\A69WD\\Dst\\"; + // + // btnClose + // + this.btnClose.Location = new System.Drawing.Point(381, 12); + this.btnClose.Name = "btnClose"; + this.btnClose.Size = new System.Drawing.Size(117, 33); + this.btnClose.TabIndex = 14; + this.btnClose.Text = "Close"; + this.btnClose.UseVisualStyleBackColor = true; + // + // btnHide + // + this.btnHide.Location = new System.Drawing.Point(258, 12); + this.btnHide.Name = "btnHide"; + this.btnHide.Size = new System.Drawing.Size(117, 33); + this.btnHide.TabIndex = 13; + this.btnHide.Text = "Hide"; + this.btnHide.UseVisualStyleBackColor = true; + // + // btnDownloadAll + // + this.btnDownloadAll.Location = new System.Drawing.Point(135, 12); + this.btnDownloadAll.Name = "btnDownloadAll"; + this.btnDownloadAll.Size = new System.Drawing.Size(117, 33); + this.btnDownloadAll.TabIndex = 11; + this.btnDownloadAll.Text = "Download All"; + this.btnDownloadAll.UseVisualStyleBackColor = true; + // + // lblST + // + this.lblST.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.lblST.Dock = System.Windows.Forms.DockStyle.Bottom; + this.lblST.Location = new System.Drawing.Point(0, 52); + this.lblST.Name = "lblST"; + this.lblST.Size = new System.Drawing.Size(504, 22); + this.lblST.TabIndex = 9; + this.lblST.Text = "Status"; + this.lblST.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // wb1 + // + this.wb1.Location = new System.Drawing.Point(0, 1); + this.wb1.MinimumSize = new System.Drawing.Size(20, 20); + this.wb1.Name = "wb1"; + this.wb1.ScriptErrorsSuppressed = true; + this.wb1.ScrollBarsEnabled = false; + this.wb1.Size = new System.Drawing.Size(63, 44); + this.wb1.TabIndex = 12; + this.wb1.TabStop = false; + this.wb1.Visible = false; + // + // btnDownloadLink + // + this.btnDownloadLink.Location = new System.Drawing.Point(12, 12); + this.btnDownloadLink.Name = "btnDownloadLink"; + this.btnDownloadLink.Size = new System.Drawing.Size(117, 33); + this.btnDownloadLink.TabIndex = 10; + this.btnDownloadLink.Text = "Download only Link"; + this.btnDownloadLink.UseVisualStyleBackColor = true; + // + // frmDownloader + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(504, 74); + this.ControlBox = false; + this.Controls.Add(this.btbPath); + this.Controls.Add(this.tbPath); + this.Controls.Add(this.btnClose); + this.Controls.Add(this.btnHide); + this.Controls.Add(this.btnDownloadAll); + this.Controls.Add(this.btnDownloadLink); + this.Controls.Add(this.lblST); + this.Controls.Add(this.wb1); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.Name = "frmDownloader"; + this.Text = "frmDownloader"; + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Button btbPath; + private System.Windows.Forms.TextBox tbPath; + private System.Windows.Forms.Button btnClose; + private System.Windows.Forms.Button btnHide; + private System.Windows.Forms.Button btnDownloadAll; + private System.Windows.Forms.Label lblST; + private System.Windows.Forms.WebBrowser wb1; + private System.Windows.Forms.Button btnDownloadLink; + } +} \ No newline at end of file diff --git a/Src/A69WD/frmDownloader.cs b/Src/A69WD/frmDownloader.cs new file mode 100644 index 0000000..167e918 --- /dev/null +++ b/Src/A69WD/frmDownloader.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Windows.Forms; + +namespace A69WD { + public partial class frmDownloader : Form { + public frmDownloader() { + InitializeComponent(); + } + } +} diff --git a/Src/A69WD/frmDownloader.resx b/Src/A69WD/frmDownloader.resx new file mode 100644 index 0000000..29dcb1b --- /dev/null +++ b/Src/A69WD/frmDownloader.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file