using System.Text;
using PdfService.Models;
namespace PdfService.Utility
{
public static class TemplateGenerator
{
public static string GetHTMLString(Term[] terms)
{
var sb = new StringBuilder();
sb.Append(@"
Tweet Sentiment Analysis
Results for the terms
");
foreach (Term term in terms)
{
string color = "";
if(term.Sentiment < 0.40)
color = "is-danger";
else if(term.Sentiment < 0.60)
color = "is-warning";
else
color = "is-success";
sb.AppendFormat(@"