guo-yong-zhi / WordCloud.jl

word cloud generator in julia
GNU General Public License v3.0
109 stars 2 forks source link

Wordcloud for custom png and texts #16

Closed glanzkaiser closed 2 years ago

glanzkaiser commented 2 years ago

Hi @guo-yong-zhi ,

I am trying to create my own png and words, but it still calling the texts from alice.txt

I have created the .jl in examples directory as well. Is my code is right?

Capture d’écran_2022-08-01_13-43-28

glanzkaiser commented 2 years ago

Solved it, turns out needs permission of super user to create file in package.

freya

guo-yong-zhi commented 2 years ago

You don't need to put anything into package's examples directory. You should put your txt and png on your current work directory, then replace the pkgdir(WordCloud)*"/res/alice.txt" with "./freya.txt" and replace the pkgdir(WordCloud)*"/res/alice_mask.png" with "./Freya.png". It should work.

guo-yong-zhi commented 2 years ago

And the last line runexample(:freya) should be removed.

glanzkaiser commented 2 years ago

I see, we can look for file in current directory, thanks.

guo-yong-zhi commented 2 years ago

exactly.