jasonsalas
IS-IT--Management
Hi everyone,
I wrote this script an as intranet app to help my reporters calculate the read-time for their stories. We then use the articles to publish to our site online.
It consists of (1) a form which gathers information about the REPORTER, TITLE, and STORY CONTENT, and then assigns the read-time for the story.
It also works to serve as a conversion tool for speechwriting.
Have fun!
================ SCRIPT.HTM ===========================
<HTML>
<HEAD>
<TITLE>Compose a story</TITLE>
</HEAD>
<BODY>
<h1> Enter the information about your story:
<HR> </h1>
<form action=timecode.asp method=post>
<P> </P>
<P><h3><STRONG>Author:<BR></STRONG>
<!- change the names here to reflect your own team -->
<select size="1" name="author">
<option
selected>Name1</option>
<option>Name2</option>
<option>Name3</option>
<option>Name4</option>
<option>Name5</option>
<option>Name6</option>
<option>Name7</option>
</select></h3>
<P></P>
<P><h3><STRONG> Slug:<BR></STRONG>
<input name=title style="LEFT: 170px; TOP: 88px" size="20"> </h3>
<P></P><P>
<STRONG><h3>Input your script body:</STRONG><br><TEXTAREA style="WIDTH: 550px; HEIGHT: 364px" name=script rows=17 cols=45 size="60"></TEXTAREA></H3><P>
<INPUT type="submit" value="Publish your script">
<INPUT type="reset" value="Clear and start over">
</form></P>
</BODY>
</HTML>
================ TIMECODE.ASP =========================
<%@ Language=VBScript %>
<HTML><HEAD><title>Timecode for this story</title>
<font face=Arial align="center">
<h1>Title: <%= Request.Form("title"%></font></h1><br>
<h1>Author: <%= Request.Form("author"%></font></h1><br>
<%
Dim strScript, TimeMultiplier, InMinutes
strScript = Request.Form("script"
TimeMultiplier = 4 ' Multiplier constant
ReadTime = Len(strScript) * TimeMultiplier
InMinutes = ReadTime/60 ' Converts number of characters to total seconds
' ************************************************************
' Time conversion script which converts the variable InMinutes
' to [MINUTE(s):SECOND(s)] expression. ************************************************************
Dim ConvertToMinutes
Dim ConvertToSeconds
ConvertToMinutes = FormatNumber((InMinutes/60),0,-1)
ConvertToSeconds = (FormatNumber(InMinutes,0,-1,0,-1)) - ConvertToMinutes*60
Response.Write "<h2>Read-time: " & "<font face=Verdana color=tan size=5>" & ConvertToMinutes & ":" & ConvertToSeconds & "</font></h2>"
%>
<P><font size=5>Here again is your script:</font><br>
<h3><%= strScript %></h3><br>
<hr>
</BODY></HTML>
I wrote this script an as intranet app to help my reporters calculate the read-time for their stories. We then use the articles to publish to our site online.
It consists of (1) a form which gathers information about the REPORTER, TITLE, and STORY CONTENT, and then assigns the read-time for the story.
It also works to serve as a conversion tool for speechwriting.
Have fun!
================ SCRIPT.HTM ===========================
<HTML>
<HEAD>
<TITLE>Compose a story</TITLE>
</HEAD>
<BODY>
<h1> Enter the information about your story:
<HR> </h1>
<form action=timecode.asp method=post>
<P> </P>
<P><h3><STRONG>Author:<BR></STRONG>
<!- change the names here to reflect your own team -->
<select size="1" name="author">
<option
selected>Name1</option>
<option>Name2</option>
<option>Name3</option>
<option>Name4</option>
<option>Name5</option>
<option>Name6</option>
<option>Name7</option>
</select></h3>
<P></P>
<P><h3><STRONG> Slug:<BR></STRONG>
<input name=title style="LEFT: 170px; TOP: 88px" size="20"> </h3>
<P></P><P>
<STRONG><h3>Input your script body:</STRONG><br><TEXTAREA style="WIDTH: 550px; HEIGHT: 364px" name=script rows=17 cols=45 size="60"></TEXTAREA></H3><P>
<INPUT type="submit" value="Publish your script">
<INPUT type="reset" value="Clear and start over">
</form></P>
</BODY>
</HTML>
================ TIMECODE.ASP =========================
<%@ Language=VBScript %>
<HTML><HEAD><title>Timecode for this story</title>
<font face=Arial align="center">
<h1>Title: <%= Request.Form("title"%></font></h1><br>
<h1>Author: <%= Request.Form("author"%></font></h1><br>
<%
Dim strScript, TimeMultiplier, InMinutes
strScript = Request.Form("script"
TimeMultiplier = 4 ' Multiplier constant
ReadTime = Len(strScript) * TimeMultiplier
InMinutes = ReadTime/60 ' Converts number of characters to total seconds
' ************************************************************
' Time conversion script which converts the variable InMinutes
' to [MINUTE(s):SECOND(s)] expression. ************************************************************
Dim ConvertToMinutes
Dim ConvertToSeconds
ConvertToMinutes = FormatNumber((InMinutes/60),0,-1)
ConvertToSeconds = (FormatNumber(InMinutes,0,-1,0,-1)) - ConvertToMinutes*60
Response.Write "<h2>Read-time: " & "<font face=Verdana color=tan size=5>" & ConvertToMinutes & ":" & ConvertToSeconds & "</font></h2>"
%>
<P><font size=5>Here again is your script:</font><br>
<h3><%= strScript %></h3><br>
<hr>
</BODY></HTML>