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

Add option to create svg image with wordcloud_cli #693

Open
varac opened this issue Oct 20, 2022 · 1 comment · May be fixed by #756
Open

Add option to create svg image with wordcloud_cli #693

varac opened this issue Oct 20, 2022 · 1 comment · May be fixed by #756

Comments

@varac
Copy link

varac commented Oct 20, 2022

Description

I'd like to create an svg image with wordcloud_cli, which is currently not possible.

Steps/Code to Reproduce

--imagefile only references PNG image:

❯ wordcloud_cli --help | grep imagefile
                     [--imagefile file] [--fontfile path] [--mask file]
  --imagefile file      file the completed PNG image should be written to

Expected Results

wordcloud_cli should produce images based on the file extension. i.e. if I use --imagefile img.svg, a SVG should get produced.

Actual Results

❯ wordcloud_cli --imagefile img.svg --mask examples/alice_mask.png --text examples/constitution.txt
❯ file img.svg
img.svg: PNG image data, 900 x 900, 8-bit/color RGB, non-interlaced

Versions

❯ python /tmp/f.py 
Linux-5.19.0-76051900-generic-x86_64-with-glibc2.35
Python 3.10.6 (main, Aug 10 2022, 11:40:04) [GCC 11.3.0]
NumPy 1.23.4
matplotlib 3.6.1
Traceback (most recent call last):
  File "/tmp/f.py", line 5, in <module>
    import wordcloud; print("wordcoud", wordcloud.__version__)
ModuleNotFoundError: No module named 'wordcloud'

(I cloned main as of today)

@amueller
Copy link
Owner

amueller commented Jun 6, 2023

I agree, that would be a great feature to have. Pull request welcome!

@boidolr boidolr linked a pull request Jan 1, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants