Add a progress bar from progressed.io to the progress report

This commit is contained in:
Rikki Tooley 2014-10-26 14:47:43 +00:00
parent 28259b58d4
commit 303f27e1b3
2 changed files with 6 additions and 5 deletions

View File

@ -1,4 +1,4 @@
# Api Progress
# Api Progress ![Progress](http://progressed.io/bar/20)
These are all the Last.fm API methods currently available.
@ -6,7 +6,7 @@ These are all the Last.fm API methods currently available.
- Methods ~~marked with strikethrough~~ aren't currently implemented. Pull requests are welcome!
- Methods _marked with an asterisk *_ aren't listed on [the Last.fm documentation](http://www.last.fm/api), so they might not work!
This list is generated by the [ProgressReport](https://github.com/inflatablefriends/lastfm/tree/master/src/IF.Lastfm.ProgressReport) tool in the solution. Last updated on 26 October 2014 14:27
This list is generated by the [ProgressReport](https://github.com/inflatablefriends/lastfm/tree/master/src/IF.Lastfm.ProgressReport) tool in the solution. Last updated on 26 October 2014 14:45
## Album
- [album.getInfo](http://www.last.fm/api/show/album.getInfo)

View File

@ -17,7 +17,7 @@ public class Program
{
public const string API_INTRO_PAGE = "http://www.last.fm/api/intro";
private const string _progressReportIntro = @"# Api Progress
private const string _progressReportIntro = @"# Api Progress ![Progress](http://progressed.io/bar/{0})
These are all the Last.fm API methods currently available.
@ -25,7 +25,7 @@ These are all the Last.fm API methods currently available.
- Methods ~~marked with strikethrough~~ aren't currently implemented. Pull requests are welcome!
- Methods _marked with an asterisk *_ aren't listed on [the Last.fm documentation](http://www.last.fm/api), so they might not work!
This list is generated by the [ProgressReport](https://github.com/inflatablefriends/lastfm/tree/master/src/IF.Lastfm.ProgressReport) tool in the solution. Last updated on {0}
This list is generated by the [ProgressReport](https://github.com/inflatablefriends/lastfm/tree/master/src/IF.Lastfm.ProgressReport) tool in the solution. Last updated on {1}
";
public static void Main(string[] args)
@ -146,7 +146,8 @@ private static string GetApiMethodFromCommandType(Type type)
private static void WriteReport(Dictionary<string, IEnumerable<string>> apiGroup, List<string> allImplemented)
{
var markdownBuilder = new StringBuilder();
markdownBuilder.AppendFormat(_progressReportIntro, DateTime.UtcNow.ToString("f"));
var percent = (((double)allImplemented.Count)/apiGroup.SelectMany(api => api.Value).Count()) * 100;
markdownBuilder.AppendFormat(_progressReportIntro, (int)Math.Floor(percent), DateTime.UtcNow.ToString("f"));
foreach (var group in apiGroup.OrderBy(kv => kv.Key))
{