Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jadametz/goTweetDelete
Delete Tweets older than X days old
https://github.com/jadametz/goTweetDelete
delete-tweets golang twitter-api
Last synced: about 1 month ago
JSON representation
Delete Tweets older than X days old
- Host: GitHub
- URL: https://github.com/jadametz/goTweetDelete
- Owner: jadametz
- License: mit
- Created: 2020-01-10T20:04:31.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2023-12-16T17:43:11.000Z (12 months ago)
- Last Synced: 2024-08-24T07:04:35.387Z (4 months ago)
- Topics: delete-tweets, golang, twitter-api
- Language: Go
- Size: 27.3 KB
- Stars: 10
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-starred - jadametz/goTweetDelete - Delete Tweets older than X days old (golang)
README
# goTweetDelete
![](https://github.com/jadametz/goTweetDelete/workflows/Docker%20Image%20CI/badge.svg)
goTweetDelete deletes old Tweets after X (30 by default) days.
## Getting Started
goTweetDelete authorizes as _you_ and therefore requires you to have access to [the Twitter API](https://developer.twitter.com/en/docs/basics/getting-started).
### Configuration
The following environment variables exist for configuration:
|Variable|Description|Required|Default|
|--------|-----------|--------|-------|
|`ACCESSSECRET`|Twitter API credential|Y||
|`ACCESSTOKEN`|Twitter API credential|Y||
|`CONSUMERKEY`|Twitter API credential|Y||
|`CONSUMERSECRET`|Twitter API credential|Y||
|`DAYSTOKEEP`|The number of days to keep Tweets before they're deleted|N|`30`|
|`IGNOREIDS`|The Tweet ID(s), comma separated, of a Tweet you'd like to be ignored (e.g. a pinned Tweet)|N||
|`IGNORESUBSTRINGS`|Strings, comma separated, that will cause a Tweet to be ignored|N||
|`INCLUDERETWEETS`|Whether RT's should be included in the search/deletion|N|`true`|
|`SCREENNAME`|Your Twitter handle|Y||## Running the app
### Go
> Note: Golang 1.13 was used for development. No other version has been tested at this time.
```bash
# clone this repository
$ git clone [email protected]:jadametz/goTweetDelete.git
$ cd goTweetDelete# build the app
$ go build# export all of the necessary configuration
# e.g.
# export ACCESSSECRET=foo
# export ACCESSTOKEN=bar# run the app!
$ ./goTweetDelete
```### Docker
```bash
$ docker run --name gotweetdelete \
--rm \
-e ACCESSSECRET=... \
-e ACCESSTOKEN=... \
-e CONSUMERKEY=... \
-e CONSUMERSECRET=... \
-e SCREENNAME=... \
jadametz/gotweetdelete
```#### docker-compose
A `docker-compose.yml` is provided for ease of use and assumes that `.env` exists with the necessary variables.
```bash
$ docker-compose up
```