forked from alexjamesbrown/JoeBlogs
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding command to dump categories as json, fixing wordpress category …
…mapping to allow long integers
- Loading branch information
Showing
24 changed files
with
40,953 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using ManyConsole; | ||
using Newtonsoft.Json; | ||
|
||
namespace JoeBlogs.Console | ||
{ | ||
public class DumpCategories : ConsoleCommand | ||
{ | ||
public DumpCategories() | ||
{ | ||
this.IsCommand("dump-categories", "Writes categories in JSON."); | ||
LoginInfo.AddXmlRpcLogin(this); | ||
} | ||
|
||
public LoginInfo LoginInfo = new LoginInfo(); | ||
|
||
public override int Run(string[] remainingArguments) | ||
{ | ||
var client = LoginInfo.GetWordPressClient(); | ||
|
||
var results = client.GetCategories(); | ||
|
||
System.Console.WriteLine(Newtonsoft.Json.JsonConvert.SerializeObject(results,Formatting.Indented)); | ||
|
||
return 0; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Oops, something went wrong.