Skip to content

Margery0011/WordCloud

Repository files navigation

trgn_wordcloud2

TRGN_WORDCLOUD

About the assignment

In this assignment, I would summarize 2 webpages to translate them into readble words by html2text and use these wordcloud. And I will put it on my website and update it at 9:00 A.M. everyday.

Installation

Use git clone to clone the repository from github to local sever.

  • html2text should be installed to convert html files to readable text files. Below is the install code.
cd ~/bin
git clone https://github.com/aaronsw/html2text 
cd html2text
mv html2text.py ~/bin.
  • wordcloud could be used transform words to a image. Below is the install code.
cd ~/bin
git clone https://github.com/amueller/word_cloud.git

As for people who don't have permission to install wordcloud , you should modify your directions to python -m pip install --user wordcloud to install it locally.

Customize the website

  • Make a directory ~/public_html , create a html file and edited it like below:
<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>Margery0011</title>
</head>
<body>
<h1>Website</h1>
<p>Hi, below is a live wordcloud generated by [www.nytimes.com] and [www.vogue.com], and it will update everyday.<p>
</body>
<img src="wordclouds.png" alt="mypicture">
</html>
  • Upadate it everyday by crontab -e:
0 9 * * * ~/[path]/[file].sh

It will be update at 9:00 A.M everyday . You can also check the list of your cron job by crontab -l

Dependencies

Contact

Please feel free to contact me by

[email protected]

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages