{"id":21291781,"url":"https://github.com/alvarogarciapiz/intellitweet","last_synced_at":"2026-05-20T03:34:29.547Z","repository":{"id":208588169,"uuid":"719573384","full_name":"alvarogarciapiz/IntelliTweet","owner":"alvarogarciapiz","description":"Effortlessly share your favorite news via Al, transforming it into a tweet-ready format in seconds.","archived":false,"fork":false,"pushed_at":"2023-11-22T08:24:32.000Z","size":407,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-10T17:24:13.168Z","etag":null,"topics":["ai","llama2","python","twitter-api-v2","twitter-bot"],"latest_commit_sha":null,"homepage":"","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/alvarogarciapiz.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,"governance":null}},"created_at":"2023-11-16T13:07:55.000Z","updated_at":"2023-11-16T13:16:34.000Z","dependencies_parsed_at":"2023-11-22T10:45:06.393Z","dependency_job_id":null,"html_url":"https://github.com/alvarogarciapiz/IntelliTweet","commit_stats":null,"previous_names":["alvarogarciapiz/intellitweet"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alvarogarciapiz%2FIntelliTweet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alvarogarciapiz%2FIntelliTweet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alvarogarciapiz%2FIntelliTweet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alvarogarciapiz%2FIntelliTweet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alvarogarciapiz","download_url":"https://codeload.github.com/alvarogarciapiz/IntelliTweet/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243760762,"owners_count":20343705,"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","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":["ai","llama2","python","twitter-api-v2","twitter-bot"],"created_at":"2024-11-21T13:40:55.996Z","updated_at":"2026-05-20T03:34:29.515Z","avatar_url":"https://github.com/alvarogarciapiz.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# IntelliTweet\n\n![IntelliTweet](IntelliTweet.png)\n\nEffortlessly disseminate your preferred news item from your device to your Twitter account within seconds, facilitated by the seamless transformation of the information into a tweet-ready format through the application of advanced artificial intelligence.\n\nShare a piece of news from your iPhone/iPad/Mac using a shortcut and IntelliTweet will automatically read the website for you, check the important information and publish it into your Twitter/X account within seconds.\n\n## Requirements\n\n\u003e [!NOTE]  \n\u003e To run this project, you will need to have OLLAMA installed on your system.\n\nFind Ollama on: [Ollama Repository](https://github.com/jmorganca/ollama) and [Ollama Official Website](https://ollama.ai)\n\n## Operation\n\n1. IntelliTweet Receives a URL from a news media outlet through a Siri shortcut.\n2. Reads the website to obtain the title, description, and image.\n3. Asseses this information to a local language model (LLM).\n4. Uses the Twitter API V2 to post the tweet to the account.\n\n## Installation and Usage\n\nTo install and run this project, follow these steps:\n\n1. Clone the repository on your local machine.\n2. Make sure Ollama is running.\n3. Install the necessary dependencies using the requirements.txt file.\n4. Configure the Twitter API credentials (create a `.env` file as follows)\n```\nTW_CONSUMER_KEY=XXXXXXXXXXXXXXXXXXXXXX\nTW_CONSUMER_SECRET=XXXXXXXXXXXXXXXXXXXXXX\nTW_ACCESS_TOKEN=XXXXXXXXXXXXXXXXXXXXXX-XXXXXXXXXXXXXXXXXXXXXX\nTW_ACCESS_TOKEN_SECRET=XXXXXXXXXXXXXXXXXXXXXX\nTW_BEARER_TOKEN=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n```\n5. Update line 3 on `script.sh` file with the path of the cloud file you are using.\n6. Update line 17 on `script.sh` file with the path of the python script (`main.py`).\n6. Run the script.sh file on your local terminal.\n\n## Siri shortcut configuration\n\nIn order to make IntelliTweet work you have to configure a siri shortcut as follows:\n\n![shortcut](shortcut.png)\n\nMake sure you have the \"Create new line\" option not marked and file to the path is in a cloud provider (I'm using iCloud).\n\n## Website configuration\n\nIn order to make IntelliTweet work with your favorite news media outlets go to `scraper.py` and add your desired websites:\n\n```\nelif '9to5mac' in url[:25]:\n        title = soup.find('h1', class_='h1')\n        image_element = soup.find('img', class_='skip-lazy')\n        content = soup.find('p')\n```\nFor example this scans 9to5mac website to extract the title, image url and content. Ypu may add some custom classes (You can extract them from your browser using inspect element).\n\n## Language configuration\nIntelliTweet is preonfigured to work in spanish but you can change that easily by changing the prompt (`def create_prompt(title, content):`) and by changing the language in:\n```\ndef translate(input):\n    translator = Translator(to_lang=\"es\")\n    translation = translator.translate(input)\n    return translation\n```\n\n## Future Improvements\n- [ ] Add some parameters to a config file (language, model to be used, even different Twitter accounts (changing .env))\n- [ ] Better prompting\n- [X] Tests\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falvarogarciapiz%2Fintellitweet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falvarogarciapiz%2Fintellitweet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falvarogarciapiz%2Fintellitweet/lists"}