Skip to content

Releases: vexx32/PSWordCloud

PSWordCloud v4.0.0

14 Sep 02:10
Compare
Choose a tag to compare

TL;DR: Everything should work a ton better, but custom scaling you've maybe been applying to make up for insufficiencies in the auto-scaling will need to be re-evaluated.

Breaking Changes

  • Removed the -Words alias (it was an alias for -InputObject); it was far too similar to -WordSizes which was a completely separate parameter in a different parameter set.
  • Adjustments to sizing calculations; automatic scaling should be much more consistent.
    • With this change, existing usages that made use of -WordScale to adjust the size of the final cloud will very likely need to be re-evaluated and adjusted accordingly.
    • There should be fewer and more predictable cases where you might need to adjust the automatic scaling, but if you have larger scaling values used to accommodate previous versions' inability to scale properly, you will probably see those calls start to skip a lot of words. Start with the default value of 1 and work from there.

Changes

  • Cap sizes of shorter words so that they scale more consistently and don't end up taking up half of the cloud, which tended to crowd out smaller but longer words.
  • Replaced Task based threading model with threadpool work item queues so we don't risk thread starvation triggering off thousands of jobs, the thread pool will handle things a bit better for us. A fair amount of speedup in plaintext input processing and less overhead, from initial tests.

Internal-Facing Changes

  • Thorough rework of internal code and massive refactor and cleanup.
    • Many segments were moved to their own classes and everything was made much more usable.
  • Nullability annotations enabled and added throughout the project.

See #79 for further details.

Bug Fixes

  • Thoroughly fixed behaviour when drawing clouds containing only a few words. They should now render consistently and functionally, all the way from just a few words to hundreds.

Commit Log

Hash Subject
bde8a28 ✨ major version bump 3 -> 4
4c1d1ff ✨ Major Rework - Placement, sizing, cleanliness, and speed. (#79)
5446a57 ♻️ Replace references to master branch
160c53c 🎨 ♻️ Major EndProcessing() Refactor (#51)
374154b ♻️ Cleanup IEnumerable Usages (#49)
b6bddaa ♻️ Refactor Word Positioning (#48)
f3a0ea7 📝 Add error messages to transform attributes (#47)
f58e86b 📝 add issue config file
41ba1ca ✅ Update reference in test csproj

v3.2.1 - Fixes for `-AllowOverflow` and placement algorithm

23 Mar 16:11
Compare
Choose a tag to compare

Notable Changes

  • Internal maxRadius value used for word placement takes the actual distance from the centre to the corner of the image by default instead of using janky/questionable math to approximate that.
  • -AllowOverflow now functions correctly, and -WordSize properly allows you to exceed the bounds of the image with the overflow switch enabled.
  • Increased the overflow permitted area multiplier from 1.2 to 1.5.
  • Retry the placement search on failure to find a draw location with a different angle.
    • When using well-defined angle sets like EitherDiagonal (which is the default) it will retry each possible angle in the set before giving up.
    • When using All / AllUpright / AllInverted a random selection of 4-12 possible draw angles are pre-selected per word, and each word can retry its draw operations until it runs out of angles to attempt.

Updates to Dependencies

  • Updated SkiaSharp dependencies.

Commit Log

Hash Name Subject
f1cd496 @vexx32 🔧 Use distance to corner for maxRadius (#46)
47ee65c @dependabot-preview ⬆️ Bump coverlet.msbuild in /PSWordCloud.Tests (#45)
55baa08 @dependabot-preview ⬆️ Bump SkiaSharp.NativeAssets.Linux in /Module (#44)
14da443 @dependabot-preview ⬆️ Bump SkiaSharp from 1.68.0 to 1.68.1.1 in /Module (#43)
8a092c2 @vexx32 🐛 🔧 Overflow Fixes & Retry if a given rotation is unsuitable (#42)

refs/tags/v3.2.1: v3.2.1

23 Mar 16:17
Compare
Choose a tag to compare
:memo: version bump

v3.2.0 - Colors and Collisions!

20 Mar 03:28
0cef592
Compare
Choose a tag to compare

Changes

  • Fixed collisions for -WordBubble mode; bubbles will now refuse to overlap.
  • Includes all X11 colors as standard named colors! *blue* will finally have a decent number of colors to pick from! (Yes, if you weren't aware, you can pick color names for -ColorSet by wildcards and it will use all matching colors; read the help, there's a lot you can do if you need to!)
  • Improved color filtering and selection a lot more.
  • Halved the effective widths of -Stroke values as there wasn't a lot of fine control and it tended to overtake the word completely at values > 3.

Bugfixes

  • Removed the weird transparent color that occasionally cropped up and caused words to look like they weren't rendering.
  • Draw strokes after the bubble and word so that they're all layered correctly.
  • Adjust word trimming regex to trim special characters off the start and ends of words.

Internal Changes

  • Renamed some methods to make them more intuitive.
  • Added a bunch of missing xml doc comments.
  • Moved some methods around a bit so the class layout is more organised.

Commit Log

Hash Subject
dd2886e 🐛 ✨ Fix Collision Detection & Colors for -WordBubble (#41)
c138b33 🚀 Enable Linux tests (#31)

refs/tags/v3.2.0: :memo: version bump

20 Mar 03:33
0cef592
Compare
Choose a tag to compare
+ github actually converted the file to utf8

v3.1.0 `-WordBubble` and Usability Improvements

18 Mar 05:39
Compare
Choose a tag to compare

New Features

-WordBubble Parameter

  • Added a -WordBubble parameter. Resolves #40. Currently available bubble shapes:
    • Square
    • Rectangle
    • Circle
    • Oval

Note: Using Square or Circle bubble shapes inflates the area each individual word takes up. If you start getting warnings about words being skipped due to this, you can set a smaller -WordScale value to shrink things down a bit. The standard -WordScale is 1, but I found I sometimes needed to scale down to 0.6 or so to keep everything fitting in nicely.

Bugfixes & Enhancements

Viewbox

  • The SkiaSharp libraries do not add their own viewbox attributes, but we have sufficient information to add this information ourselves. This modifies the method SaveSvgData() to automatically check for the attribute, and insert it if it is missing.
  • This attribute is used by browsers in order to help scale the SVG correctly and should ensure output SVGs are resizeable.

Color Contrast Adjustments

  • Added some rudimentary algorithms to try to use distinctive colors in the cloud as much as is possible.
  • These will mostly be used to ensure word colors are distinct from the background color, and from their bubble colors (if -WordBubble is being used).

Error Handling

  • Gracefully exit if there is simply no input.
  • Ignore errors that may come from calling Content.Clear() on the provided path; not all PSProviders support the API, and it is often not strictly necessary.

Commit Log

Hash Subject
bf221ed 🐛 Fix reference to viewbox
88d7775 ✨ Changes for 3.1.0 (#39)

refs/tags/v3.1.0: v3.1.0

18 Mar 05:45
Compare
Choose a tag to compare
:bug: Fix reference to viewbox

v3.0.1 Debug Messages & Refactoring

17 Mar 01:29
Compare
Choose a tag to compare

Notable Changes

  • Added some debug messages to help diagnose issues in some environments.
  • Build the module for netcoreapp3.1 to match PS7's build target.
  • Refactoring to use some .NET Core 3.x / newer C# features.

Commit Log

Hash Subject
33dafbf ♻️ 💬 Cleanup & Add WriteDebug() Messages (#38)
8fb4d6b 📝 add CODEOWNERS
04339e6 ♻️ 🚀 Build for netcoreapp3.1 (#37)
f1487c0 📝 add FUNDING.yml

refs/tags/v3.0.1: v3.0.1

17 Mar 01:27
Compare
Choose a tag to compare
:memo: version bump

v3.0.0 - Cross-Platform!

16 Mar 05:01
Compare
Choose a tag to compare

Notable Changes

  • The minimum version of PowerShell the module can be imported in is v7. See #33 for why I added this restriction.
  • New-WordCloud should now work on Unix systems. Give it a spin, and let me know if there are any issues!

New Features

Provider-Agnostic Output

-Path will now accept and successfully utilise any PSProvider path, provided that PSProvider supports the Set-Content API. In other words, this: $stuff | New-WordCloud -Path variable:image will actually create or overwrite the $image variable for you and populate it with SVG data.

This essentially means you can write the image data anywhere that PowerShell supports writing with Set-Content, including any custom providers that support it.

New -WordSizes Parameter

Added a -WordSizes parameter that takes a dictionary of words and their relative sizes.
For example:

New-WordCloud -WordSizes @{
    Apple = 10
    Orange = 20
    Banana = 15
    Pomegranate = 12
}

Words are scaled as a % of the largest specified word size, and the cmdlet does its best to fit them all into the given image size.

Bugfixes & Improvements

  • Improved algorithm for cases where New-WordCloud had some issues fitting words in if there were too few words and the words were of too similar size.
  • Improvements to the word splitting & trimming algorithms so we don't get words like 'new when we should be trimming those off.
  • Improvements to the build pipeline & module build script.
  • Added some sanity-check pester tests to the build pipeline.
  • Attempt to convert input objects of other types to string. This isn't a full Out-String (if anyone knows a straightforward way to utilise that API from C# that doesn't involve spinning up subshells just for that, let me know) so it will generally just be using the ToString() conversion for the object.

Commit Log

Hash Subject
8074597 📝 Update version number
4122d6a 🚀 Enable Mac OS tests (#35)
a3434e1 ♻️ Add -WordSizes parameter and cleanup (#34)
998c162 🐛 ✨ 🔧 Miscellaneous Tweaks for v3.0 Release (#32)
d647e9e ⬆️ Set minimum version to PS7 (#33)
7f38295 🚀 Fix CI/CD and Module Build (#30)
bac6966 🚧 Load module DLL directly (#26)
8b7e8c3 📝 Remove FileList entry from manifest