https://github.com/rafaelwi/wikicloud
wikipedia word cloud generator
https://github.com/rafaelwi/wikicloud
Last synced: 6 months ago
JSON representation
wikipedia word cloud generator
- Host: GitHub
- URL: https://github.com/rafaelwi/wikicloud
- Owner: rafaelwi
- Created: 2019-05-04T19:57:35.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-08-20T20:29:52.000Z (about 5 years ago)
- Last Synced: 2025-02-05T20:06:21.801Z (8 months ago)
- Language: Python
- Size: 29.3 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# wikicloud
Wikipedia word cloud generator in Python3
# Features
- Can generate word clouds from a Wikipedia article
- Customize the size and look of the cloud# Running
1. Clone the repo using `git clone https://github.com/rafaelwi/wikicloud.git`
2. Ensure that you have `requests`, `matplotlib`, `BeautifulSoup`, and `lxml`, which are installed with `pip3`
3. Run the script with command below
4. Find the image of the plot in the `plots` folder## Using the script
To get a specific article:`python3 cloud.py -a https://en.wikipedia.org/wiki/GitHub` or
`python3 cloud.py -a GitHub` or
`python3 cloud.py -a 'New York City'`
To specify the height and width, use the `-hi` and `-wi` options respectively. The defaults
are `-hi 800 -wi 800```python3 cloud.py -a Github -hi 1000 -wi 4000`
To specify the background color, use the `-bg` option. A list of possible arguements can be
found [here](https://drafts.csswg.org/css-color-4/#named-colors).`python3 cloud.py -a GitHub -bg 'darkviolet'`
For help in the command line, use:
`python3 cloud.py --help`# To add
- Set fonts
- Set font sizes