diff --git a/BuildProcessTemplates/DefaultTemplate.11.1.xaml b/BuildProcessTemplates/DefaultTemplate.11.1.xaml new file mode 100644 index 0000000..bf54edf --- /dev/null +++ b/BuildProcessTemplates/DefaultTemplate.11.1.xaml @@ -0,0 +1,543 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + [New Microsoft.TeamFoundation.Build.Workflow.Activities.BuildSettings()] + [False] + [New Microsoft.TeamFoundation.Build.Workflow.Activities.TestSpecList(New Microsoft.TeamFoundation.Build.Workflow.Activities.AgileTestPlatformSpec("**\*test*.dll"))] + ["$(BuildDefinitionName)_$(Date:yyyyMMdd)$(Rev:.r)"] + [False] + [True] + [True] + [Microsoft.TeamFoundation.Build.Workflow.Activities.CleanWorkspaceOption.All] + + + + [Microsoft.TeamFoundation.Build.Workflow.Activities.CodeAnalysisOption.AsConfigured] + [True] + [Microsoft.TeamFoundation.Build.Workflow.Activities.ToolPlatform.Auto] + [True] + [New Microsoft.TeamFoundation.Build.Workflow.Activities.SourceAndSymbolServerSettings(True, Nothing)] + [True] + + + + [New Microsoft.TeamFoundation.Build.Workflow.Activities.AgentSettings() With {.MaxWaitTime = New System.TimeSpan(4, 0, 0), .MaxExecutionTime = New System.TimeSpan(0, 0, 0), .TagComparison = Microsoft.TeamFoundation.Build.Workflow.Activities.TagComparison.MatchExactly }] + [Microsoft.TeamFoundation.Build.Workflow.BuildVerbosity.Normal] + + + + + + + All + 11.0 + Assembly references and imported namespaces serialized as XML namespaces + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/BuildProcessTemplates/DefaultTemplate.xaml b/BuildProcessTemplates/DefaultTemplate.xaml new file mode 100644 index 0000000..12cc624 --- /dev/null +++ b/BuildProcessTemplates/DefaultTemplate.xaml @@ -0,0 +1,602 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Assembly references and imported namespaces serialized as XML namespaces + + + True + + + + + + + + + True + + + + + + + True + + + + + + + + + + + True + + + + + + + + + + + + + + + + + + + + True + + + + + + + + + + + + + + + + + + + + + + + + + + + + True + + + + + + + + + + + + + + + + + + + True + + + + + + + + + + + + True + + + + + + + + + + + + + + True + + + + + + + + + + + + + + + + + + + True + + + + + + + + + + + + + + + + True + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + True + + + + + + + + + + + + + + + + + + + + + + True + + + + + + + + + True + + + + + + + + + + + + + + + True + + + + + + True + + + + + + + + + + + + + + + + + + + + + + + + + True + + + + + + + + + + + + + + + + + + False + + + + + + + + + + True + + + + + + + + + + + + + + + + + + + + + + + + + + True + + + + + + + + + + + + + + + + + + + + + True + + + + + + + + + + + + + + + + + + True + + + + + + + + + + + + + + + True + + + + + + + + + + + + + + + + + + + + + False + + + + + + + + + + True + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + False + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + True + + + + + + + + + + + + + + + + + + + + + + + + + False + + + + + + + + + + + + + + + + + + + + + + + + + + False + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/BuildProcessTemplates/LabDefaultTemplate.11.xaml b/BuildProcessTemplates/LabDefaultTemplate.11.xaml new file mode 100644 index 0000000..9e1fb0b --- /dev/null +++ b/BuildProcessTemplates/LabDefaultTemplate.11.xaml @@ -0,0 +1,208 @@ + + + + + + + + + + + + + + + 11.0 + + + + + + 920,3702 + Assembly references and imported namespaces serialized as XML namespaces + + + + + + + + + + + + + + + + + + + + + True + + + + + + + [LabWorkflowParameters.BuildDetails.BuildUri] + + + [ChildBuildDetail.Uri] + + + + + + + + + + + + [BuildLocation] + + + [If(LabWorkflowParameters.BuildDetails.Configuration Is Nothing, BuildLocation, If(LabWorkflowParameters.BuildDetails.Configuration.IsEmpty Or (SelectedBuildDetail.Information.GetNodesByType(Microsoft.TeamFoundation.Build.Common.InformationTypes.ConfigurationSummary, True)).Count = 1, BuildLocation, If(LabWorkflowParameters.BuildDetails.Configuration.IsPlatformEmptyOrAnyCpu, BuildLocation + "\" + LabWorkflowParameters.BuildDetails.Configuration.Configuration, BuildLocation + "\" + LabWorkflowParameters.BuildDetails.Configuration.Platform + "\" + LabWorkflowParameters.BuildDetails.Configuration.Configuration)))] + + + + + + + + + + + + [LabEnvironmentUri] + + + [LabWorkflowParameters.EnvironmentDetails.LabEnvironmentUri.ToString()] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + [PostDeploymentSnapshotName] + + + [If(LabWorkflowParameters.BuildDetails.IsTeamSystemBuild = True,String.Format("{0}_{1}_{2}", LabWorkflowParameters.DeploymentDetails.PostDeploymentSnapshotName, BuildNumber,BuildDetail.BuildNumber),String.Format("{0}_{1}", LabWorkflowParameters.DeploymentDetails.PostDeploymentSnapshotName, BuildDetail.BuildNumber))] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + [BuildStatus] + + + [Microsoft.TeamFoundation.Build.Client.BuildStatus.PartiallySucceeded] + + + + + + + [BuildStatus] + + + [Microsoft.TeamFoundation.Build.Client.BuildStatus.Failed] + + + + + + + + + + + + \ No newline at end of file diff --git a/BuildProcessTemplates/UpgradeTemplate.xaml b/BuildProcessTemplates/UpgradeTemplate.xaml new file mode 100644 index 0000000..166acb2 --- /dev/null +++ b/BuildProcessTemplates/UpgradeTemplate.xaml @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + [New Microsoft.TeamFoundation.Build.Workflow.Activities.AgentSettings() With {.MaxWaitTime = New System.TimeSpan(4, 0, 0), .MaxExecutionTime = New System.TimeSpan(0, 0, 0), .TagComparison = Microsoft.TeamFoundation.Build.Workflow.Activities.TagComparison.MatchExactly }] + + + + [Microsoft.TeamFoundation.Build.Workflow.Activities.ToolPlatform.Auto] + [False] + [False] + + + + + + + + + + [Microsoft.TeamFoundation.VersionControl.Client.RecursionType.OneLevel] + [Microsoft.TeamFoundation.Build.Workflow.BuildVerbosity.Normal] + + + + All + Assembly references and imported namespaces serialized as XML namespaces + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/README.md b/README.md index d156641..ae4b3f8 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,14 @@ # DynamicTemplate DynamicTemplate plugin for Open Live Writer + +Originally written by Joe Cheng for Windows Live Writer, taken from http://wlwtemplate.codeplex.com/ + +To install, copy release to +":\Users\\Local Settings\Application Data\OpenLiveWriter\app-\plugins\" + +or add string entry with path to release to registry +HKEY_CURRENT_USER\SOFTWARE\OpenLiveWriter\PluginAssemblies + + +Modified for Open Live Writer by Vlad, vlad@izne.com + diff --git a/doc/web/index.htm b/doc/web/index.htm new file mode 100644 index 0000000..d793d2c --- /dev/null +++ b/doc/web/index.htm @@ -0,0 +1,191 @@ + + + +Dynamic Template plug-in for Windows Live Writer + + + + + +
+ +
+
+ + Download Now
+ from CodePlex
+
+

Dynamic Template is a powerful plugin for Windows + Live Writer. You can use templates to easily insert oft-used snippets + of HTML or text.

+

Or you can write templates that are powerful enough to be considered + "mini-plugins" in their own right, while being radically simpler to + write and distribute than traditional Windows Live Writer plugins. + If you have ever written a PHP, JSP, or ASP page, you already have a + good idea of how to write these kind of templates!

+

For example?

+

Level 1 - Plain HTML: Let's start with the + simplest possible scenario: you just want to insert the same snippet + of HTML into your posts on a regular basis, and you don't want to + have to leave Writer to do it. For this example, imagine you want to + "Powered by Windows Live Writer" at the bottom of your posts. + Watch Example 1. (All videos linked + from this page are very short Flash movies, created using + Jing.)

+

Level 2 - HTML + Code: OK, that's useful, but + it's been done + before. What sets my plugin apart is that dynamic templates can + contain snippets of C# code, like an ASP page! For this next + example, imagine you're an Engadget blogger, liveblogging the latest Steve Jobs keynote (like + + this one). Every second counts, and the time spent inserting the + little timestamp is time wasted. Let's write a template to automate + that. Watch Example 2.

+

Level 3 - Using Selection: It's much easier to + come up with useful scenarios once we introduce the ability to + access what's currently selected in Windows Live Writer. Just use + the built-in variable _selection in your template. This is + incredibly useful for adding HTML formatting that isn't included + with Windows Live Writer out of the box--for example, small caps. + Watch Example 3. Or here's a + cool idea: take whatever text you've entered into Writer, and treat + it as HTML. Watch Example 4.

+

Level 4 - Taking Input: Alright, that's cool, + but what really makes things interesting is when you start asking + the user for information. How about a template for highlighting text + in a color of the user's choice? + Watch Example 5.

+

As you can see in Example 5, to ask for user input you just need + to fill out a row in the Template Variables grid. The Variable + Name is the name you will use to reference the value in your + template—it must be a valid C# identifier. The Data Type + affects both the type of that variable (Integer will be an int, + Boolean will be a bool, etc.) and the appearance of the + input dialog. The Label is the "friendly name" that will be + displayed to the user in the input dialog.

+

Basic Syntax

+

Templates are primarily composed of HTML. You can embed C# + statements using <% and %>. You can output C# expressions using <%= + and %>. For example:

+ <% string currentTime = DateTime.Now.ToString("HH:mm:ss"); %>
+ <b><%= currentTime.ToUpper() %></b>
+

Note that expressions are not terminated with a semicolon, as + that would make them a statement. Conversely, statements must be + terminated with semicolon. If you get a confusing compile error when + you try to save your template (like "CS1026: ) expected"), check for + this first.

+

Built-in Functions and Variables

+

In Example 4 above, a function called HtmlDecode + is used. That’s one of several built-in functions available to templates. + The complete list follows:

+
    +
  • HtmlEncode(string)
  • +
  • HtmlAttributeEncode(string)
  • +
  • HtmlDecode(string)
  • +
  • UrlEncode(string)
  • +
  • UrlPathEncode(string)
  • +
  • UrlDecode(string)
  • +
+

These pass straight through to the + + corresponding methods on HttpUtility.

+

There’s also one built-in string variable, _selection. If + the user has anything selected when the template is inserted, the HTML + of the selection will be assigned to this variable (requires Windows + Live Writer Beta 2 or later).

+

Sharing Templates

+

Templates are stored as .wlwtemplate files, in your Application + Data\WLWTemplates directory. You can e-mail these files to anyone + who has the plugin installed—simply double-clicking the file will + bring up a template installation prompt.

+

You can see the same prompt yourself by clicking on any of the + samples below.

+

Samples

+

If you have the plugin installed, clicking on a link below will + install the template.

+

Abbreviation: + Creates an abbreviation that shows a definition on mouse hover. + Example: WLW +
+ HTMLize: Takes selected + text and HTML-decodes it (as seen in the + Example 4 video).
+ Repeat: Repeats a string + multiple times.
+

+
+
+
+ + + + diff --git a/doc/web/screencasts/level1.swf b/doc/web/screencasts/level1.swf new file mode 100644 index 0000000..f0e4d09 Binary files /dev/null and b/doc/web/screencasts/level1.swf differ diff --git a/doc/web/screencasts/level2.swf b/doc/web/screencasts/level2.swf new file mode 100644 index 0000000..ab485e2 Binary files /dev/null and b/doc/web/screencasts/level2.swf differ diff --git a/doc/web/screencasts/level3.swf b/doc/web/screencasts/level3.swf new file mode 100644 index 0000000..607f751 Binary files /dev/null and b/doc/web/screencasts/level3.swf differ diff --git a/doc/web/screencasts/level3a.swf b/doc/web/screencasts/level3a.swf new file mode 100644 index 0000000..6cd2678 Binary files /dev/null and b/doc/web/screencasts/level3a.swf differ diff --git a/doc/web/screencasts/level4.swf b/doc/web/screencasts/level4.swf new file mode 100644 index 0000000..83c23fe Binary files /dev/null and b/doc/web/screencasts/level4.swf differ diff --git a/doc/web/screencasts/level4a.swf b/doc/web/screencasts/level4a.swf new file mode 100644 index 0000000..42c8ec6 Binary files /dev/null and b/doc/web/screencasts/level4a.swf differ diff --git a/doc/web/screencasts/live search.swf b/doc/web/screencasts/live search.swf new file mode 100644 index 0000000..bfc4472 Binary files /dev/null and b/doc/web/screencasts/live search.swf differ diff --git a/doc/web/templates/Abbreviation.wlwtemplate b/doc/web/templates/Abbreviation.wlwtemplate new file mode 100644 index 0000000..89a5e20 --- /dev/null +++ b/doc/web/templates/Abbreviation.wlwtemplate @@ -0,0 +1,8 @@ + + \ No newline at end of file diff --git a/doc/web/templates/HTMLize.wlwtemplate b/doc/web/templates/HTMLize.wlwtemplate new file mode 100644 index 0000000..cda423f --- /dev/null +++ b/doc/web/templates/HTMLize.wlwtemplate @@ -0,0 +1,5 @@ + + \ No newline at end of file diff --git a/doc/web/templates/Repeat.wlwtemplate b/doc/web/templates/Repeat.wlwtemplate new file mode 100644 index 0000000..2819bbc --- /dev/null +++ b/doc/web/templates/Repeat.wlwtemplate @@ -0,0 +1,10 @@ + + \ No newline at end of file diff --git a/license.txt b/license.txt new file mode 100644 index 0000000..b33fbd9 --- /dev/null +++ b/license.txt @@ -0,0 +1,32 @@ +Microsoft Permissive License (Ms-PL) v1.1 +Microsoft Permissive License (Ms-PL) + +This license governs use of the accompanying software. If you use the software, you accept this license. If you do not accept the license, do not use the software. + +1. Definitions + +The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning here as under U.S. copyright law. + +A "contribution" is the original software, or any additions or changes to the software. + +A "contributor" is any person that distributes its contribution under this license. + +"Licensed patents" are a contributor's patent claims that read directly on its contribution. + +2. Grant of Rights + +(A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution or any derivative works that you create. + +(B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution in the software or derivative works of the contribution in the software. + +3. Conditions and Limitations + +(A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks. + +(B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your patent license from such contributor to the software ends automatically. + +(C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution notices that are present in the software. + +(D) If you distribute any portion of the software in source code form, you may do so only under this license by including a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or object code form, you may only do so under a license that complies with this license. + +(E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a particular purpose and non-infringement. \ No newline at end of file