• Stars
    star
    112
  • Rank 312,240 (Top 7 %)
  • Language
    Go
  • License
    MIT License
  • Created over 9 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A twitter bot (@TrendingGithub) to tweet trending repositories and developers from GitHub

@TrendingGithub

Build Status GoDoc Go Report Card

A twitter bot (@TrendingGithub) to tweet trending repositories and developers from GitHub.

Follow us at @TrendingGithub.

@TrendingGithub twitter account

Important: This is no official GitHub or Twitter product.

Features

  • Tweets trending projects every 30 minutes
  • Refreshes the configuration of twitters URL shortener t.co every 24 hours
  • Blacklisting of repositories for 30 days (to avoid tweeting a project multiple times in a short timeframe)
  • Maximum use of 140 chars per tweet to fill up with information
  • Debug / development mode
  • Multiple storage backends (currently Redis and in memory)

Installation

  1. Download the latest release
  2. Extract the archive (zip / tar.gz)
  3. Start the bot via ./TrendingGithub -debug

For linux this can look like:

curl -L  https://github.com/andygrunwald/TrendingGithub/releases/download/v0.4.0/TrendingGithub-v0.4.0-linux-amd64.tar.gz -o TrendingGithub-v0.4.0-linux-amd64.tar.gz
tar xzvf TrendingGithub-v0.4.0-linux-amd64.tar.gz
cd TrendingGithub-v0.4.0-linux-amd64
./TrendingGithub -debug

Usage

$ ./TrendingGithub -help
Usage of ./TrendingGithub:
  -debug
    	Outputs the tweet instead of tweet it (useful for development). Env var: TRENDINGGITHUB_DEBUG
  -expvar-port int
    	Port which will be used for the expvar TCP server. Env var: TRENDINGGITHUB_EXPVAR_PORT (default 8123)
  -storage-auth string
    	Storage Auth (e.g. myPassword or <empty>). Env var: TRENDINGGITHUB_STORAGE_AUTH
  -storage-url string
    	Storage URL (e.g. 1.2.3.4:6379 or :6379). Env var: TRENDINGGITHUB_STORAGE_URL (default ":6379")
  -twitter-access-token string
    	Twitter-API: Access token. Env var: TRENDINGGITHUB_TWITTER_ACCESS_TOKEN
  -twitter-access-token-secret string
    	Twitter-API: Access token secret. Env var: TRENDINGGITHUB_TWITTER_ACCESS_TOKEN_SECRET
  -twitter-conf-refresh-time duration
    	Twitter: Time interval to refresh the configuration of twitter (e.g. char length for short url). Env var: TRENDINGGITHUB_TWITTER_CONF_REFRESH_TIME (default 24h0m0s)
  -twitter-consumer-key string
    	Twitter-API: Consumer key. Env var: TRENDINGGITHUB_TWITTER_CONSUMER_KEY
  -twitter-consumer-secret string
    	Twitter-API: Consumer secret. Env var: TRENDINGGITHUB_TWITTER_CONSUMER_SECRET
  -twitter-follow-new-person
    	Twitter: Follows a friend of one of our followers. Env var: TRENDINGGITHUB_TWITTER_FOLLOW_NEW_PERSON
  -twitter-follow-new-person-time duration
    	Growth hack: Time interval to search for a new person to follow. Env var: TRENDINGGITHUB_TWITTER_FOLLOW_NEW_PERSON_TIME (default 45m0s)
  -twitter-tweet-time duration
    	Twitter: Time interval to search a new project and tweet it. Env var: TRENDINGGITHUB_TWITTER_TWEET_TIME (default 30m0s)
  -version
    	Outputs the version number and exit. Env var: TRENDINGGITHUB_VERSION

Every parameter can be set by environment variable as well.

Twitter-API settings (twitter-access-token, twitter-access-token-secret, twitter-consumer-key and twitter-consumer-secret) are necessary to use the Twitter API and to set up a tweet by your application. You can get those settings by Twitter's application management.

If you want to play around or develop this bot, use the debug setting. It avoids using the Twitter API for tweet purposes and outputs the tweet on stdout.

The Redis url (storage-url)is the address of the Redis server in format ip:port (e.g. 192.168.0.12:6379). If your server is running on localhost you can use :6379 as a shortcut. storage-auth is the authentication string necessary for your Redis server if you use the Authentication feature.

Storage backends

Why is a storage backend needed at all?

We are looking for popular projects in a regular interval. To avoid tweeting a project or developer multiple times after another we add those records to a blacklist for a specific time.

At the moment there are two backends implemented:

  • Memory (used in development)
  • Redis (used in production)

Growth hack

We implemented a small growth hack to get a few followers. This hack was suggested by my colleague @mre. It works like described:

  • Get all followers from @TrendingGithub
  • Choose a random one and get the followers of the choosen person
  • Check if this person follows us already
  • If yes, repeat
  • If no, follow this person

This feature can be activated via the twitter-follow-new-person flag.

Motivation

I love to discover new tools, new projects, new languages, new coding best practices, new exciting ideas and new people who share the same passion like me. I use twitter a lot and have little time to check trending repositories and developers on a daily basis.

Why not combine both to save time and spread favorite projects and developers via tweets?

License

This project is released under the terms of the MIT license.

More Repositories

1

go-jira

Go client library for Atlassian Jira
Go
1,429
star
2

FOM-LaTeX-Template

A LaTeX template for term paper, bachelor or master thesis for "FOM University of Applied Sciences"
TeX
175
star
3

go-trending

Go library for accessing trending repositories and developers at Github.
Go
137
star
4

go-gerrit

Go(lang) client/library for Gerrit Code Review
Go
93
star
5

cachet

Go(lang) client library for Cachet (open source status page system).
Go
90
star
6

DigitalKanban

A small digital Kanban board based on Symfony2. This application was developed during a small university project.
PHP
55
star
7

megos

Go(lang) client library for accessing information of an Apache Mesos cluster.
Go
54
star
8

jitic

The JIRA Ticket Checker - Checks the existence of one or more ticket in the JIRA issue tracker
Go
33
star
9

vdf

A Lexer and Parser for Valves Data Format (known as vdf) written in Go
Go
30
star
10

your-connection-deserves-a-name

Examples and code to assign a name to your MongoDB, MySQL, NATS, Oracle, PostgreSQL, RabbitMQ, and redis connection.
Go
26
star
11

things-with-buzzers-jeopardy

A Jeopardy! game frontend for things with buzzers with support for three buzzers 🚀
JavaScript
24
star
12

simple-webserver

A small webserver for testing various technologies, techniques and concepts written in Go.
Go
23
star
13

things-with-buzzers-hardware

Everything you need to build hardware game show buzzers (and to do awesome things with it!) 🚀
Python
12
star
14

Jacobine

A framework to analyze your software development cycle and the community around your software product to discover hidden information.
PHP
11
star
15

gotrap

A Gerrit <=> Github <=> TravisCI bridge written in Go
Go
11
star
16

Gerrie

A crawler for Googles code review system "Gerrit"
PHP
9
star
17

things-with-buzzers-websocket

A WebSocket server to publish messages when someone pushed a hardware game show buzzer 🚀
Go
7
star
18

perseus

Local git mirror for your PHP (composer) project dependencies that works together with Satis.
Go
4
star
19

sico

A Sitemap Comparison that helps you to not fuck up your website migration.
Go
4
star
20

watson

A crawler for Googles code review system "Gerrit"
Go
4
star
21

go-incident

Go client library for accessing the Incident.io API
Go
4
star
22

Jacobine-Vagrant

Vagrant setup for a project to analyze different data sources of various open source projects (source code, ecosystem, community) to detect new information about your community and your contribution. See Jacobine.
Python
2
star
23

Jacobine-Web-Frontend

Website for a project to analyze different data sources of the open source project TYPO3. See TYPO3-Analytics
PHP
1
star
24

Vagrant-MetricsGrimoire

Vagrant setup to play with the MetricsGrimoire toolset
Python
1
star
25

dotfiles

My .files
Shell
1
star