GithubHelp home page GithubHelp logo

your-diary / twitter_header_clock Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 108 KB

Makes your Twitter header behave as a clock by regurally updating it.

License: MIT License

Python 94.95% Shell 2.64% Dockerfile 2.41%

twitter_header_clock's Introduction

Twitter Header Clock

About

This project makes your Twitter header behave like a clock. Internally, it

  1. creates a image in which a date string is displayed,

  2. and uploads the image as a header image

every 60 seconds.

ss.png
Fig: An example result. The Sun or the Moon does move as time passes.

Traffic

Each created image has the size shown below. Thus it is estimated that the application will upload tens of megabytes of data to Twitter per day.

png without the Sun (grayscale) jpg with the Sun (RGB)
10KB 30KB

Requirements

Preparations

  1. Credentials

    1. Create an account for Twitter Developer.

    2. Get API keys from the developer center.

    3. Create a file twitter_credentials.json in this project directory. It shall be of the form

    {
        "api_key":             "<api key>",
        "api_secret_key":      "<api secret key>",
        "access_token":        "<access token>",
        "access_token_secret": "<access token secret>"
    }
    
  2. Parameters

    1. Change the contents of ./config.json as you like. This file specifies a directory for temporary files, the name of a font, and so on.

Usage

$ python3 ./twitter_header_clock.py

or

$ docker compose build
$ docker compose up -d

twitter_header_clock's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.