-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added world and texture pack support, moved files to releases
- Loading branch information
1 parent
03858b5
commit 2d610b6
Showing
8 changed files
with
534 additions
and
302 deletions.
There are no files selected for viewing
Binary file not shown.
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 |
---|---|---|
@@ -1,7 +1,9 @@ | ||
# CurseGraph | ||
|
||
This small application creates a background process in SystemTray (On Windows, its the small icon bar on bottom right) and tracks and records your mods total downloads every 15 minutes. By default, my mods are added, but you can press "Remove" to remove them and "Add a Mod" in main menu to add a new mod. Files are saved in C:/Users/username/LatMod/CurseGraph/, formatted in Json | ||
This small application creates a background process in SystemTray (On Windows, its the small icon bar on bottom right) and tracks and records your projects total downloads every 15 minutes. By default, "LatCoreMC", "Tinker's Construct" and "Mine & Blade: Battlegear 2" are added, but you can press "Remove" to remove them and "Add" in main menu to add a new project. Files are saved in C:/Users/username/LatMod/CurseGraph/, formatted in Json | ||
|
||
Valid ModIDs are "224778-latcoremc" or "tinkers-construct" (the ending of your Curse project's link). Older projects dont have the number. | ||
Valid ProjectIDs are "224778-latcoremc" or "tinkers-construct" (the ending of your Curse project's link). Older projects don't have the number. (It's still a mystery, maybe someone can explain this to me) | ||
|
||
This is still WIP for MacOSX, you can still doubleclick to open Graph selector, but you have to edit ModIDs in /user home/CurseGraph/mods.json | ||
This is still WIP for MacOSX, you can still doubleclick to open Graph selector, but you have to edit ProjectIDs in /user home/CurseGraph/projects.json | ||
|
||
Get latest version here: https://github.com/LatvianModder/CurseGraph/releases |
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,98 @@ | ||
package latmod.cursegraph; | ||
|
||
import java.util.Map; | ||
|
||
import com.google.gson.annotations.Expose; | ||
|
||
public class Curse | ||
{ | ||
public static enum Type | ||
{ | ||
MOD("mc-mods", "Mod"), | ||
TEX_PACK("texture-packs", "Texture Pack"), | ||
WORLD("worlds", "World"); | ||
|
||
public static final Type[] VALUES = values(); | ||
public final String ID; | ||
public final String name; | ||
|
||
Type(String s, String s1) | ||
{ ID = s; name = s1; } | ||
|
||
public static Type get(String s) | ||
{ | ||
for(Type t : VALUES) | ||
if(s.equals(t.ID)) return t; | ||
return null; | ||
} | ||
|
||
public String toString() | ||
{ return ID; } | ||
} | ||
|
||
public static class Project | ||
{ | ||
public String modID; | ||
|
||
@Expose public Integer typeID; | ||
@Expose public String title; | ||
@Expose public String game; | ||
@Expose public String category; | ||
@Expose public String url; | ||
@Expose public String thumbnail; | ||
@Expose public String[] authors; | ||
@Expose public Map<String, Integer> downloads; | ||
@Expose public Integer favorites; | ||
@Expose public Integer likes; | ||
@Expose public String updated_at; | ||
@Expose public String created_at; | ||
@Expose public String project_url; | ||
@Expose public String release_type; | ||
@Expose public String license; | ||
@Expose public Version download; | ||
@Expose public Map<String, Version[]> versions; | ||
|
||
public String toString() | ||
{ return modID; } | ||
|
||
public int hashCode() | ||
{ return toString().hashCode(); } | ||
|
||
public boolean equals(Object o) | ||
{ return o.toString().equals(toString()); } | ||
|
||
public int getTotalDownloads() | ||
{ | ||
int i = downloads.get("total") + 0; | ||
|
||
if(i == -1) return 0; | ||
|
||
if(i == 0) | ||
{ | ||
for(String s : versions.keySet()) | ||
{ | ||
for(Version v : versions.get(s)) | ||
i += v.downloads.intValue(); | ||
} | ||
|
||
if(i == 0) { i = -1; return 0; } | ||
} | ||
|
||
return i; | ||
} | ||
|
||
public Type getType() | ||
{ return Type.VALUES[typeID]; } | ||
} | ||
|
||
public static class Version | ||
{ | ||
@Expose public Integer id; | ||
@Expose public String url; | ||
@Expose public String name; | ||
@Expose public String type; | ||
@Expose public String version; | ||
@Expose public Integer downloads; | ||
@Expose public String created_at; | ||
} | ||
} |
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.