{"id":20280143,"url":"https://github.com/anmol-baranwal/devtogithub","last_synced_at":"2025-04-11T06:35:03.681Z","repository":{"id":224732600,"uuid":"744686927","full_name":"Anmol-Baranwal/DevtoGitHub","owner":"Anmol-Baranwal","description":"Save your DEV.to articles and reading list on GitHub with a bunch of useful options.","archived":false,"fork":false,"pushed_at":"2024-03-12T19:05:18.000Z","size":731,"stargazers_count":17,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-03T04:05:43.735Z","etag":null,"topics":["actions-workflow","dev-api","devto","github-action","github-config","save","workflow"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/Anmol-Baranwal.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"Contributing.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["Anmol-Baranwal"]}},"created_at":"2024-01-17T20:01:38.000Z","updated_at":"2025-03-11T07:11:46.000Z","dependencies_parsed_at":"2024-02-27T13:46:24.790Z","dependency_job_id":"c0fa5e61-5290-4bbb-8fcb-c66e1402f4e3","html_url":"https://github.com/Anmol-Baranwal/DevtoGitHub","commit_stats":null,"previous_names":["anmol-baranwal/devsync"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anmol-Baranwal%2FDevtoGitHub","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anmol-Baranwal%2FDevtoGitHub/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anmol-Baranwal%2FDevtoGitHub/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anmol-Baranwal%2FDevtoGitHub/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Anmol-Baranwal","download_url":"https://codeload.github.com/Anmol-Baranwal/DevtoGitHub/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248357752,"owners_count":21090400,"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":["actions-workflow","dev-api","devto","github-action","github-config","save","workflow"],"created_at":"2024-11-14T13:34:32.517Z","updated_at":"2025-04-11T06:35:03.632Z","avatar_url":"https://github.com/Anmol-Baranwal.png","language":"TypeScript","readme":"![DevtoGitHub Banner](https://github.com/Anmol-Baranwal/DevtoGitHub/assets/74038190/839a978c-cfa3-4977-a7a4-5656354642e0)\n\n# DevtoGitHub\nSave your DEV.to articles and reading list with a bunch of useful options.\n\n## Use cases\n\n\u003e The problem is that there is no way to save the articles or reading list from DEV.to as a backup, and this solves that in an efficient way.\n\n- The workflow can save your articles each in a different markdown file.\n- The details like tags, cover image, URL, and published time is shown in a proper format.\n- The best part is that you can create a table of contents in the readme to view and visit each of your articles in the saved repository.\n- You can also save your reading lists with specified structures and URLs for easy access.\n- You can display the reading time for each article in the reading list.\n- You can customize the directory in which you want to save the articles and the reading list.\nYour sentences are clear, but here are some minor grammar adjustments for clarity and correctness:\n- I've included [custom logic](https://github.com/Anmol-Baranwal/DevtoGitHub?tab=readme-ov-file#the-concept-of-excludetags-and-mustincludetags) based on tags to provide you with more flexibility in managing your reading list.\n- All articles and the reading list will be fetched regardless of the total number.\n- If you update an article on DEV, it will be automatically updated here the next time the workflow runs.\n- You can synchronize your reading list from DEV. For instance, if you remove any article from the reading list on DEV, then it will also be removed in the reading list in the readme.\n\n---\n\n## 🚀 Getting Started\n\n- Before you continue, you should take a few steps to create a repository and generate an API token from DEV. Don't worry, you can use this [complete guide](./GetStarted.md), which has clear instructions and image examples for each step.\n\n- Create a file in the repository at the following path: `.github/workflows/dev-sync.yml` and paste the following code into it.\n\n```yml\nname: DevtoGitHub\n\non:\n  schedule:\n    - cron: \"0 0 * * *\" # Run daily, adjust as needed\n  # The lines below will allow you to manually run the workflow with each commit\n  workflow_dispatch:\n  push:\n    branches: [\"main\"]\n\njobs:\n  save-articles:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout Repository\n        uses: actions/checkout@v3\n\n      - name: Run DevtoGitHub\n        uses: Anmol-Baranwal/DevtoGitHub@v1\n        with:\n          devApiKey: ${{ secrets.DEV_TOKEN }}\n          saveArticles: true # default\n          outputDir: \"articles\" # this will save the articles in \"articles\" directory\n          saveArticlesReadme: true # this will create a table of content for easy navigation\n```\n\n- For detailed instructions on custom configuration and visual samples, please refer to the [examples](./Examples.md). To get started, I've also mentioned some of the [common cron schedule](https://github.com/Anmol-Baranwal/DevtoGitHub/blob/main/Examples.md#other-options) for you to use in the workflow.\n\n---\n\n## Inputs\n\nVarious inputs are defined to let you configure the action:\n\n| Name | Description | Default | Required |\n| ---- | ----------- | ------- | -------- |\n| `gh-token` | The GitHub token for authentication. | `'${{ github.token }}'` | `No` |\n| `devApiKey` | The API key from your DEV. | `''` | `Yes` |\n| `saveArticles` | This will save your articles in respective markdown file. | `'true'` | `No` |\n| `outputDir` | The directory to save your articles. Default will save it under articles directory. | `'articles'` | `No` |\n| `saveArticlesReadme` | To create a table of contents for your articles in readme (same directory). | `'false'` | `No` |\n| `readingList` | To create a reading list from DEV. | `'false'` | `No` |\n| `readTime` | To include the reading time for each article in the reading list. | `'false'` | `No` |\n| `outputDirReading` | The output directory for saving the reading list (Readme.md). Default will save it under root directory. | `''` | `No` |\n| `excludeTags` | To filter the reading list to avoid this tag. Use commas to separate if there are multiple tags. | `''` | `No` |\n| `mustIncludeTags` | To create a reading list to include this tag prioritizing over excludeTags. Use commas to separate if there are multiple tags. | `''` | `No` |\n| `branch` | The git branch to use for these process. | `'main'` | `No` |\n| `conventionalCommits` | To use conventional commit message standards. | `'true'` | `No` |\n| `synchronizeReadingList` | To synchronize the reading list from DEV. Removing an article from the reading list on DEV will also remove it from the repository. | `'false'` | `No` |\n\n\u003cbr\u003e\n\n## The concept of excludeTags and mustIncludeTags\n\nThe Combinations that you can use with `readingList`:\n\nAs you're aware, there are four tags (max) for each article.\nSo, I devised a way to give you some flexibility based on the tags.\n\nSuppose you want to remove some articles with tag `#discuss` but want to include the post if that article with `#discuss` tag also has a `#programming` tag. So, you can include `#discuss` in `exlcudeTags` \u0026 `#programming` in `mustIncludeTags`.\nIn case you feel confused. Let's understand it with an example.\n\nSuppose we have an article with tags: `['react', 'javascript', 'frontend', 'tutorial']`.\n\n- If `excludeTags` is 'frontend' and `mustIncludeTags` is 'javascript'. The article is included because it has the `javascript` tag (even though it also has the `frontend` tag).\n- If `excludeTags` is 'tutorial' and `mustIncludeTags` is empty (default), the article will be excluded because it has the `tutorial` tag.\n- If `excludeTags` is 'backend' and `mustIncludeTags` is 'typescript'. The article is included because it does not have the `backend` tag.\n- These cases will work for multiple tags, and `mustIncludeTags` will only work if `excludeTags` is provided.\n\n---\n\n## 🤝 How to Contribute?\n\nAll changes are welcome. Please read our [contributing guidelines](Contributing.md)\n\nFeel free to suggest any features or report bugs using these [issue templates](https://github.com/Anmol-Baranwal/DevtoGitHub/issues/new/choose).\n\n---\n\n## 📝 License\n\n\u003ctable\u003e\n  \u003ctr\u003e\n     \u003ctd\u003e\n       \u003cp align=\"center\"\u003e \u003cimg src=\"https://github.com/rupali-codes/LinksHub/assets/66154908/65ae0c03-9cad-47a6-80b8-23c91cd2ac4e\" width=\"80%\"\u003e\u003c/img\u003e\n    \u003c/td\u003e\n    \u003ctd\u003e \n      \u003cimg src=\"https://img.shields.io/badge/License-MIT-yellow.svg\"/\u003e \u003cbr\u003e \nThe scripts and documentation in this project are released under the \u003ca href=\"./LICENSE\"\u003eMIT License\u003c/a\u003e. \u003cimg width=2300/\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n---\n\n## \u003cimg src=\"https://user-images.githubusercontent.com/74038190/221857984-5bf77e81-6f65-4502-a7c8-f29a978efb3f.png\" alt=\"bullseye\" width=\"25\" /\u003e Tech \u0026 Tools\n\n\u003e In case you want to run the action locally, without having to commit/push every time, you can use the [act](https://github.com/nektos/act) tool.\n\n\u003cimg src=\"https://img.shields.io/badge/TypeScript-007ACC?style=for-the-badge\u0026logo=typescript\u0026logoColor=white\" /\u003e \u003cimg src=\"https://img.shields.io/badge/GitHub_Actions-2088FF?style=for-the-badge\u0026logo=github-actions\u0026logoColor=white\" /\u003e\n\u003cimg src=\"https://img.shields.io/badge/Postman-FF6C37?style=for-the-badge\u0026logo=Postman\u0026logoColor=white\" /\u003e\n\n- I've used Forem v1 APIs for building DevtoGithub. You can refer to the [docs](https://developers.forem.com/api/v1).\n\n---\n\n## Author \n\n\u003e Feel free to contact me if you need a custom workflow for your project. I'll be happy to build one.\n\n\u003ctable\u003e\n\u003ctd align=\"center\" width=\"200\"\u003e\u003cpre\u003e\u003ca href=\"https://github.com/Anmol-Baranwal\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/74038190?v=4\" width=\"200\" alt=\"GitHub Profile of Anmol Baranwal\" /\u003e\u003cbr\u003e\u003csub\u003eAnmol Baranwal\u003c/sub\u003e\u003c/a\u003e\u003cbr\u003e@Anmol-Baranwal\u003c/pre\u003e\u003c/td\u003e\n\u003c/table\u003e\n\nI would appreciate if you could give this repository a star 🌟. It would help others to discover this. \nThank you for your support 💜\n","funding_links":["https://github.com/sponsors/Anmol-Baranwal"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanmol-baranwal%2Fdevtogithub","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanmol-baranwal%2Fdevtogithub","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanmol-baranwal%2Fdevtogithub/lists"}