-
-
Notifications
You must be signed in to change notification settings - Fork 344
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #95 from pjf/ks2ckanfixes
Added download_size field.
- Loading branch information
Showing
18 changed files
with
278 additions
and
9 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
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,11 @@ | ||
{ | ||
"spec_version" : 1, | ||
"identifier" : "CrewFiles", | ||
"$kref" : "#/ckan/kerbalstuff", | ||
"install" : [ | ||
{ | ||
"file" : "CrewFiles/GameData/CrewFiles", | ||
"install_to" : "GameData" | ||
} | ||
] | ||
} |
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,28 @@ | ||
{ | ||
"spec_version": 1, | ||
"identifier": "FerramAerospaceResearch", | ||
"$kref" : "#/ckan/kerbalstuff", | ||
"license" : "GPL-3.0", | ||
"release_status" : "stable", | ||
"comment" : "Setting to *no* github releases so the code doesn't try to confuse NEAR with FAR", | ||
"resources" : { | ||
"github" : { | ||
"url" : "https://github.com/ferram4/Ferram-Aerospace-Research", | ||
"releases" : false | ||
} | ||
}, | ||
"depends" : [ { "name" : "ModuleManager" } ], | ||
"install" : [ | ||
{ | ||
"file" : "GameData/FerramAerospaceResearch", | ||
"install_to" : "GameData" | ||
}, | ||
{ | ||
"file" : "Ships", | ||
"install_to" : "Ships", | ||
"optional" : true, | ||
"description" : "FAR example craft" | ||
} | ||
|
||
] | ||
} |
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,6 @@ | ||
The BootKAN are CKAN fragments that exist for mods that will support | ||
the CKAN, but haven't yet released fragments in their own distributions | ||
yet. | ||
|
||
It allows us to boot up the CKAN, using bots to generate metadata, but | ||
without requiring everyone make a new release of their mods. |
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,19 @@ | ||
{ | ||
"spec_version" : 1, | ||
"identifier" : "RemoteTech", | ||
"$kref" : "#/ckan/kerbalstuff", | ||
"license" : "restricted", | ||
"release_status" : "stable", | ||
"resources" : { | ||
"github" : { | ||
"url" : "https://github.com/RemoteTechnologiesGroup/RemoteTech" | ||
} | ||
}, | ||
"depends": [ { "name" : "ModuleManager" } ], | ||
"install" : [ | ||
{ | ||
"file" : "GameData/RemoteTech", | ||
"install_to" : "GameData" | ||
} | ||
] | ||
} |
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,20 @@ | ||
{ | ||
"spec_version" : 1, | ||
"identifier" : "kOS", | ||
"$kref" : "#/ckan/kerbalstuff", | ||
"license" : "GPL-3.0", | ||
"release_status" : "stable", | ||
"resources" : { | ||
"manual" : "http://ksp-kos.github.io/KOS_DOC/", | ||
"github" : { | ||
"url" : "https://github.com/KSP-KOS/KOS", | ||
"releases" : true | ||
} | ||
}, | ||
"install" : [ | ||
{ | ||
"file" : "GameData/kOS", | ||
"install_to" : "GameData" | ||
} | ||
] | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
using System; | ||
using Newtonsoft.Json; | ||
using Newtonsoft.Json.Linq; | ||
using Newtonsoft.Json.Converters; | ||
using System.Collections.Generic; | ||
|
||
namespace CKAN | ||
{ | ||
|
||
// With thanks to | ||
// https://stackoverflow.com/questions/18994685/how-to-handle-both-a-single-item-and-an-array-for-the-same-property-using-json-n | ||
|
||
public class JsonSingleOrArrayConverter<T> : JsonConverter | ||
{ | ||
public override bool CanConvert(Type object_type) | ||
{ | ||
return(object_type == typeof(List<T>)); | ||
} | ||
|
||
public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) | ||
{ | ||
JToken token = JToken.Load(reader); | ||
if (token.Type == JTokenType.Array) | ||
{ | ||
return token.ToObject<List<T>>(); | ||
} | ||
return new List<T> { token.ToObject<T>() }; | ||
} | ||
|
||
public override bool CanWrite | ||
{ | ||
get { return false; } | ||
} | ||
|
||
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
} | ||
} | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"comment" : "Here be all the mods we process from KerbalStuff, in identifier => ksid pairs", | ||
"modlist" : { | ||
"CrewFiles" : 39, | ||
"DogeCoinFlag" : 269, | ||
"kOS" : 86, | ||
"FerramAerospaceResearch" : 52, | ||
"RemoteTech" : 134 | ||
} | ||
} |
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
Oops, something went wrong.