juraj-hrivnak / Pakku

A multiplatform modpack manager for Minecraft: Java Edition. Create modpacks for CurseForge, Modrinth or both simultaneously.
https://juraj-hrivnak.github.io/Pakku/
European Union Public License 1.2
16 stars 3 forks source link

Add "Updated" section to diff #17

Closed Wxrlds closed 4 days ago

Wxrlds commented 5 days ago

Added a new "Updated" section to the diff command saying which projects were updated and optionally, using --detailed-update to which version.

Also, I've removed the newlines after the ### since IMO it looks better when looking at the plaintext file and the markdown renderer doesn't care about it anyway.

I don't know how or if you want comments inside the code, but I added some as this was somewhat confusing.

This is probably not the prettiest or fastest solution, but I don't have the knowledge on how I would do this instead.

java -jar pakku.jar diff pakku-lock-old.json pakku-lock.json --markdown changes.md --detailed-update

Output looks like this:

Markdown:

### Added
- Carry On
- Thaumcraft

### Removed
- Draconic Evolution

### Updated
- Controlling
- Ender IO
- Inventory Tweaks [1.12 only]

Markdown Diff:

+ Carry On
+ Thaumcraft
- Draconic Evolution
! Controlling
! Ender IO
! Inventory Tweaks [1.12 only] 

Markdown Detailed:

### Added
- Carry On
- Thaumcraft

### Removed
- Draconic Evolution

### Updated
- Controlling-3.0.10.jar    -> Controlling-3.0.12.4.jar
- EnderIO-1.12.2-5.3.70.jar -> EnderIO-1.12.2-5.3.72.jar
- InventoryTweaks-1.63.jar  -> InventoryTweaks-1.64+dev.151.jar

Markdown Detailed Diff:

+ Carry On
+ Thaumcraft
- Draconic Evolution
! Controlling-3.0.10.jar    -> Controlling-3.0.12.4.jar
! EnderIO-1.12.2-5.3.70.jar -> EnderIO-1.12.2-5.3.72.jar
! InventoryTweaks-1.63.jar  -> InventoryTweaks-1.64+dev.151.jar
Wxrlds commented 4 days ago

I hope the nesting is good like that at only two levels deep.

juraj-hrivnak commented 4 days ago

Thank you for contributing!