-
read this file carefully
-
open config.py and set your setting such as input address
-
run program.py with python3.4 or higher
-
select your context (twitter or telegram or normal text or twitter exported data)
-
wait until the program finishes
- you should get tweets from this site and paste to a file for example input.txt
- enter file address to config.py, twitter_config dictionary
- if you set 'SOURCE': "clipboard" program will use system clipboard instead of the input file
- you can set other options in that config
- no_retweet and no_replis are work as they expected so
- no link will remove all tweets contains links for example quotes, images and unfollow checker auto-tweets
- export chat history to a folder
- enter folder address in config.py in telegram_config dictionary, something like './input/*.html'
- this option is for people who wants a cloud for all tweets not last 3000 tweets
- first of all, you should follow this link to export twitter data, it takes some time! be patient
- after your data is ready, download and unzip it, we need the
tweet.js
file in next step - enter the path of
tweet.js
in the data folder to the config file (inconfig.py/data_config
) - open program and select option
4
- you can set NO_REPLIES if you want only your tweets not replies
- there is no NO_RETWEET option because retweets are not included in exported data
- Press enter and enjoy :D
- no link will remove all tweets contains a link for example quotes, images and unfollow checker auto-tweets
-
you can set font and mask in general_config file
-
enter a TTF font
-
mask image should be png or jpg
-
you don't need to specify file format! the program will guess it
-
-
if you use a third-party mask and its not black and white (greyscale for example) you can set NORMALIZE_MASK to True
-
normalize mask is a slow operation, it handles greyscale masks, if you use built-in masks you don't need it
-
if stop words didn't remove automatically, set STOP_WORD_CLEAN to "manual" in config.py
-
only if Persian words are reversed, make ARABIC_RESHAPER to True
-
line color and line width are for splitter line between text and whitespace, it may be good for some cases
-
max words and min font and max font are 3 numbers, change them with caution, if the min font is too low or max words is high, the whole operation will take much time if the max font is not so big, the cloud is ugly
- wordcloud
- numpy and PIL
- beautifulsoup4 (for parse telegram htmls)
- arabic reshaper
- bidi
- clipboard
You can also install requirements using requirements.txt
and pip
:
pip3 install -r requirements.txt
- write better documentation
- add command-line argument parse
- add well twint support for getting tweets automatically
-
Mohammadreza Alihoseiny for developing wordcloud-fa and writing this blog post
-
amueller for developing wordcloud package
-
Ali Yoonesi for good advice and troubleshoots
-
Radin Shayanfar for pull requests and bug fixes