{"id":23141667,"url":"https://github.com/zekrotja/itsfriday","last_synced_at":"2025-08-17T13:31:53.822Z","repository":{"id":46646256,"uuid":"177166802","full_name":"zekroTJA/itsfriday","owner":"zekroTJA","description":"The tool for spreading friday-happiness to your Twitter followers! ","archived":true,"fork":false,"pushed_at":"2022-08-26T12:33:02.000Z","size":8856,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-17T11:44:03.139Z","etag":null,"topics":["bot","hacktoberfest","memes","twitter"],"latest_commit_sha":null,"homepage":"https://twitter.com/zekrotja","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zekroTJA.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-03-22T15:37:22.000Z","updated_at":"2025-01-13T19:35:24.000Z","dependencies_parsed_at":"2022-08-28T11:51:38.822Z","dependency_job_id":null,"html_url":"https://github.com/zekroTJA/itsfriday","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/zekroTJA/itsfriday","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zekroTJA%2Fitsfriday","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zekroTJA%2Fitsfriday/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zekroTJA%2Fitsfriday/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zekroTJA%2Fitsfriday/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zekroTJA","download_url":"https://codeload.github.com/zekroTJA/itsfriday/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zekroTJA%2Fitsfriday/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270856561,"owners_count":24657688,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-17T02:00:09.016Z","response_time":129,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bot","hacktoberfest","memes","twitter"],"created_at":"2024-12-17T14:14:09.342Z","updated_at":"2025-08-17T13:31:53.136Z","avatar_url":"https://github.com/zekroTJA.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"data/pool/20201218_144633.jpg\" height=\"300\" /\u003e\n    \u003ch1\u003e~ It's Friday! ~\u003c/h1\u003e\n    \u003cstrong\u003e\n        The tool for spreading friday-happiness to your Twitter followers!\n    \u003c/strong\u003e\u003cbr\u003e\u003cbr\u003e\n    \u003ca href=\"https://github.com/zekroTJA/itsfriday/actions/workflows/autopost.yml\"\u003e\u003cimg src=\"https://github.com/zekroTJA/itsfriday/actions/workflows/autopost.yml/badge.svg\"/\u003e\u003c/a\u003e\u0026nbsp;\u003ca href=\"https://github.com/zekroTJA/itsfriday/releases\"\u003e\u003cimg src=\"https://img.shields.io/github/v/release/zekrotja/itsfriday?include_prereleases\"\u003e\u003c/a\u003e\n\u003cbr\u003e\n\u003c/div\u003e\n\n---\n\n# Why?\n\nImagine waking up, looking on your phone and noticing: It's finally friday! You are going to work, full of aniticipation to the end of the workday - chilling with some beer or with your friends on a tasty barbeque...\n\nAnd this tool provides an easy way to spread some of your friday-happiness to your twitter followers! Just enter a collection of carefully picked, happy friday images into the config, create an [API app](https://developer.twitter.com/en/apps), enter your apps credentials and everything is ready to go.\n\nThen, you can define a time when a randomly picked image out of the defined pool of files and URLs will be directly brought onto your followers timeline.\n\n---\n\n# Contribute Images\n\nYou can just create an issue with [**this template**](https://github.com/zekroTJA/itsfriday/issues/new?assignees=zekrotja\u0026labels=contribute-image\u0026template=extract-image.yml\u0026title=Image+Contribution) and put in your image link there. After that, the image will be reviewed and then added to the repository, if accepted.\n\nOtherwise, if you want to be part of the contributors list, just [fork](https://docs.github.com/en/github/getting-started-with-github/fork-a-repo) this repository and add your desired image to the `data/pool` directory. After that, just create a [pull request](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request) with your changes. It's that easy! 😉\n\n# Setup\n\n## Requirements\n\n- Python **(\u003e v.3.6)**\n- git\n- GNU make *(optional)*\n\nFirst of all, you need to [**create a Twitter API application**](https://developer.twitter.com/en/apps/create) to connect the tool to your account.\n\nThen, clone this repository to your system and cd into the directory:\n\n```\n$ git clone https://github.com/zekroTJA/itsfriday --branch master --depth 1\n$ cd itsfriday\n```\n\nThen, install the required dependencies:\n```\n$ python3 -m pip install -U --user -r requirements.txt\n```\nor simply use the make file for that:\n```\n$ make deps\n```\n*Maybe, you need to configure the Makefile before to use the right python command.*\n\nAfter that was successful, run the main.py to generate a config file:\n```\n$ python3 ./main.py -c myConfig.json\n```\n\n## Docker\n\nAlternatively, you can use the automatically pre-build Docker images available on [Docker Hub](https://hub.docker.com/r/zekro/itsfriday).\n\n```\n$ docker pull zekro/itsfriday:latest\n```\n\nThen, start up the image. You should bind the data location `/etc/data` and set this in your config file to create a gateway if you want to use local files on your host system to be posted on twitter.\n```\n$ docker run \\\n    -v \"/etc/itsfriday/config:/etc/config\" \\\n    -v \"/etc/itsfriday/data:/etc/data\"\n```\n\nOr when using docker-compose:\n```yaml\nversion: '3'\n\nservices:\n  # ...\n  \n  itsfriday:\n    image: 'zekro/itsfriday:latest'\n    volumes:\n      - '/etc/itsfriday/config:/etc/config'\n      - '/etc/itsfriday/data:/etc/data'\n    restart: always\n```\n\n## Config\n\nThen, open the config and enter your Twitter API app credentials, the time when the event should fire every friday, a message text *(can be empty)*, and some local file directions *(directly to a file or to a folder containing image files)* or URLs to online images which should be used as pool for the randomly picked images to post.\n```json\n{\n  \"time\": \"9:00:00\",\n  \"message\": \"Yay, it's friday!\",\n  \"twitter\": {\n    \"consumer_key\": \"s0m33x4mpl3c0n5um3rk3y\",\n    \"consumer_secret\": \"4n0th3r3x4mpl3c0n5um3r53cr3t\",\n    \"access_token_key\": \"th15154n3x4mpl3t0k3nk3y\",\n    \"access_token_secret\": \"4ndth1s1s4l50ju5t4n3x4mpl3t0k3n53cr3t\"\n  },\n  \"image_files\": [\n    \"https://example.com/myimagefile.png\",\n    \"/home/you/icon.png\",\n    \"/home/you/img\"\n  ]\n}\n```\n\nThen, fire the handler once just for testing:\n```\n$ python3 ./main.py -c myConfig.json --once\n```\n\nNow, you can set up for automated tweet posting:\n\nTherefore are two options to do so:\n\n### I) Running as deamon\n\nFor this, you should use something like [`pm2`](https://github.com/Unitech/pm2) or [`screen`](https://www.rackaid.com/blog/linux-screen-tutorial-and-how-to).  \nIn this example, I will use pm2:\n\nFor that, create a start script which can be used as single executable to start the script:\n\u003e start.sh\n```bash\n#!/bin/bash\nREPO=\"/path/to/itsfriday\"\npython3 ${REPO}/main.py -c ${REPO}/myConfig.json\n```\n\nDont forget to make the script executable after!\n```\n$ chmod +x ./start.sh\n```\n\nNow, initialize the pm2 deamon:\n```\n$ pm2 start --name itsfriday ./start.sh\n```\n\nAfter that, assure that the deamon is running with\n```\n$ pm2 ls\n```\n\nNow, a timer is running frequently checking for the time and executing the twitter push if the trigegr time has been hit.  \nIf the script crashes for some reason, pm2 will restart and keep it alive *(except the script is crashing frequently directly after start to avoid an endless start loop)*.\n\n### II) Using cron *(or something similar)*\n\nFor this example, I am using cron:\n\n```\n$ crontab -e\n```\n\nNow, create an entry to fire your post, for example, every friday at 9 AM:\n```\n0 9 * * 5 python3 /path/to/itsfriday/main.py -c /path/to/itsfriday/config.json --once\n```\n\nIt is very important to set the flag **`--once`**, which will not start the timer loop and only fire the event once.\n\n---\n\n© 2019 Ringo Hoffmann (zekro Development)  \nCovered by MIT Licence.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzekrotja%2Fitsfriday","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzekrotja%2Fitsfriday","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzekrotja%2Fitsfriday/lists"}