Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/erikaheidi/dynacover
This project is discontinued due to changes in the Twitter API access for users. Check erikaheidi/gdaisy for the base functionality of generating image banners based on JSON templates.
https://github.com/erikaheidi/dynacover
api gd hacktoberfest hacktoberfest2021 image-generation image-processing php twitter
Last synced: 3 months ago
JSON representation
This project is discontinued due to changes in the Twitter API access for users. Check erikaheidi/gdaisy for the base functionality of generating image banners based on JSON templates.
- Host: GitHub
- URL: https://github.com/erikaheidi/dynacover
- Owner: erikaheidi
- License: mit
- Archived: true
- Created: 2021-06-02T15:46:19.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-09-28T16:30:50.000Z (over 2 years ago)
- Last Synced: 2024-08-02T05:19:23.128Z (6 months ago)
- Topics: api, gd, hacktoberfest, hacktoberfest2021, image-generation, image-processing, php, twitter
- Language: PHP
- Homepage:
- Size: 2.69 MB
- Stars: 175
- Watchers: 5
- Forks: 12
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Dynacover
Dynacover is a PHP GD + TwitterOAuth CLI app to dynamically generate Twitter header images and upload them via the API. This enables you to build cool little tricks, like showing your latest followers or GitHub sponsors, your latest content created, a qrcode to something, a progress bar for a goal, and whatever you can think of.
## Installation
You can run Dynacover in three different ways:
- as a **GitHub action**: the easiest way to run Dynacover is by setting it up in a public repository with [GitHub Actions](https://docs.github.com/en/actions), using repository secrets for credentials. [Follow this step-by-step guide](https://github.com/erikaheidi/dynacover/wiki/Setting-Up-Dynacover-with-GitHub-Actions) to set this up - no coding required.
- with **Docker**: you can use the public [erikaheidi/dynacover](https://hub.docker.com/repository/docker/erikaheidi/dynacover) Docker image to run Dynacover with a single command, no PHP required. [Follow this guide](https://github.com/erikaheidi/dynacover/wiki/Running-Dynacover-with-Docker) to set this up.
- to further customize your cover, you can clone the [dynacover repo](https://hub.docker.com/repository/docker/erikaheidi/dynacover) to customize banner resources (JSON template and header images, both located at `app/Resources`), then build a local copy of the Dynacover Docker image to use your custom changes.
- with a **PHP CLI environment**: this will require `php-cli` 8.1+, Composer, and a few extensions: `php-gd`, `php-mbstring`, `php-curl`, and `php-json`. [Follow this guide](https://github.com/erikaheidi/dynacover/wiki/Running-Dynacover-on-a-PHP-CLI-environment) to set it up.### Obtaining Required Tokens
To upload your header images, you'll need to register an application within the [Twitter Developers Portal](https://dev.twitter.com) and obtain **4 tokens**:
- Consumer / App Token
- Consumer / App Secret
- User / Access Token
- User / Access Token SecretAdditionally, you can set up a [Personal GitHub API key](https://github.com/settings/tokens) to fetch your sponsors, in case you are enrolled in the GitHub Sponsors program. In this case, you should use the included `cover_sponsors.json` template. This is optional.
### Available Templates
### `cover_basic.json`
The default template shows latest 5 Twitter followers.
### `cover_colorful.json`
Similar to the basic cover, but with a more colorful background. Shows latest 5 Twitter followers.
### `cover_neon.json`
This template shows your latest 5 Twitter followers in smaller size, in a blue-neon style header.
### `cover_sponsors.json`
This template uses the Github image source to obtain sponsors and include them in the banner. Make sure you have set up your GH token on the `credentials.php` file.
## Recent Interactions Banner
The "interactions banner" is generated based on your recent interactions and can be limited to only include mutuals (people that follows you and you follow them back).
```shell
php dynacover generate interactions
```
For mutuals only, include the `--mutuals` flag:
```shell
php dynacover generate interactions --mutuals
```_Please notice that the "mutuals" version may have a limited set of results after filtering your latest interactions (~200 mentions)._