Index: AWB/AutoWikiBrowser.sln =================================================================== --- AWB/AutoWikiBrowser.sln (revision 1338) +++ AWB/AutoWikiBrowser.sln (working copy) @@ -1,6 +1,6 @@  Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual Studio 2005 +# Visual C# Express 2005 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WikiFunctions", "WikiFunctions\WikiFunctions.csproj", "{B5B0008C-A306-4B0D-B91E-5C03DA7014E0}" ProjectSection(ProjectDependencies) = postProject {980407B1-D48C-4000-A2FB-859347379ADC} = {980407B1-D48C-4000-A2FB-859347379ADC} @@ -19,6 +19,8 @@ EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Wikidiff2", "Wikidiff2\Wikidiff2.vcproj", "{980407B1-D48C-4000-A2FB-859347379ADC}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FullLog", "Plugins\FullLog\FullLog.csproj", "{7932DBE9-9E57-4BB3-A099-CBC968162CA2}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -91,6 +93,16 @@ {980407B1-D48C-4000-A2FB-859347379ADC}.Release|Mixed Platforms.Build.0 = Release|Win32 {980407B1-D48C-4000-A2FB-859347379ADC}.Release|Win32.ActiveCfg = Release|Win32 {980407B1-D48C-4000-A2FB-859347379ADC}.Release|Win32.Build.0 = Release|Win32 + {7932DBE9-9E57-4BB3-A099-CBC968162CA2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7932DBE9-9E57-4BB3-A099-CBC968162CA2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7932DBE9-9E57-4BB3-A099-CBC968162CA2}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {7932DBE9-9E57-4BB3-A099-CBC968162CA2}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {7932DBE9-9E57-4BB3-A099-CBC968162CA2}.Debug|Win32.ActiveCfg = Debug|Any CPU + {7932DBE9-9E57-4BB3-A099-CBC968162CA2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7932DBE9-9E57-4BB3-A099-CBC968162CA2}.Release|Any CPU.Build.0 = Release|Any CPU + {7932DBE9-9E57-4BB3-A099-CBC968162CA2}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {7932DBE9-9E57-4BB3-A099-CBC968162CA2}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {7932DBE9-9E57-4BB3-A099-CBC968162CA2}.Release|Win32.ActiveCfg = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE Index: AWB/AWB/AutoWikiBrowser.csproj =================================================================== --- AWB/AWB/AutoWikiBrowser.csproj (revision 1338) +++ AWB/AWB/AutoWikiBrowser.csproj (working copy) @@ -242,6 +242,10 @@ {3443EC53-0B83-4356-A032-AD9693448F19} CFD + + {7932DBE9-9E57-4BB3-A099-CBC968162CA2} + FullLog + {B5B0008C-A306-4B0D-B91E-5C03DA7014E0} WikiFunctions Index: AWB/AWB/Main.cs =================================================================== --- AWB/AWB/Main.cs (revision 1338) +++ AWB/AWB/Main.cs (working copy) @@ -488,8 +488,8 @@ } //check not in use - if (TheArticle.IsInUse && !BotMode) - MessageBox.Show("This page has the \"Inuse\" tag, consider skipping it"); + //if (TheArticle.IsInUse && !BotMode) + // MessageBox.Show("This page has the \"Inuse\" tag, consider skipping it"); if (chkSkipIfContains.Checked && TheArticle.SkipIfContains(txtSkipIfContains.Text, chkSkipIsRegex.Checked, chkSkipCaseSensitive.Checked, true)) @@ -3148,6 +3148,7 @@ ContextMenuStrip IAutoWikiBrowser.EditBoxContextMenu { get { return mnuTextBox; } } TabControl IAutoWikiBrowser.Tab { get { return tabControl1; } } WikiFunctions.Parse.FindandReplace IAutoWikiBrowser.FindandReplace { get { return findAndReplace; } } + WikiFunctions.MWB.ReplaceSpecial IAutoWikiBrowser.ReplaceSpecial { get { return replaceSpecial; } } WikiFunctions.SubstTemplates IAutoWikiBrowser.SubstTemplates { get { return substTemplates; } } string IAutoWikiBrowser.CustomModule { get { if (cModule.ModuleEnabled && cModule.Module != null) return cModule.Code; else return null; } } System.Version IAutoWikiBrowser.AWBVersion { get { return Program.Version; } } Index: AWB/Plugins/FullLog/FullLog.cs =================================================================== --- AWB/Plugins/FullLog/FullLog.cs (revision 0) +++ AWB/Plugins/FullLog/FullLog.cs (revision 0) @@ -0,0 +1,518 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Data; +using System.Text; +using System.Windows.Forms; + +using System.IO; +using System.Reflection; +using System.Text.RegularExpressions; +using System.Web; + +using WikiFunctions.Controls; +using WikiFunctions.Lists; +using WikiFunctions.Logging; +using WikiFunctions.Parse; +using WikiFunctions.MWB; +using WikiFunctions.Plugin; +using WikiFunctions; + +using FullLog; + +namespace FullLog +{ + public partial class FullLogControl : Form + { + public FullLogControl() + { + InitializeComponent(); + } + + public bool ok; + + public string request + { + get { return txtRequest.Text; } + set { txtRequest.Text = value; } + } + + private void FullLogControl_Activated(object sender, EventArgs e) + { + txtRequest.Focus(); + } + + private void btnOK_Click(object sender, EventArgs e) + { + ok = true; + Close(); + } + + private void btnCancel_Click(object sender, EventArgs e) + { + ok = false; + Close(); + } + + private void txtRequest_KeyDown(object sender, KeyEventArgs e) + { + if (e.KeyCode == Keys.Enter) btnOK_Click(null, null); + } + } + + public class FullLogCore : IAWBPlugin + { + IAutoWikiBrowser MainForm; + NoFlickerListView lvSaved; + NoFlickerListView lvIgnored; + string RevisionId; + + public void Initialise(IAutoWikiBrowser Form) + { + MainForm = Form; + + SplitContainer splitContainer1 = (SplitContainer)MainForm.Form.Controls[MainForm.Form.Controls.IndexOfKey("splitContainer1")]; + TabControl tabControl2 = (TabControl)splitContainer1.Panel2.Controls[splitContainer1.Panel2.Controls.IndexOfKey("tabControl2")]; + TabPage tpLogs = (TabPage)tabControl2.Controls[tabControl2.Controls.IndexOfKey("tpLogs")]; + LogControl LogControl1 = (LogControl)tpLogs.Controls[tpLogs.Controls.IndexOfKey("LogControl1")]; + + Button btnSaveFullLog = new System.Windows.Forms.Button(); + btnSaveFullLog.Location = new System.Drawing.Point(168, 137); + btnSaveFullLog.Name = "btnSaveFullLog"; + btnSaveFullLog.Size = new System.Drawing.Size(75, 24); + btnSaveFullLog.TabIndex = 23; + btnSaveFullLog.Text = "Save full log"; + btnSaveFullLog.UseVisualStyleBackColor = true; + btnSaveFullLog.Click += new System.EventHandler(SaveFullLog); + LogControl1.Controls.Add(btnSaveFullLog); + + lvSaved = (NoFlickerListView)LogControl1.Controls[LogControl1.Controls.IndexOfKey("lvSaved")]; + lvIgnored = (NoFlickerListView)LogControl1.Controls[LogControl1.Controls.IndexOfKey("lvIgnored")]; + + ColumnHeader colSuccessRevId = new System.Windows.Forms.ColumnHeader(); + colSuccessRevId.Text = "Revision Id"; + lvSaved.Columns.Add(colSuccessRevId); + + MainForm.WebControl.Saved += FLSaved; + } + + public string Name + { + get { return "FullLog"; } + } + + public string WikiName + { + get { return "[[Wikipédia:AutoWikiBrowser/FullLog|FullLog]]"; } + } + + public string ProcessArticle(IAutoWikiBrowser sender, ProcessArticleEventArgs ProcessArticleEventArgs) + { + ProcessArticleEventArgs.EditSummary = ""; + ProcessArticleEventArgs.Skip = false; + + if (sender.WebControl.Document == null) + { + RevisionId = ""; + } + else + { + Regex RevIdRegex = new Regex("var wgCurRevisionId = \"(\\d+)\";", RegexOptions.Compiled); + Match m = RevIdRegex.Match(sender.WebControl.DocumentText); + + if (m.Groups[1].Value == "null") + { + RevisionId = ""; + } + else + { + RevisionId = m.Groups[1].Value; + } + } + + return ProcessArticleEventArgs.ArticleText; + } + + public void LoadSettings(object[] Prefs) { } + public object[] SaveSettings() { return null; } + public void Reset() { } + public void Nudge(out bool Cancel) { Cancel = false; } + public void Nudged(int Nudges) { } + + private void FLSaved() + { + lvSaved.Items[0].SubItems.Add(RevisionId); + } + + private string ParseRules(List Rules, string prefix, string color) + { + string logLine = ""; + string ifContains, ifRegexOptions, replace; + bool subrule = prefix == "" ? false : true; + int odd = 0; + + foreach (WikiFunctions.MWB.Rule rule in Rules) + { + if (!rule.enabled_) continue; + + if (!subrule) + { + odd++; + color = odd % 2 == 0 ? "#e6ffcc" : "#cce6ff"; + logLine += "
Règle « '''" + HttpUtility.HtmlEncode(rule.Name) + "''' »
\r\n"; + } + else + { + logLine += prefix + "Sous-règle « '''" + HttpUtility.HtmlEncode(rule.Name) + "''' »
\r\n"; + } + + ifRegexOptions = ""; + if ((rule.ifRegexOptions_ & RegexOptions.IgnoreCase) != 0) + ifRegexOptions += "i"; + if ((rule.ifRegexOptions_ & RegexOptions.Multiline) != 0) + ifRegexOptions += "m"; + if ((rule.ifRegexOptions_ & RegexOptions.Singleline) != 0) + ifRegexOptions += "s"; + + if (rule.ifContains_ != "") + { + ifContains = rule.ifContains_; + + if (!rule.ifIsRegex_) + ifContains = Regex.Escape(ifContains); + + logLine += prefix + "  /" + + HttpUtility.HtmlEncode(ifContains) + + "/" + ifRegexOptions + "
\r\n"; + } + + if (rule.ifNotContains_ != "") + { + ifContains = rule.ifNotContains_; + + if (!rule.ifIsRegex_) + ifContains = Regex.Escape(ifContains); + + logLine += prefix + " !/" + + "" + + HttpUtility.HtmlEncode(ifContains) + + "/" + ifRegexOptions + "
\r\n"; + } + + replace = rule.replace_; + if (!rule.regex_) + replace = Regex.Escape(replace); + + logLine += prefix + " s/" + + "" + + HttpUtility.HtmlEncode(replace) + "" + + "/" + + HttpUtility.HtmlEncode(rule.with_) + "/"; + + if ((rule.regexOptions_ & RegexOptions.IgnoreCase) != 0) + logLine += "i"; + if ((rule.regexOptions_ & RegexOptions.Multiline) != 0) + logLine += "m"; + if ((rule.regexOptions_ & RegexOptions.Singleline) != 0) + logLine += "s"; + + logLine += "
\r\n"; + + if (rule.Children != null && rule.Children.Count > 0) + logLine += ParseRules(rule.Children, prefix + ":", color); + + if (!subrule) + { + logLine += "
\r\n"; + } + } + + return logLine; + } + + private void SaveFullLog(object sender, EventArgs e) + { + try + { + SaveFileDialog saveLogDialog = new System.Windows.Forms.SaveFileDialog(); + saveLogDialog.DefaultExt = "txt"; + saveLogDialog.Filter = "Plain text file|*.txt"; + saveLogDialog.Title = "Save full log"; + if (saveLogDialog.ShowDialog() == DialogResult.OK) + { + string strLogFile = saveLogDialog.FileName; + StreamWriter sw = new StreamWriter(strLogFile, false, Encoding.UTF8); + + StringBuilder strLog = new StringBuilder(""); + string logLine; + + string request; + FullLogControl ctl = new FullLogControl(); + ctl.request = MainForm.EditSummary.Text; + ctl.ShowDialog(); + if (ctl.ok) + request = ctl.request; + else + request = MainForm.EditSummary.Text; + request = Regex.Replace(request, @"\{\{([^\}]+)\}\}", "{{m|$1}}"); + request = Regex.Replace(request, @"\[\[([^:][^\]]+)\]\]", "[[:$1]]"); + logLine = "== " + request.Trim() + " ==\r\n"; + strLog.Append(logLine); + + DateTime dateEdit; + DateTime dateStart = new DateTime(2099, 12, 31); + DateTime dateEnd = new DateTime(2000, 1, 1); + foreach (AWBLogListener log in lvSaved.Items) + { + dateEdit = Convert.ToDateTime(log.TimeStamp); + if (dateEdit.CompareTo(dateStart) < 0) + dateStart = dateEdit; + if (dateEdit.CompareTo(dateEnd) > 0) + dateEnd = dateEdit; + } + foreach (AWBLogListener log in lvIgnored.Items) + { + dateEdit = Convert.ToDateTime(log.TimeStamp); + if (dateEdit.CompareTo(dateStart) < 0) + dateStart = dateEdit; + if (dateEdit.CompareTo(dateEnd) > 0) + dateEnd = dateEdit; + } + + logLine = "Début : " + dateStart.ToString() + "
\r\n"; + logLine += "Fin : " + dateEnd.ToString() + "
\r\n"; + logLine += "Historique : [{{fullurl:Special:Contributions" + + "|target=" + Variables.User.Name + "&offset=" + + Regex.Replace(dateEnd.ToUniversalTime().ToString("u"), "\\D", "") + "}} " + + "Special:Contributions/" + Variables.User.Name + "]
\r\n"; + logLine += "
\r\n"; + strLog.Append(logLine); + + logLine = "Mode : "; + if (!MainForm.BotModeCheckbox.Checked) + logLine += "semi-"; + logLine += "automatique
\r\n"; + logLine += "
\r\n"; + strLog.Append(logLine); + + logLine = "Outil utilisé : [[Wikipedia:AutoWikiBrowser|AutoWikiBrowser]] version " + + MainForm.AWBVersion + "
\r\n"; + logLine += "
\r\n"; + strLog.Append(logLine); + + Control.ControlCollection OptionsTabControls = MainForm.OptionsTab.Controls; + + GroupBox groupBox6 = (GroupBox)OptionsTabControls[OptionsTabControls.IndexOfKey("groupBox6")]; + CheckBox chkUnicodifyWhole = (CheckBox)groupBox6.Controls[groupBox6.Controls.IndexOfKey("chkUnicodifyWhole")]; + GroupBox groupBox13 = (GroupBox)OptionsTabControls[OptionsTabControls.IndexOfKey("groupBox13")]; + CheckBox chkRegExTypo = (CheckBox)groupBox13.Controls[groupBox13.Controls.IndexOfKey("chkRegExTypo")]; + if (MainForm.ApplyGeneralFixesCheckBox.Checked || MainForm.AutoTagCheckBox.Checked || + chkUnicodifyWhole.Checked || chkRegExTypo.Checked) + { + logLine = "Options AWB activées :\r\n"; + if (MainForm.ApplyGeneralFixesCheckBox.Checked) + logLine += "*Apply general fixes\r\n"; + if (MainForm.AutoTagCheckBox.Checked) + logLine += "*Auto tag\r\n"; + if (chkUnicodifyWhole.Checked) + logLine += "*Unicodify whole article\r\n"; + if (chkRegExTypo.Checked) + logLine += "*[[Wikipédia:AutoWikiBrowser/Typos|RegexTypoFix]]\r\n"; + + logLine += "
\r\n"; + strLog.Append(logLine); + } + + GroupBox groupBox1 = (GroupBox)OptionsTabControls[OptionsTabControls.IndexOfKey("groupBox1")]; + CheckBox chkFindandReplace = (CheckBox)groupBox1.Controls[groupBox1.Controls.IndexOfKey("chkFindandReplace")]; + if (chkFindandReplace.Checked) + { + List Replacements = MainForm.FindandReplace.GetList(); + if (Replacements.Count > 0) + { + logLine = "[[Expression rationnelle|Expressions rationnelles]] utilisées pour les remplacements de texte :\r\n"; + + string Find; + + foreach (Replacement rep in Replacements) + { + if (!rep.Enabled) continue; + + Find = rep.Find; + + if (!rep.IsRegex) + Find = Regex.Escape(Find); + + logLine += "*s/" + HttpUtility.HtmlEncode(Find) + "" + + "/" + HttpUtility.HtmlEncode(rep.Replace) + "/"; + + if ((rep.RegularExpressinonOptions & RegexOptions.IgnoreCase) != 0) + logLine += "i"; + if ((rep.RegularExpressinonOptions & RegexOptions.Multiline) != 0) + logLine += "m"; + if ((rep.RegularExpressinonOptions & RegexOptions.Singleline) != 0) + logLine += "s"; + + logLine += "\r\n"; + } + + logLine += "
\r\n"; + + strLog.Append(logLine); + } + + List Rules = MainForm.ReplaceSpecial.GetRules(); + if (Rules.Count > 0) + { + logLine = "[[Expression rationnelle|Expressions rationnelles]] utilisées pour les remplacements de texte '''évolués''' :
\r\n"; + logLine += ParseRules(Rules, "", ""); + logLine += "
\r\n"; + strLog.Append(logLine); + } + + string[] Templates = MainForm.SubstTemplates.TemplateList; + if (Templates.Length > 0) + { + logLine = "[[Aide:Modèle|Modèles]] substitués :\r\n"; + + foreach (string template in Templates) + if (template.Trim() != "") + logLine += "*{{m|" + template + "}}\r\n"; + + logLine += "
\r\n"; + strLog.Append(logLine); + } + } + + Control.ControlCollection MoreOptionsControls = MainForm.MoreOptionsTab.Controls; + + GroupBox groupBox4 = (GroupBox)MoreOptionsControls[MoreOptionsControls.IndexOfKey("groupBox4")]; + CheckBox chkAppend = (CheckBox)groupBox4.Controls[groupBox4.Controls.IndexOfKey("chkAppend")]; + RadioButton rdoAppend = (RadioButton)groupBox4.Controls[groupBox4.Controls.IndexOfKey("rdoAppend")]; + TextBox txtAppendMessage = (TextBox)groupBox4.Controls[groupBox4.Controls.IndexOfKey("txtAppendMessage")]; + if (chkAppend.Checked) + { + if (rdoAppend.Checked) + logLine = "Texte ajouté à la fin :\r\n"; + else + logLine = "Texte ajouté au début :\r\n"; + logLine += "
" + HttpUtility.HtmlEncode(txtAppendMessage.Text) + "
\r\n"; + logLine += "
\r\n"; + strLog.Append(logLine); + } + + GroupBox groupBox5 = (GroupBox)MoreOptionsControls[MoreOptionsControls.IndexOfKey("groupBox5")]; + ComboBox cmboCategorise = (ComboBox)groupBox5.Controls[groupBox5.Controls.IndexOfKey("cmboCategorise")]; + TextBox txtNewCategory = (TextBox)groupBox5.Controls[groupBox5.Controls.IndexOfKey("txtNewCategory")]; + TextBox txtNewCategory2 = (TextBox)groupBox5.Controls[groupBox5.Controls.IndexOfKey("txtNewCategory2")]; + if (cmboCategorise.SelectedIndex > 0) + { + switch (cmboCategorise.SelectedIndex) + { + case 1: + logLine = "[[Aide:Catégorie|Catégorie]] '''[[:Catégorie:" + txtNewCategory.Text + "|" + + txtNewCategory.Text + "]]''' remplacée par catégorie '''[[:Catégorie:" + + txtNewCategory2.Text + "|" + txtNewCategory2.Text + "]]'''
\r\n"; + break; + case 2: + logLine = "[[Aide:Catégorie|Catégorie]] '''[[:Catégorie:" + txtNewCategory.Text + "|" + + txtNewCategory.Text + "]]''' ajoutée
\r\n"; + break; + case 3: + logLine = "[[Aide:Catégorie|Catégorie]] '''[[:Catégorie:" + txtNewCategory.Text + "|" + + txtNewCategory.Text + "]]''' supprimée
\r\n"; + break; + default: + break; + } + + logLine += "
\r\n"; + strLog.Append(logLine); + } + + GroupBox ImageGroupBox = (GroupBox)MoreOptionsControls[MoreOptionsControls.IndexOfKey("ImageGroupBox")]; + ComboBox cmboImages = (ComboBox)ImageGroupBox.Controls[ImageGroupBox.Controls.IndexOfKey("cmboImages")]; + TextBox txtImageReplace = (TextBox)ImageGroupBox.Controls[ImageGroupBox.Controls.IndexOfKey("txtImageReplace")]; + TextBox txtImageWith = (TextBox)ImageGroupBox.Controls[ImageGroupBox.Controls.IndexOfKey("txtImageWith")]; + if (cmboImages.SelectedIndex > 0) + { + switch (cmboImages.SelectedIndex) + { + case 1: + logLine = "[[Aide:Image|Image]] '''[[:Image:" + txtImageReplace.Text + "|" + + txtImageReplace.Text + "]]''' remplacée par image '''[[:Image:" + + txtImageWith.Text + "|" + txtImageWith.Text + "]]'''
\r\n"; + break; + case 2: + logLine = "[[Aide:Image|Image]] '''[[:Image:" + txtImageReplace.Text + "|" + + txtImageReplace.Text + "]]''' supprimée
\r\n"; + break; + case 3: + logLine = "[[Aide:Image|Image]] '''[[:Image:" + txtImageReplace.Text + "|" + + txtImageReplace.Text + "]]''' commentée avec le commentaire « " + + txtImageWith.Text + " »
\r\n"; + break; + default: + break; + } + + logLine += "
\r\n"; + strLog.Append(logLine); + } + + if (MainForm.CustomModule != null) + { + logLine = "Module activé :\r\n"; + //logLine += "
" + HttpUtility.HtmlEncode(MainForm.CustomModule) + "
\r\n"; + //logLine += "
\r\n"; + logLine += "\r\n" + MainForm.CustomModule + "\r\n"; + logLine += "
\r\n"; + strLog.Append(logLine); + } + + string title, timestamp, revid, skippedby, reason; + logLine = "
Articles modifiés :\r\n"; + foreach (ListViewItem log in lvSaved.Items) + { + title = log.SubItems[0].Text; + timestamp = log.SubItems[1].Text; + revid = log.SubItems[2].Text; + logLine += "#" + timestamp + " [[:" + title + "]] " + + "([{{fullurl:" + title + + "|diff=next&oldid=" + revid + "}} diff] • " + + "[{{fullurl:" + title + "|action=history}} hist] • " + + "modif)\r\n"; + } + logLine += "

\r\n"; + strLog.Append(logLine); + + logLine = "Articles non modifiés :\r\n"; + foreach (ListViewItem log in lvIgnored.Items) + { + title = log.SubItems[0].Text; + timestamp = log.SubItems[1].Text; + skippedby = log.SubItems[2].Text; + reason = log.SubItems[3].Text; + logLine += "#" + timestamp + " [[:" + title + "]] "; + logLine += "(" + skippedby + " : " + reason + ")\r\n"; + } + strLog.Append(logLine); + + sw.Write(strLog); + sw.Close(); + } + } + catch (IOException ex) + { + MessageBox.Show(ex.Message, "File error", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + catch (Exception ex) + { + MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + } +} Index: AWB/Plugins/FullLog/FullLog.csproj =================================================================== --- AWB/Plugins/FullLog/FullLog.csproj (revision 0) +++ AWB/Plugins/FullLog/FullLog.csproj (revision 0) @@ -0,0 +1,70 @@ + + + Debug + AnyCPU + 8.0.50727 + 2.0 + {7932DBE9-9E57-4BB3-A099-CBC968162CA2} + Library + Properties + FullLog + FullLog + + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + Form + + + FullLog.cs + + + + + {B5B0008C-A306-4B0D-B91E-5C03DA7014E0} + WikiFunctions + + + + + Designer + FullLog.cs + + + + + Index: AWB/Plugins/FullLog/FullLog.Designer.cs =================================================================== --- AWB/Plugins/FullLog/FullLog.Designer.cs (revision 0) +++ AWB/Plugins/FullLog/FullLog.Designer.cs (revision 0) @@ -0,0 +1,92 @@ +namespace FullLog +{ + partial class FullLogControl + { + /// + /// Variable nécessaire au concepteur. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Nettoyage des ressources utilisées. + /// + /// true si les ressources managées doivent être supprimées ; sinon, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Code généré par le Concepteur Windows Form + + /// + /// Méthode requise pour la prise en charge du concepteur - ne modifiez pas + /// le contenu de cette méthode avec l'éditeur de code. + /// + private void InitializeComponent() + { + this.txtRequest = new System.Windows.Forms.TextBox(); + this.btnOK = new System.Windows.Forms.Button(); + this.btnCancel = new System.Windows.Forms.Button(); + this.SuspendLayout(); + // + // txtRequest + // + this.txtRequest.Location = new System.Drawing.Point(11, 15); + this.txtRequest.Name = "txtRequest"; + this.txtRequest.Size = new System.Drawing.Size(258, 20); + this.txtRequest.TabIndex = 5; + this.txtRequest.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtRequest_KeyDown); + // + // btnOK + // + this.btnOK.Location = new System.Drawing.Point(43, 57); + this.btnOK.Name = "btnOK"; + this.btnOK.Size = new System.Drawing.Size(81, 23); + this.btnOK.TabIndex = 4; + this.btnOK.Text = "Ok"; + this.btnOK.UseVisualStyleBackColor = true; + this.btnOK.Click += new System.EventHandler(this.btnOK_Click); + // + // btnCancel + // + this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.btnCancel.Location = new System.Drawing.Point(156, 57); + this.btnCancel.Name = "btnCancel"; + this.btnCancel.Size = new System.Drawing.Size(81, 23); + this.btnCancel.TabIndex = 4; + this.btnCancel.Text = "Cancel"; + this.btnCancel.UseVisualStyleBackColor = true; + this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click); + // + // FullLogControl + // + this.AcceptButton = this.btnOK; + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.CancelButton = this.btnCancel; + this.ClientSize = new System.Drawing.Size(280, 94); + this.Controls.Add(this.txtRequest); + this.Controls.Add(this.btnCancel); + this.Controls.Add(this.btnOK); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.Name = "FullLogControl"; + this.ShowIcon = false; + this.ShowInTaskbar = false; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.Text = "Request\'s name"; + this.ResumeLayout(false); + this.PerformLayout(); + this.Activated += new System.EventHandler(this.FullLogControl_Activated); + } + + #endregion + + private System.Windows.Forms.TextBox txtRequest; + private System.Windows.Forms.Button btnOK; + private System.Windows.Forms.Button btnCancel; + } +} Index: AWB/Plugins/FullLog/FullLog.resx =================================================================== --- AWB/Plugins/FullLog/FullLog.resx (revision 0) +++ AWB/Plugins/FullLog/FullLog.resx (revision 0) @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Index: AWB/Plugins/FullLog/Properties/AssemblyInfo.cs =================================================================== --- AWB/Plugins/FullLog/Properties/AssemblyInfo.cs (revision 0) +++ AWB/Plugins/FullLog/Properties/AssemblyInfo.cs (revision 0) @@ -0,0 +1,35 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Resources; + +// Les informations générales relatives à un assembly dépendent de +// l'ensemble d'attributs suivant. Changez les valeurs de ces attributs pour modifier les informations +// associées à un assembly. +[assembly: AssemblyTitle("FullLog")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Magnolia Prod ©")] +[assembly: AssemblyProduct("FullLog")] +[assembly: AssemblyCopyright("Copyright © Magnolia Prod © 2007")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// L'affectation de la valeur false à ComVisible rend les types invisibles dans cet assembly +// aux composants COM. Si vous devez accéder à un type dans cet assembly à partir de +// COM, affectez la valeur true à l'attribut ComVisible sur ce type. +[assembly: ComVisible(false)] + +// Le GUID suivant est pour l'ID de la typelib si ce projet est exposé à COM +[assembly: Guid("9e32baf4-adab-47e5-ac3a-8963d8a96afa")] + +// Les informations de version pour un assembly se composent des quatre valeurs suivantes : +// +// Version principale +// Version secondaire +// Numéro de build +// Révision +// +[assembly: AssemblyVersion("1.2.0.0")] +[assembly: AssemblyFileVersion("1.2.0.0")] +[assembly: NeutralResourcesLanguageAttribute("fr")] Index: AWB/WikiFunctions/FindandReplace.cs =================================================================== --- AWB/WikiFunctions/FindandReplace.cs (revision 1338) +++ AWB/WikiFunctions/FindandReplace.cs (working copy) @@ -132,7 +132,7 @@ ArticleText = RemoveLinks.AddBack(ArticleText); if (chkAddToSummary.Checked && streditsummary != "") - EditSummary = ", Replaced: " + summary.Trim(); + EditSummary = ", rempl. texte : " + summary.Trim(", ".ToCharArray()); return ArticleText; } @@ -158,7 +158,7 @@ summary = Matches[0].Value + " → " + Matches[0].Result(Replace); if (Matches.Count > 1) - summary += " (" + Matches.Count.ToString() + ")"; + summary += " (" + Matches.Count.ToString() + "x)"; streditsummary += summary + ", "; } Index: AWB/WikiFunctions/IAWBPlugin.cs =================================================================== --- AWB/WikiFunctions/IAWBPlugin.cs (revision 1338) +++ AWB/WikiFunctions/IAWBPlugin.cs (working copy) @@ -79,6 +79,7 @@ ContextMenuStrip EditBoxContextMenu { get; } TabControl Tab { get; } WikiFunctions.Parse.FindandReplace FindandReplace { get; } + WikiFunctions.MWB.ReplaceSpecial ReplaceSpecial { get; } WikiFunctions.SubstTemplates SubstTemplates { get; } string CustomModule { get; } System.Version AWBVersion { get; } Index: AWB/WikiFunctions/RegExTypoFix.cs =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: AWB/WikiFunctions/WikiRegexes.cs =================================================================== --- AWB/WikiFunctions/WikiRegexes.cs (revision 1338) +++ AWB/WikiFunctions/WikiRegexes.cs (working copy) @@ -185,9 +185,9 @@ public static readonly Regex Persondata = new Regex(@"\{\{ ?[Pp]ersondata.*?\}\}", RegexOptions.Singleline | RegexOptions.Compiled); /// - /// Matches {{Link FA|xxx}} (en only) + /// Matches {{Link FA|xxx}} (en and fr only) /// - public static readonly Regex LinkFAs = new Regex(@"\{\{[Ll]ink FA\|.*?\}\}", RegexOptions.Compiled); + public static readonly Regex LinkFAs = new Regex(@"\{\{[Ll](?:ink FA|ien (?:AdQ|BA|PdQ))\|.*?\}\}", RegexOptions.Compiled); /// /// matches