Skip to content

Commit

Permalink
Added misc files and license, fixed readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Vladekk committed Mar 21, 2016
1 parent 2cec82f commit 6a88f0b
Show file tree
Hide file tree
Showing 17 changed files with 1,687 additions and 0 deletions.
543 changes: 543 additions & 0 deletions BuildProcessTemplates/DefaultTemplate.11.1.xaml

Large diffs are not rendered by default.

602 changes: 602 additions & 0 deletions BuildProcessTemplates/DefaultTemplate.xaml

Large diffs are not rendered by default.

208 changes: 208 additions & 0 deletions BuildProcessTemplates/LabDefaultTemplate.11.xaml

Large diffs are not rendered by default.

76 changes: 76 additions & 0 deletions BuildProcessTemplates/UpgradeTemplate.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
<Activity mc:Ignorable="sad" x:Class="TfsBuild.Process" xmlns="http://schemas.microsoft.com/netfx/2009/xaml/activities" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mtbc="clr-namespace:Microsoft.TeamFoundation.Build.Client;assembly=Microsoft.TeamFoundation.Build.Client" xmlns:mtbw="clr-namespace:Microsoft.TeamFoundation.Build.Workflow;assembly=Microsoft.TeamFoundation.Build.Workflow" xmlns:mtbwa="clr-namespace:Microsoft.TeamFoundation.Build.Workflow.Activities;assembly=Microsoft.TeamFoundation.Build.Workflow" xmlns:mtbwt="clr-namespace:Microsoft.TeamFoundation.Build.Workflow.Tracking;assembly=Microsoft.TeamFoundation.Build.Workflow" xmlns:mtvc="clr-namespace:Microsoft.TeamFoundation.VersionControl.Client;assembly=Microsoft.TeamFoundation.VersionControl.Client" xmlns:mva="clr-namespace:Microsoft.VisualBasic.Activities;assembly=System.Activities" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:sad="http://schemas.microsoft.com/netfx/2009/xaml/activities/presentation" xmlns:sad1="clr-namespace:System.Activities.Debugger;assembly=System.Activities" xmlns:scg="clr-namespace:System.Collections.Generic;assembly=mscorlib" xmlns:this="clr-namespace:TfsBuild;" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<x:Members>
<x:Property Name="ConfigurationFolderPath" Type="InArgument(x:String)" />
<x:Property Name="AgentSettings" Type="InArgument(mtbwa:AgentSettings)" />
<x:Property Name="MSBuildArguments" Type="InArgument(x:String)" />
<x:Property Name="MSBuildPlatform" Type="InArgument(mtbwa:ToolPlatform)" />
<x:Property Name="DoNotDownloadBuildType" Type="InArgument(x:Boolean)" />
<x:Property Name="LogFilePerProject" Type="InArgument(x:Boolean)" />
<x:Property Name="SourcesSubdirectory" Type="InArgument(x:String)" />
<x:Property Name="BinariesSubdirectory" Type="InArgument(x:String)" />
<x:Property Name="TestResultsSubdirectory" Type="InArgument(x:String)" />
<x:Property Name="RecursionType" Type="InArgument(mtvc:RecursionType)" />
<x:Property Name="Verbosity" Type="InArgument(mtbw:BuildVerbosity)" />
<x:Property Name="Metadata" Type="mtbw:ProcessParameterMetadataCollection" />
<x:Property Name="SupportedReasons" Type="mtbc:BuildReason" />
</x:Members>
<this:Process.ConfigurationFolderPath>
<InArgument x:TypeArguments="x:String" />
</this:Process.ConfigurationFolderPath>
<this:Process.AgentSettings>[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 }]</this:Process.AgentSettings>
<this:Process.MSBuildArguments>
<InArgument x:TypeArguments="x:String" />
</this:Process.MSBuildArguments>
<this:Process.MSBuildPlatform>[Microsoft.TeamFoundation.Build.Workflow.Activities.ToolPlatform.Auto]</this:Process.MSBuildPlatform>
<this:Process.DoNotDownloadBuildType>[False]</this:Process.DoNotDownloadBuildType>
<this:Process.LogFilePerProject>[False]</this:Process.LogFilePerProject>
<this:Process.SourcesSubdirectory>
<InArgument x:TypeArguments="x:String" />
</this:Process.SourcesSubdirectory>
<this:Process.BinariesSubdirectory>
<InArgument x:TypeArguments="x:String" />
</this:Process.BinariesSubdirectory>
<this:Process.TestResultsSubdirectory>
<InArgument x:TypeArguments="x:String" />
</this:Process.TestResultsSubdirectory>
<this:Process.RecursionType>[Microsoft.TeamFoundation.VersionControl.Client.RecursionType.OneLevel]</this:Process.RecursionType>
<this:Process.Verbosity>[Microsoft.TeamFoundation.Build.Workflow.BuildVerbosity.Normal]</this:Process.Verbosity>
<this:Process.Metadata>
<mtbw:ProcessParameterMetadataCollection />
</this:Process.Metadata>
<this:Process.SupportedReasons>All</this:Process.SupportedReasons>
<mva:VisualBasic.Settings>Assembly references and imported namespaces serialized as XML namespaces</mva:VisualBasic.Settings>
<Sequence mtbwt:BuildTrackingParticipant.Importance="None">
<Sequence.Variables>
<Variable x:TypeArguments="mtbc:IBuildDetail" Name="BuildDetail" />
</Sequence.Variables>
<mtbwa:GetBuildDetail DisplayName="Get the Build" Result="[BuildDetail]" />
<mtbwa:InvokeForReason DisplayName="Update Build Number for Triggered Builds" Reason="Triggered">
<mtbwa:UpdateBuildNumber BuildNumberFormat="[&quot;$(BuildDefinitionName)_$(Date:yyyyMMdd)$(Rev:.r)&quot;]" DisplayName="Update Build Number" />
</mtbwa:InvokeForReason>
<mtbwa:AgentScope DisplayName="Run On Agent" MaxExecutionTime="[AgentSettings.MaxExecutionTime]" MaxWaitTime="[AgentSettings.MaxWaitTime]" ReservationSpec="[AgentSettings.GetAgentReservationSpec()]">
<mtbwa:AgentScope.Variables>
<Variable x:TypeArguments="x:String" Name="buildDirectory" />
</mtbwa:AgentScope.Variables>
<mtbwa:GetBuildDirectory DisplayName="Get the Build Directory" Result="[buildDirectory]" />
<If Condition="[Not String.IsNullOrEmpty(ConfigurationFolderPath)]" DisplayName="If Not String.IsNullOrEmpty(ConfigurationFolderPath)">
<If.Then>
<mtbwa:TfsBuild BinariesSubdirectory="[BinariesSubdirectory]" BuildDirectory="[buildDirectory]" CommandLineArguments="[MSBuildArguments]" ConfigurationFolderPath="[ConfigurationFolderPath]" DisplayName="Run TfsBuild for Configuration Folder" DoNotDownloadBuildType="[DoNotDownloadBuildType]" LogFilePerProject="[LogFilePerProject]" RecursionType="[RecursionType]" SourcesSubdirectory="[SourcesSubdirectory]" TestResultsSubdirectory="[TestResultsSubdirectory]" ToolPlatform="[MSBuildPlatform]" Verbosity="[Verbosity]" />
</If.Then>
</If>
<If Condition="[BuildDetail.CompilationStatus = Microsoft.TeamFoundation.Build.Client.BuildPhaseStatus.Unknown]" DisplayName="If CompilationStatus = Unknown">
<If.Then>
<mtbwa:SetBuildProperties CompilationStatus="[Microsoft.TeamFoundation.Build.Client.BuildPhaseStatus.Succeeded]" DisplayName="Set CompilationStatus to Succeeded" PropertiesToSet="CompilationStatus" />
</If.Then>
</If>
<If Condition="[BuildDetail.TestStatus = Microsoft.TeamFoundation.Build.Client.BuildPhaseStatus.Unknown]" DisplayName="If TestStatus = Unknown">
<If.Then>
<mtbwa:SetBuildProperties DisplayName="Set TestStatus to Succeeded" PropertiesToSet="TestStatus" TestStatus="[Microsoft.TeamFoundation.Build.Client.BuildPhaseStatus.Succeeded]" />
</If.Then>
</If>
</mtbwa:AgentScope>
<mtbwa:InvokeForReason Reason="CheckInShelveset">
<mtbwa:CheckInGatedChanges DisplayName="Check In Gated Changes" />
</mtbwa:InvokeForReason>
</Sequence>
</Activity>
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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
"<system_drive>:\Users\<username>\Local Settings\Application Data\OpenLiveWriter\app-<wlw_current_version>\plugins\"

or add string entry with path to release to registry
HKEY_CURRENT_USER\SOFTWARE\OpenLiveWriter\PluginAssemblies


Modified for Open Live Writer by Vlad, [email protected]

191 changes: 191 additions & 0 deletions doc/web/index.htm
Original file line number Diff line number Diff line change
@@ -0,0 +1,191 @@
<html>

<head>
<title>Dynamic Template plug-in for Windows Live Writer</title>
<style type="text/css">
body {
font-family: Georgia;
margin: 0;
padding: 0;
padding-bottom: 30px;
}
h1 {
font-family: Arial, Helvetica, sans-serif;
font-size: 16pt;
}
h3 {
font-size: 16pt;
color: #006699;
}
#header * {
margin: 0;
padding: 0;
}
#header {
background-color: #006699;
padding: 15px;
margin-bottom: 30px;
color: white;
}
@media screen {
#header {
padding-left: 100px;
}
#bodice {
padding-left: 100px;
width: 800px;
}
}
#download {
float: right;
background-color: #CCFF99;
padding: 15px;
border: 1px solid #336600;
margin-left: 5px;
}
#download a {
font-weight: bold;
}
.infobox {
padding: 1em;
margin-left: 2em;
margin-right: 2em;
}
.infobox a {
font-weight: bold;
}
.warn {
color: red;
}
.screencast {
display: none;
}
</style>
</head>

<body>

<div class="container">
<div id="header">
<h1>Dynamic Template Plugin for Windows Live Writer</h1>
<p>by Joe Cheng
<script type="text/javascript" language="javascript">
var addr = "joecheng" + "." + "com";
addr = "code@" + addr;
document.write("&lt;");
document.write(addr);
document.write("&gt;");
</script>
</p>
</div>
<div id="bodice">
<div id="download">
<a href="http://www.codeplex.com/wlwtemplate/Release/ProjectReleases.aspx">
Download Now</a><br>
<span style="font-size: 0.8em">from CodePlex</span></div>
<div class="main">
<p><strong>Dynamic Template</strong> is a powerful plugin for Windows
Live Writer. You can use templates to easily insert oft-used snippets
of HTML or text.</p>
<p>Or you can write templates that are powerful enough to be considered
&quot;mini-plugins&quot; 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!</p>
<h3>For example?</h3>
<p><strong>Level 1 - Plain HTML:</strong> Let&#39;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&#39;t want to
have to leave Writer to do it. For this example, imagine you want to
&quot;Powered by Windows Live Writer&quot; at the bottom of your posts.
<a href="screencasts/level1.swf">Watch Example 1.</a> (All videos linked
from this page are very short Flash movies, created using
<a href="http://www.jingproject.com">Jing</a>.)</p>
<p><strong>Level 2 - HTML + Code:</strong> OK, that&#39;s useful, but
it&#39;s been <a href="http://www.codeplex.com/wlwTextTemplate">done
before</a>. 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&#39;re an Engadget blogger, liveblogging the latest Steve Jobs keynote (like
<a href="http://www.engadget.com/2007/06/11/steve-jobs-live-from-wwdc-2007/">
this one</a>). Every second counts, and the time spent inserting the
little timestamp is time wasted. Let&#39;s write a template to automate
that. <a href="screencasts/level2.swf">Watch Example 2.</a></p>
<p><strong>Level 3 - Using Selection:</strong> It&#39;s much easier to
come up with useful scenarios once we introduce the ability to
access what&#39;s currently selected in Windows Live Writer. Just use
the built-in variable <tt>_selection</tt> in your template. This is
incredibly useful for adding HTML formatting that isn&#39;t included
with Windows Live Writer out of the box--for example, small caps.
<a href="screencasts/level3.swf">Watch Example 3.</a> Or here&#39;s a
cool idea: take whatever text you&#39;ve entered into Writer, and treat
it as HTML. <a href="screencasts/level3a.swf">Watch Example 4</a>.</p>
<p><strong>Level 4 - Taking Input:</strong> Alright, that&#39;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&#39;s choice? <a href="screencasts/level4a.swf">
Watch Example 5.</a></p>
<p>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 <em>Variable
Name</em> is the name you will use to reference the value in your
template—it must be a valid C# identifier. The <em>Data Type</em>
affects both the type of that variable (Integer will be an <tt>int</tt>,
Boolean will be a <tt>bool</tt>, etc.) and the appearance of the
input dialog. The <tt>Label</tt> is the &quot;friendly name&quot; that will be
displayed to the user in the input dialog.</p>
<h3>Basic Syntax</h3>
<p>Templates are primarily composed of HTML. You can embed C#
statements using <tt>&lt;%</tt> and <tt>%&gt;</tt>. You can output C# expressions using <tt>&lt;%=</tt>
and <tt>%&gt;</tt>. For example:</p>
<code>&lt;% string currentTime = DateTime.Now.ToString(&quot;HH:mm:ss&quot;); %&gt;<br>
&lt;b&gt;&lt;%= currentTime.ToUpper() %&gt;&lt;/b&gt;</code>
<p>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 &quot;CS1026: ) expected&quot;), check for
this first.</p>
<h3>Built-in Functions and Variables</h3>
<p>In Example 4 above, a function called <tt>HtmlDecode</tt>
is used. That’s one of several built-in functions available to templates.
The complete list follows:</p>
<ul>
<li><tt>HtmlEncode(string)</tt> </li>
<li><tt>HtmlAttributeEncode(string)</tt> </li>
<li><tt>HtmlDecode(string)</tt> </li>
<li><tt>UrlEncode(string)</tt> </li>
<li><tt>UrlPathEncode(string)</tt> </li>
<li><tt>UrlDecode(string)</tt></li>
</ul>
<p>These pass straight through to the
<a href="http://msdn2.microsoft.com/en-us/library/system.web.httputility_methods.aspx">
corresponding methods on HttpUtility</a>.</p>
<p>There’s also one built-in string variable, <tt>_selection</tt>. 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).</p>
<h3>Sharing Templates</h3>
<p>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.</p>
<p>You can see the same prompt yourself by clicking on any of the
samples below.</p>
<h3>Samples</h3>
<p>If you have the plugin installed, clicking on a link below will
install the template.</p>
<p><a href="templates/Abbreviation.wlwtemplate">Abbreviation</a>:
Creates an abbreviation that shows a definition on mouse hover.
Example: <abbr title="Windows Live Writer" style="border-bottom: navy 1px dotted">WLW</abbr>
<br>
<a href="templates/HTMLize.wlwtemplate">HTMLize</a>: Takes selected
text and HTML-decodes it (as seen in the
<a href="screencasts/level3a.swf">Example 4 video</a>).<br>
<a href="templates/Repeat.wlwtemplate">Repeat</a>: Repeats a string
multiple times.<br>
</p>
</div>
</div>
</div>

</body>

</html>
Binary file added doc/web/screencasts/level1.swf
Binary file not shown.
Binary file added doc/web/screencasts/level2.swf
Binary file not shown.
Binary file added doc/web/screencasts/level3.swf
Binary file not shown.
Binary file added doc/web/screencasts/level3a.swf
Binary file not shown.
Binary file added doc/web/screencasts/level4.swf
Binary file not shown.
Binary file added doc/web/screencasts/level4a.swf
Binary file not shown.
Binary file added doc/web/screencasts/live search.swf
Binary file not shown.
8 changes: 8 additions & 0 deletions doc/web/templates/Abbreviation.wlwtemplate
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0"?>
<Template xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Arguments>
<Argument Type="TextString" Label="Abbreviation (e.g. USA)">abbr</Argument>
<Argument Type="TextString" Label="Long form (e.g. United States of America)">full</Argument>
</Arguments>
<Body>&lt;abbr title="&lt;%= full %&gt;" style="border-bottom: 1px dotted navy"&gt;&lt;%= abbr %&gt;&lt;/abbr&gt;</Body>
</Template>
5 changes: 5 additions & 0 deletions doc/web/templates/HTMLize.wlwtemplate
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0"?>
<Template xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Arguments />
<Body>&lt;%= HtmlDecode(_selection) %&gt;</Body>
</Template>
10 changes: 10 additions & 0 deletions doc/web/templates/Repeat.wlwtemplate
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0"?>
<Template xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Arguments>
<Argument Type="TextString" Label="What to say">text</Argument>
<Argument Type="Integer" Label="How many times">times</Argument>
</Arguments>
<Body>&lt;% for (int i = 0; i &lt; times; i++) { %&gt;
&lt;%= text %&gt;
&lt;% } %&gt;</Body>
</Template>
32 changes: 32 additions & 0 deletions license.txt
Original file line number Diff line number Diff line change
@@ -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.

0 comments on commit 6a88f0b

Please sign in to comment.