Example #1
0
        public string Build(ISetlist setlist)
        {
            StringBuilder reply = new StringBuilder();

            reply.AppendFormat("# {0} {1} @ {2}", setlist.ShowDate, setlist.Location, setlist.Venue);
            reply.AppendLine();
            reply.AppendLine();

            foreach (ISet set in setlist.Sets)
            {
                TimeSpan span    = TimeSpan.FromMilliseconds(set.Duration);
                string   hours   = span.TotalHours >= 1 ? span.ToString("%h") + "h " : string.Empty;
                string   minutes = span.ToString("mm");
                reply.AppendFormat(@"**{0}**: ({1}{2}m)  ", set.Name, hours, minutes);
                foreach (ISong song in set.Songs.OrderBy(s => s.Position))
                {
                    reply.AppendFormat("{0}, ", song.Name);
                }
                reply.Remove(reply.Length - 2, 1);
                reply.AppendLine();
                reply.AppendLine();
            }

            reply.AppendFormat("[phish.net]({0}) | [phish.in]({1}) | [phishtracks]({2})", GetPhishNetUrl(setlist), GetPhishinUrl(setlist), GetPhishTracksUrl(setlist));
            reply.AppendLine();
            reply.AppendLine();
            reply.Append("> _setlist data provided by [phish.in](http://phish.in)_");

            return(reply.ToString());
        }
Example #2
0
 public string GetPhishNetUrl(ISetlist setlist)
 {
     return(string.Format("http://phish.net/setlists/?d={0}", setlist.ShowDate));
 }
Example #3
0
 public string GetPhishinUrl(ISetlist setlist)
 {
     return(string.Format("http://phish.in/{0}", setlist.ShowDate));
 }
Example #4
0
 public string GetPhishTracksUrl(ISetlist setlist)
 {
     return(string.Format("http://phishtracks.com/shows/{0}", setlist.ShowDate));
 }