{"id":18622340,"url":"https://github.com/marcanuy/publishfeed","last_synced_at":"2025-04-11T03:31:14.091Z","repository":{"id":50204082,"uuid":"93752746","full_name":"marcanuy/publishfeed","owner":"marcanuy","description":"Getting RSS feeds and tweet when a website publishes new articles in their feed","archived":false,"fork":false,"pushed_at":"2022-12-07T23:58:39.000Z","size":21,"stargazers_count":11,"open_issues_count":2,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-25T08:42:31.436Z","etag":null,"topics":["atom","feed","python","python3","rss","rss-feed-scraper","tweet","twitter"],"latest_commit_sha":null,"homepage":"https://simpleit.rocks/automatically-tweet-new-blog-posts-based-in-rss/","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/marcanuy.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":"2017-06-08T13:30:50.000Z","updated_at":"2022-06-10T08:07:04.000Z","dependencies_parsed_at":"2023-01-25T01:15:15.835Z","dependency_job_id":null,"html_url":"https://github.com/marcanuy/publishfeed","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcanuy%2Fpublishfeed","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcanuy%2Fpublishfeed/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcanuy%2Fpublishfeed/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcanuy%2Fpublishfeed/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marcanuy","download_url":"https://codeload.github.com/marcanuy/publishfeed/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248335428,"owners_count":21086589,"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":["atom","feed","python","python3","rss","rss-feed-scraper","tweet","twitter"],"created_at":"2024-11-07T04:16:33.288Z","updated_at":"2025-04-11T03:31:13.747Z","avatar_url":"https://github.com/marcanuy.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Publish Feed\n============\n\nA publisher of articles from websites RSS feeds to Twitter.\n\n\u003c!-- markdown-toc start - Don't edit this section. Run M-x markdown-toc-generate-toc again --\u003e\n**Table of Contents**\n\n- [Publish Feed](#publish-feed)\n- [Overview](#overview)\n\n\u003c!-- markdown-toc end --\u003e\n\n\n# Overview\n\nThis app currently perform two tasks:\n\n- download RSS content from several sources listed in `feeds.yml`\n- publish its titles and links to Twitter\n\nThis is an easy way to get your [blog posts automatically tweeted](https://simpleit.rocks/automatically-tweet-new-blog-posts-based-in-rss/).\n\n# Installation\n\n## Install dependencies\n\nInstall Pip dependencies: \u003ckbd\u003emake install\u003c/kbd\u003e\n\n## Get Twitter credentials\n\nCreate a Twitter app at \u003chttps://apps.twitter.com/\u003e and generate keys\nwith **read and write permissions**.\n\n## Set up credentials and feeds\n\nCustomize `feeds.yml.skel` and save it as `feeds.yml`:\n\t\n\tcd publishfeed\n\tcp feeds.yml.skel feeds.yml\n\t\nFor example, defining feeds for two different Twitter accounts,\n\u003ctwitter.com/simpleitrocks\u003e and \u003ctwitter.com/reddit\u003e, would\nlook like:\n\n\tsimpleitrocks: #twitter handler\n\t  twitter:\n\t\tconsumer_key: 'XXXXXX'\n\t\tconsumer_secret: 'XXXXXXX'\n\t\taccess_key: 'XXXXXX'\n\t\taccess_secret: 'XXXXXX'\n\t  urls:\n\t\t- https://simpleit.rocks/feed\n\t  hashtags: '#TechTutorials'\n    reddit:\n\t  twitter:\n\t\tconsumer_key: 'XXXXXX'\n\t\tconsumer_secret: 'XXXXXXX'\n\t\taccess_key: 'XXXXXX'\n\t\taccess_secret: 'XXXXXX'\n\t  urls:\n        - http://www.reddit.com/.rss\n        - http://www.reddit.com/r/news/.rss\n        - http://www.reddit.com/user/marcanuy/.rss\n\t  hashtags: '#RedditFrontPage'\n\n# Running\n\nThere are two commands available:\n\n~~~ bash\n$ python main.py\n\nusage: main.py [-h] [-g | -t] feed\n\nProcess and publish RSS Feeds articles\n\npositional arguments:\n  feed            Index from feeds.yml\n\noptional arguments:\n  -h, --help      show this help message and exit\n  -g, --getfeeds  Download and save new articles from the list of feeds\n  -t, --tweet     Tweet unpublished articles from this list of feeds\n~~~\n\n- `python main.py \u003cTwitterHandler\u003e --getfeeds`\n  \n  Download all the pages from the URLs defined in `urls` and save the\n   new ones. E.g.: \u003ckbd\u003epython main.py reddit --getfeeds\u003c/kbd\u003e\n  \n- `python main.py \u003cTwitterHandler\u003e --tweet`\n\n  Tweet the oldest unpublished page (previously downloaded with\n  `--getfeeds`). E.g.: \u003ckbd\u003epython main.py reddit --tweet\u003c/kbd\u003e\n\n## Cronjobs\n\nSet up two cronjobs to publish new feed content automatically:\n\n~~~ bash\ncrontab -e\n~~~\n\n~~~ cronjob\n# hourly download new pages \n0 * * * * workon publishfeed; cd publishfeed; python main.py reddit --getfeeds\n\n# tweet every 15 minutes if there are unpublished pages\n*/15 * * * * workon publishfeed; cd publishfeed; python main.py reddit --tweet\n~~~\n\n**Make sure you configure the tweeter cronjob with at least 2 minutes\nbetween each job so your credentials won't be suspended**\n\n# Design\n\n`feeds.yml` populates the **FeedSet** model, then for each url, new\ncontent is created as **RSSContent** instances (using SQLAlchemy) and saved in\n`/databases/rss_\u003ctwitterhandler\u003e.db` *SQLite* databases.\n\nTo tweet a new post, we get the oldest unpublished page from\n**RSSContent**, publish it and change its status.\n\n# Questions\n\nDo you think there is something missing or that can be improved? Feel\nfree to open issues and/or contributing!\n\n# License\n\nMIT Licensed.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcanuy%2Fpublishfeed","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarcanuy%2Fpublishfeed","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcanuy%2Fpublishfeed/lists"}