{"id":16226846,"url":"https://github.com/c0bra/image-wordcloud-perl","last_synced_at":"2025-03-19T13:30:51.104Z","repository":{"id":2217474,"uuid":"3167080","full_name":"c0bra/image-wordcloud-perl","owner":"c0bra","description":"Perl module for generating pretty wordcloud images","archived":false,"fork":false,"pushed_at":"2017-03-24T08:22:27.000Z","size":3219,"stargazers_count":10,"open_issues_count":4,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-28T18:47:39.381Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/c0bra.png","metadata":{"files":{"readme":"README","changelog":"Changes","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-01-12T23:56:36.000Z","updated_at":"2023-03-05T22:38:27.000Z","dependencies_parsed_at":"2022-09-08T07:42:10.547Z","dependency_job_id":null,"html_url":"https://github.com/c0bra/image-wordcloud-perl","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c0bra%2Fimage-wordcloud-perl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c0bra%2Fimage-wordcloud-perl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c0bra%2Fimage-wordcloud-perl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c0bra%2Fimage-wordcloud-perl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/c0bra","download_url":"https://codeload.github.com/c0bra/image-wordcloud-perl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243989729,"owners_count":20379648,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-10T12:50:38.628Z","updated_at":"2025-03-19T13:30:50.381Z","avatar_url":"https://github.com/c0bra.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"NAME\n    Image::WordCloud - Create word cloud images\n\nSYNOPSIS\n            use Image::WordCloud;\n            use File::Slurp;\n        \n            my $wc = Image::WordCloud-\u003enew();\n        \n            # Add the Gettysburg Address\n            my $text = read_file('script/gettysburg.txt');\n            $wc-\u003ewords($text);\n        \n            # Create the word cloud as a GD image\n            my $gd = $wc-\u003ecloud();\n        \n            open(my $fh, '\u003e', 'gettysburg.png');\n                    binmode $fh;\n                    print $fh $gd-\u003epng();\n            close($fh);\n        \n            # See examples/gettysburg.png for how the created image looks.\n            # script/gettysburg.pl will create it\n        \n            # The calls can also be chained like so:\n            my $text = read_file('script/gettysburg.txt');\n            my $gd = Image::WordCloud-\u003enew()\n                    -\u003ewords($text)\n                    -\u003ecloud();\n\n    Create \"word cloud\" images from a set of specified words, similar to\n    http://wordle.net. Font size indicates the frequency with which a word\n    is used.\n\n    Colors are generated randomly using Color::Scheme. Fonts can be\n    specified or chosen randomly.\n\nFUNCTIONS\n  new( ... )\n    Accepts a number of parameters to alter the image look.\n\n    * image_size =\u003e [$x, $y]\n        Sets the size of the image in pixels, accepts an arrayref. Defaults\n        to [400, 400].\n\n        NOTE: Non-square images currently can look a little squirrely due to\n        how Math::TheodorusSpiral fills a rectangle.\n\n    * word_count =\u003e $count\n        Number of words to show on the image. Defaults to 70.\n\n    * prune_boring =\u003e \u003c1,0\u003e\n        Prune \"boring\", or \"stop\" words. This module currently only supports\n        English stop words (like 'the', 'a', 'and', 'but'). The full list is\n        in Image::WordCloud::StopWords::EN\n\n        Defaults to true.\n\n    * font =\u003e $name\n        Name of font to use. This is passed directly to GD::Text::Align so\n        it can either be a string like 'arial', or a full path. However in\n        order for non-path font names to work, GD needs an environment\n        variable like FONT_PATH or FONT_TT_PATH to be set, or `font_path'\n        can be used to set it manually.\n\n    * font_path =\u003e $path_to_fonts\n        Set where your font .ttf files are located. If this is not\n        specified, the path of this module's distribution directory will be\n        used via File::ShareDir. Currently this module comes bundled with\n        one set of fonts.\n\n    * background =\u003e [$r, $g, $b]\n        Takes an arrayref defining the background color to use. Defaults to\n        [40, 40, 40]\n\n    * border_padding =\u003e \u003c$pixels | $percent\u003e\n        Padding to leave clear around the edges of the image, either in\n        pixels or a percent with '%' sign. Defaults to '5%'\n\n                my $wc = Image::WordCloud-\u003enew(border_padding =\u003e 20);\n                my $wc = Image::WordCloud-\u003enew(border_padding =\u003e '25%');\n\n        Please note that this affects the speed with which this module can\n        fit words into the image. In my tests on the text of the Declaration\n        of Independence, bumping the percentage by 5% increments progressed\n        like so:\n\n                0%:  15.25s\n                5%:  21.50s\n                10%: 30.00s\n                15%: 63.6s avg\n\n  words(\\%words_to_use | \\@words | @words_to_use | $words)\n    Takes either a hashref, arrayref, array or string.\n\n    If the argument is a hashref, keys are the words, values are their\n    count. No further processing is done (we assume you've done it on your\n    own).\n\n    If the argument is an array, arrayref, or string, the words are parsed\n    to remove non-word characters and turn them lower-case.\n\n  cloud()\n    Make the word cloud. Returns a GD::Image.\n\n            my $gd = Image::WordCloud-\u003enew()-\u003ewords(qw/some words etc/)-\u003ecloud();\n        \n            # Spit out the wordlcoud as a PNG\n            $gd-\u003epng;\n        \n            # ... or a jpeg\n            $gd-\u003ejpg;\n        \n            # Get the dimensions\n            $gd-\u003ewidth;\n            $gd-\u003eheight;\n        \n            # Or anything else you can do with a GD::Image object\n\n  add_stop_words(@words)\n    Add new stop words onto the list. Automatically puts words in lowercase.\n\n  width()\n    Return wordcloud image width\n\n  height()\n    Return wordcloud image height\n\nAUTHOR\n    Brian Hann, `\u003cbhann at cpan.org\u003e'\n\nBUGS\n    Please report any bugs or feature requests here\n    https://github.com/c0bra/image-wordcloud-perl/issues. I will be\n    notified, and then you'll automatically be notified of progress on your\n    bug as I make changes.\n\nSUPPORT\n    You can find documentation for this module with the perldoc command.\n\n        perldoc Image::WordCloud\n\n    You can also look for information at:\n\n    * Github Issues Tracker (report bugs here)\n        https://github.com/c0bra/image-wordcloud-perl/issues\n\n    * AnnoCPAN: Annotated CPAN documentation\n        http://annocpan.org/dist/Image-WordCloud\n\n    * CPAN Ratings\n        http://cpanratings.perl.org/d/Image-WordCloud\n\n    * Search CPAN\n        http://search.cpan.org/dist/Image-WordCloud/\n\n    * MetaCPAN\n        https://metacpan.org/module/Image::WordCloud\n\nLICENSE AND COPYRIGHT\n    Copyright 2012 Brian Hann.\n\n    This program is free software; you can redistribute it and/or modify it\n    under the terms of either: the GNU General Public License as published\n    by the Free Software Foundation; or the Artistic License.\n\n    See http://dev.perl.org/licenses/ for more information.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fc0bra%2Fimage-wordcloud-perl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fc0bra%2Fimage-wordcloud-perl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fc0bra%2Fimage-wordcloud-perl/lists"}