github-trending is a java applicaion about catching snapshot of github-trending page https://github.com/trending
github-trending is a java application, will run a daily task, read github-trending page, save to the md file group by date. And finally push commit to the github repository.
- tips: For some reason, I build this application by spring boot. However, the more simple way to do this job is using liunx crontab to run a daily shell job, and juse run a simple java application.
- you need a github account.
- you need a running environment.
create your github ssh key of your running environment, for example:a linux server. and save the ssh key to github setting page.
git clone [email protected]:YihuaWanglv/github-trending.git
cd github-trending
mvn clean package
nohup java -jar java-github-trending.jar < /dev/null > /data/logs/java-github-trending.log 2>&1 &
- using spring @Scheduled as daily task.
- using Jsoup lib to get and parse page content
- use java.io lib to create markdown file and append content to md file.
- use java Runtime class to run command to commit and push to github.