This repo contains the source for the PublishTo.Dev project.
PublishTo.Dev is a simple utility that enables authors on the dev.to platform to schedule post publishing. Authors draft a post on DevTo, use the PublishTo.Dev browser extension to schedule the post, and then PublishTo.Dev makes the post live on the selected date and time using Azure cloud functions.
Any dev.to author can use this service to schedule post publishing using the following steps:
- Install the PublishTo.Dev browser extension
- Availble for Chrome and Edge (Chromium)
- Packed: Chrome Web Store
- Unpacked: Github source
- Configure the browser extension with your unique DevTo API access token
- Available from the DevTo account settings page
- Write a post on dev.to and save as draft
- From the saved draft page, use the browser extension to choose a date and time to schedule publishing
- Visit PublishTo.Dev to see all scheduled posts
- Scheduled posts can be cancelled
- To reschedule, simply repeat Step 3
- NOTE: Posts do not have to be cancelled before rescheduling. Scheduling the same post again overrides any previous schedule.
To use the unpacked browser extension, simply follow these steps:
- Clone this repo
- From a terminal or command prompt, navigate to the
publishtodev-extension
folder in this repo - Initialize the project with
$ npm install
- Build the extension project with
$ npm run build
- This will create a new sub-directory called
dist
- This will create a new sub-directory called
- Open a Chrome or Edge (Chromium) browser and navigate to the extensions management tab
- Chrome:
chrome://extensions
- Edge:
edge://extensions
- Chrome:
- At the top of the page, click the Load unpacked button and navigate to the
dist
folder created previously - Choose this folder and you're done!
There are two major components to this repo:
On the backend, this project leans heavily on Azure Durable Functions and Azure Table Storage.
When a request is made to the primary HTTP endpoint, a new durable function orchestrator is kicked-off. This orchestrator schedules the publishing code to run at the user specified time and ensure details about the schedule are saved to storage.
Visit the functions
sub folder for more details.
On the frontend, this project uses the Chrome browser extension format to create a browser plugin that grabs an article ID from the DevTo website and sends a request to the serverless function endpoint for publishing. The Chrome browser extension format works in most Chromium-based browsers, including Microsoft Edge (Preview) on Windows and Mac.
Visit the publishtodev-extension
folder for more details.
Open an issue or submit a PR.
All code used in this project is MIT licensed.