Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to define different type of Word Clouds #3

Closed
PrzemyslawKlys opened this issue Dec 17, 2018 · 4 comments
Closed

Ability to define different type of Word Clouds #3

PrzemyslawKlys opened this issue Dec 17, 2018 · 4 comments
Labels
enhancement New feature or request 🏳 help wanted Any and all help is more than welcome

Comments

@PrzemyslawKlys
Copy link

PrzemyslawKlys commented Dec 17, 2018

I thought I would be having some nice output if I would use

function Get-ComputerDisk {
    param(
        $ComputerName = $Env:COMPUTERNAME
    )
    $Data2 = Get-WmiObject win32_DiskDrive -ComputerName $ComputerName | Select Index, Model, Caption, SerialNumber, Description, MediaType, FirmwareRevision, Partitions, @{Expression = {$_.Size / 1Gb -as [int]}; Label = "Total Size(GB)"}, PNPDeviceID
    return $Data2
}

as my data for words. I suspected it may not work :-)

get-clipboard | New-WordCloud -Path wordcloud.png -FontFamily Georgia

I kept waiting for minutes and it didn't do anything :-) What I actually wanted is to create some nice output for blogs pictures, especially for featured photo. It takes a lot of effort to create a good blog post and it's even harder to maintain quality photos for Featured Photos so that it doesn't look like a complete trash.

What I was looking to create was something like this:

image

It would be so cool if this project could generate pictures like that. Where it would take some PowerShell code or another type of code and mix it up in colors and produce nice looking featured picture with chosen size.

I imagine this may be a bit out of the scope of this project thou ;-)

Something like this - would be cool too

image

Or this:

image

@PrzemyslawKlys PrzemyslawKlys changed the title Goes into infinity Ability to define different type of Word Clouds Dec 17, 2018
@vexx32
Copy link
Owner

vexx32 commented Jan 12, 2019

Okay, so this is a lot to think about at once @PrzemyslawKlys. Imma break it out into parts:

Allowing word rotations

Frankly, can't believe I didn't think of this sooner. Should have had better model images, I guess! I'll look into adding this!

Arbitrary object input

I think this is what you're asking, right? Pipe in random streams of objects at get usable output for the word cloud?

I think the most pragmatic solution would be to simply take whatever the console would render and attempt to make that work by sending it through Out-String to get the string representation. In fact, you can do that already, but it would be nice if this just handled it.

3D rotations and filters

3D rotations should be possible using the .NET classes, but I've no idea if they actually are. Will have to research.

I'm pretty sure I've seen filters and can experiment there, though.

I'll mark this as up for grabs in case someone else wants to make any of this happen before I get to it, but I like the ideas a lot!

@vexx32 vexx32 added enhancement New feature or request 🏳 help wanted Any and all help is more than welcome labels Jan 12, 2019
@PrzemyslawKlys
Copy link
Author

Looking forward to all 3. Those would make it really easy for PowerShell Bloggers to get nice pictures for their blog posts. It's hard enough that you have to make the damn thing and then you have to go and play with Photoshop so that the picture is nice enough and isn't just a copy from the web (copyrights?).

You could also add:

Allowing different color background

Black is cool but some of the pictures I added look pretty cool on diff background

Allowing watermark on the background

This would give some protection against image theft

@PrzemyslawKlys
Copy link
Author

PrzemyslawKlys commented Jan 12, 2019

Allowing predefined sizes

This would be fairly easy but you could add predefined sizes (you know facebook, twitter and other social media have their own size for best image size).

And last... I guess I should split this all into separate issues ?

@vexx32
Copy link
Owner

vexx32 commented Jan 12, 2019

Different colour backgrounds is exposed as a parameter already. You can also ask it for a transparent background and layer it on whatever.

That said, being able to pass in a background image in is pretty trivial with these methods, so definitely should be a thing! Watermarks... Have to think about how I'd do that. But probably doable!

Predefined image sizes are a thing, you can press tab after specifying the size parameter to see the predefined sizes tab complete for you. If you know of any I'm missing, let me know those and I'll add them!

And yeah, maybe splitting them out into separate issues would be a good idea, just allows us to focus discussion on a single topic and keep track of everything, so we don't miss anything. If you could put an issue in for each, that'd be much appreciated! 😄

vexx32 added a commit that referenced this issue Feb 18, 2019
# This is the 1st commit message:

:sparkles: add lock function

# This is the commit message #2:

:construction: add private members and functions

# This is the commit message #3:

:construction: remove unused open statements
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request 🏳 help wanted Any and all help is more than welcome
Projects
None yet
Development

No branches or pull requests

2 participants