-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
068a509
commit 12ab1c6
Showing
16 changed files
with
868 additions
and
960 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
Large diffs are not rendered by default.
Oops, something went wrong.
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,12 @@ | ||
JEI Old to JEI New | ||
|
||
Updated: | ||
Just Enough Items (JEI) (went from jei_1.12.2-4.12.0.215.jar to jei_1.12.2-4.12.1.217.jar): | ||
4.12.1: | ||
* Small optimizations to startup time | ||
* v4.12.1 | ||
* Fix #1355 Stopwatch is not reset when measuring plugin method execution time | ||
* Update uk_ua.lang (#1348) | ||
* Fix broken info recipes | ||
|
||
* Generated using https://github.com/TheRandomLabs/ChangelogGenerator (1.11) |
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,8 @@ | ||
JEI Old to JEI New | ||
|
||
Updated: | ||
Just Enough Items (JEI) (went from jei_1.12.2-4.12.0.215.jar to jei_1.12.2-4.12.1.217.jar): | ||
View changelog at: | ||
https://minecraft.curseforge.com/projects/jei/files/2621449 | ||
|
||
* Generated using https://github.com/TheRandomLabs/ChangelogGenerator (1.11) |
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
91 changes: 91 additions & 0 deletions
91
src/main/java/com/therandomlabs/changeloggenerator/ActuallyAdditionsHandler.java
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,91 @@ | ||
package com.therandomlabs.changeloggenerator; | ||
|
||
import java.io.IOException; | ||
import java.util.LinkedHashMap; | ||
import java.util.List; | ||
import java.util.Map; | ||
import com.therandomlabs.curseapi.CurseException; | ||
import com.therandomlabs.curseapi.file.CurseFile; | ||
import com.therandomlabs.curseapi.minecraft.comparison.ModListComparer; | ||
import com.therandomlabs.curseapi.minecraft.comparison.ModSpecificChangelogHandler; | ||
import com.therandomlabs.curseapi.project.CurseProject; | ||
import com.therandomlabs.curseapi.util.Documents; | ||
import com.therandomlabs.utils.collection.ImmutableList; | ||
import com.therandomlabs.utils.io.IOUtils; | ||
import com.therandomlabs.utils.misc.StringUtils; | ||
|
||
public final class ActuallyAdditionsHandler implements ModSpecificChangelogHandler { | ||
public static final ActuallyAdditionsHandler INSTANCE = new ActuallyAdditionsHandler(); | ||
public static final String CHANGELOG_URL = "https://raw.githubusercontent.com/Ellpeck/" + | ||
"ActuallyAdditions/master/update/changelog.md"; | ||
|
||
private ActuallyAdditionsHandler() {} | ||
|
||
@Override | ||
public boolean handlesMod(CurseProject project) { | ||
return project.id() == 228404; | ||
} | ||
|
||
@Override | ||
public List<String> getURLsToPreload(CurseFile oldFile, CurseFile newFile) | ||
throws CurseException { | ||
return new ImmutableList<>(CHANGELOG_URL); | ||
} | ||
|
||
@Override | ||
public Map<String, String> getChangelogs(CurseFile oldFile, CurseFile newFile, boolean urls) | ||
throws CurseException, IOException { | ||
final Map<String, String> changelog = new LinkedHashMap<>(); | ||
|
||
if(urls) { | ||
changelog.put(ModListComparer.VIEW_CHANGELOG_AT, CHANGELOG_URL); | ||
return changelog; | ||
} | ||
|
||
String[] split = oldFile.name().split("-"); | ||
String oldVersion = split[1] + '-' + split[2]; | ||
oldVersion = StringUtils.removeLastChars(oldVersion, 4); | ||
|
||
split = newFile.name().split("-"); | ||
String newVersion = split[1] + '-' + split[2]; | ||
newVersion = StringUtils.removeLastChars(newVersion, 4); | ||
|
||
final String[] lines = | ||
StringUtils.splitNewline(Documents.read(CHANGELOG_URL)); | ||
final StringBuilder entry = new StringBuilder(); | ||
String version = null; | ||
|
||
boolean changelogStarted = false; | ||
|
||
for(String line : lines) { | ||
if(line.startsWith("# ")) { | ||
if(changelogStarted) { | ||
changelog.put(version, entry.toString()); | ||
entry.setLength(0); | ||
} | ||
|
||
version = line.substring(2); | ||
|
||
if(!changelogStarted && version.equals(newVersion)) { | ||
changelogStarted = true; | ||
} | ||
|
||
if(version.equals(oldVersion)) { | ||
break; | ||
} | ||
|
||
continue; | ||
} | ||
|
||
if(line.isEmpty()) { | ||
continue; | ||
} | ||
|
||
if(changelogStarted) { | ||
entry.append(line).append(IOUtils.LINE_SEPARATOR); | ||
} | ||
} | ||
|
||
return changelog; | ||
} | ||
} |
75 changes: 75 additions & 0 deletions
75
src/main/java/com/therandomlabs/changeloggenerator/BiomesOPlentyHandler.java
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,75 @@ | ||
package com.therandomlabs.changeloggenerator; | ||
|
||
import java.io.IOException; | ||
import java.util.LinkedHashMap; | ||
import java.util.Map; | ||
import com.therandomlabs.curseapi.CurseException; | ||
import com.therandomlabs.curseapi.file.CurseFile; | ||
import com.therandomlabs.curseapi.minecraft.comparison.ModListComparer; | ||
import com.therandomlabs.curseapi.minecraft.comparison.ModSpecificChangelogHandler; | ||
import com.therandomlabs.curseapi.project.CurseProject; | ||
import com.therandomlabs.utils.io.IOUtils; | ||
import com.therandomlabs.utils.misc.StringUtils; | ||
|
||
public final class BiomesOPlentyHandler implements ModSpecificChangelogHandler { | ||
public static final BiomesOPlentyHandler INSTANCE = new BiomesOPlentyHandler(); | ||
|
||
private BiomesOPlentyHandler() {} | ||
|
||
@Override | ||
public boolean handlesMod(CurseProject project) { | ||
return project.id() == 220318; | ||
} | ||
|
||
@Override | ||
public Map<String, String> getChangelogs(CurseFile oldFile, CurseFile newFile, boolean urls) | ||
throws CurseException, IOException { | ||
final Map<String, String> changelog = new LinkedHashMap<>(); | ||
|
||
if(urls) { | ||
changelog.put( | ||
ModListComparer.VIEW_CHANGELOG_AT, | ||
ModListComparer.getChangelogURLString(newFile, true) | ||
); | ||
return changelog; | ||
} | ||
|
||
final String[] split = oldFile.name().split("-"); | ||
final String oldVersion = split[1] + '-' + split[2]; | ||
|
||
final String[] lines = StringUtils.splitNewline(newFile.changelog(true)); | ||
|
||
final StringBuilder entry = new StringBuilder(); | ||
|
||
String version = null; | ||
|
||
for(int i = 1; i < lines.length; i++) { | ||
final String line = lines[i]; | ||
|
||
if(line.startsWith("Build ")) { | ||
version = StringUtils.removeLastChar(line.split(" ")[1]); | ||
continue; | ||
} | ||
|
||
if(version == null) { | ||
continue; | ||
} | ||
|
||
if(version.equals(oldVersion)) { | ||
break; | ||
} | ||
|
||
if(line.isEmpty()) { | ||
changelog.put(version, entry.toString()); | ||
entry.setLength(0); | ||
version = null; | ||
} | ||
|
||
if(version != null) { | ||
entry.append(line.substring(1)).append(IOUtils.LINE_SEPARATOR); | ||
} | ||
} | ||
|
||
return changelog; | ||
} | ||
} |
73 changes: 73 additions & 0 deletions
73
src/main/java/com/therandomlabs/changeloggenerator/Bre2elHandler.java
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,73 @@ | ||
package com.therandomlabs.changeloggenerator; | ||
|
||
import java.io.IOException; | ||
import java.util.LinkedHashMap; | ||
import java.util.Map; | ||
import com.therandomlabs.curseapi.CurseException; | ||
import com.therandomlabs.curseapi.file.CurseFile; | ||
import com.therandomlabs.curseapi.minecraft.comparison.ModListComparer; | ||
import com.therandomlabs.curseapi.minecraft.comparison.ModSpecificChangelogHandler; | ||
import com.therandomlabs.curseapi.project.CurseProject; | ||
import com.therandomlabs.utils.io.IOUtils; | ||
import com.therandomlabs.utils.misc.StringUtils; | ||
|
||
public final class Bre2elHandler implements ModSpecificChangelogHandler { | ||
public static final Bre2elHandler INSTANCE = new Bre2elHandler(); | ||
|
||
private Bre2elHandler() {} | ||
|
||
@Override | ||
public boolean handlesMod(CurseProject project) { | ||
return "bre2el".equals(project.ownerUsername()); | ||
} | ||
|
||
@Override | ||
public boolean isFullChangelogInNewFile(CurseProject project) { | ||
return true; | ||
} | ||
|
||
@Override | ||
public Map<String, String> getChangelogs(CurseFile oldFile, CurseFile newFile, boolean urls) | ||
throws CurseException, IOException { | ||
final Map<String, String> changelog = new LinkedHashMap<>(); | ||
|
||
if(urls) { | ||
changelog.put( | ||
ModListComparer.VIEW_CHANGELOG_AT, | ||
ModListComparer.getChangelogURLString(newFile, true) | ||
); | ||
return changelog; | ||
} | ||
|
||
final String oldVersion = oldFile.name().split("-")[2].replaceAll("\\.jar", ""); | ||
|
||
final String[] lines = StringUtils.splitNewline(newFile.changelog(true)); | ||
final StringBuilder entry = new StringBuilder(); | ||
String version = null; | ||
|
||
for(String line : lines) { | ||
if(line.startsWith("v")) { | ||
if(version != null) { | ||
changelog.put(version, entry.toString()); | ||
entry.setLength(0); | ||
} | ||
|
||
version = line.substring(1); | ||
|
||
if(version.equals(oldVersion)) { | ||
break; | ||
} | ||
|
||
continue; | ||
} | ||
|
||
if(line.isEmpty()) { | ||
continue; | ||
} | ||
|
||
entry.append(line).append(IOUtils.LINE_SEPARATOR); | ||
} | ||
|
||
return changelog; | ||
} | ||
} |
Oops, something went wrong.