Skip to content

Commit

Permalink
Add a progress bar from progressed.io to the progress report
Browse files Browse the repository at this point in the history
  • Loading branch information
rikkit committed Oct 26, 2014
1 parent 28259b5 commit 303f27e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions PROGRESS.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Api Progress
# Api Progress ![Progress](http://progressed.io/bar/20)

These are all the Last.fm API methods currently available.

- Methods implemented by the [Inflatable Last.fm .NET SDK](https://github.com/inflatablefriends/lastfm) link to the relevant documentation page.
- 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)
Expand Down
7 changes: 4 additions & 3 deletions src/IF.Lastfm.ProgressReport/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ 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.
- Methods implemented by the [Inflatable Last.fm .NET SDK](https://github.com/inflatablefriends/lastfm) link to the relevant documentation page.
- 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)
Expand Down Expand Up @@ -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))
{
Expand Down

0 comments on commit 303f27e

Please sign in to comment.