Coder Social home page Coder Social logo

dev-to-git's People

Contributors

bblackwo avatar jmcdo29 avatar maxime1992 avatar xhiroga avatar zakhenry avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

dev-to-git's Issues

One-command article creation

Thinking about how to extend dev-to-git so that it can automatically create an article without the manual step of going to dev.to

proposed command

dev-to-git create-article "My amazing new blog post"

I've raised #7 to better help with the creation of more complicated CLI commands

basically the way I see this working is

  1. command creates a new markdown file without saving it to disk
    • Frontmatter is initialized with the title and empty values for all other fields
  2. dev.to POST api is invoked creating this new article
  3. response is analysed and the article ID is inserted into the frontmatter of the in-memory markdown article
  4. On success of all above steps, the article is written to disk
  5. If there is a .dev-to-git.json config file present (I'm planning on making this optional), the newly created article is appended.

By inserting the id into the frontmatter, this gives us the ability to update the article by simply reading the markdown file to be published.

Publishing a blog post doesn't work

With latest version (1.4.0) it's trying to fetch the article first before publishing and if it's a draft but we want to publish the draft returns 404 and then the deploy is blocked.

Flag to disable the image translation

I'd rather not keep my images in my git repo (cause git is slow with binaries) so I'd like to upload them separately and just link to them.

However, when I do this it tries to translate it to a GitHub link and it breaks. Would be nice to be able to turn this functionality off with a flag.

Cli?

Is this a cli tool?

If so you should put that in the readme. Mabye even the name!

Great project and thank you for sharing!

if article is the same do not update

As this can be used as a mono repo for articles, every time one of them if going to change, they'll all get published.

Thanks to forem/forem#3394 we can now fetch an article and its markdown so we should be able to compare the local markdown with the remote one and skip the update if there's no diff.

WARNING dev.to broken, I can no longer blog or edit MAYBE come from this tool?

EDIT: 2020/12/08 bug fixed, came from dev.to

After following the blog post instructions, I managed to use dev-to-git to upload a test blog post.

I extended to a second blog post, then dev.to broke. I can no longer blog on dev.to nor edit an existing blog post, always getting 404.

I reported the issue to dev.to forem/forem#11690

At this point, one can't tell if the bug is from dev-to-git, from dev.to or from the interaction of them = I'm not blaming dev-to-git.

But just in case I suggest NOT using dev-to-git while the linked bug is not fixed, especially if your dev.to blogposts are critical to your business.

HTTPError: Response code 429 (Too Many Requests)

I believe that dev.to has a load balancer or something that prevents too many requests from a single host from being fired off too quickly. Both locally and in my CI/CD pipeline, I frequently get these errors. Due to these errors, it sometimes takes executing dev-to-git multiple times to get my posts updated. I think that a slight delay added between publishing posts could avoid this issue.

[DRAFT] Article "CI Test Success" encountered an error:
Error name: "HTTPError"
Error message: "Response code 429 (Too Many Requests)"
Error stack: "HTTPError: Response code 429 (Too Many Requests)
    at EventEmitter.<anonymous> (/Users/devin/code/nx/playground/nxtend-playground/node_modules/dev-to-git/bin/dev-to-git.umd.js:7080:23)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)"
[PUBLISHED] Article "How to Configure Prettier to Automate Code Formatting" is already up to date
[PUBLISHED] Article "Developing Ionic React Apps in an Nx Workspace with @nxtend/ionic-react" is already up to date
[PUBLISHED] Article "Release @nxtend/ionic-react 2.0.0" is already up to date
[PUBLISHED] Article "@nxtend/ionic-react 2.2.0" encountered an error:
Error name: "HTTPError"
Error message: "Response code 429 (Too Many Requests)"
Error stack: "HTTPError: Response code 429 (Too Many Requests)
    at EventEmitter.<anonymous> (/Users/devin/code/nx/playground/nxtend-playground/node_modules/dev-to-git/bin/dev-to-git.umd.js:7080:23)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)"
[PUBLISHED] Article "Build Cross-Platform Applications in a Monorepo with Nx, Ionic, and Capacitor" is already up to date
[PUBLISHED] Article "Building an Nx Plugin to Add Dependencies to a Project" is already up to date
[PUBLISHED] Article "Creating an ng add Schematic for an Nx Plugin" is already up to date
[PUBLISHED] Article "Executing External Schematics in an Nx Plugin" is already up to date
[PUBLISHED] Article "Extending Schematics in an Nx Plugin" is already up to date
[PUBLISHED] Article "Running Nx Affected Commands in GitHub Actions" is already up to date
[PUBLISHED] Article "Nx Brings High-Quality CLI Tooling to React" is already up to date

Error message if dev.to refuses is missing reason

I had a "bad" cover_image: foo.jpg and dev.to won't let you update your content with a "bad" cover_image so I got an error...

but the error was not very helpful πŸ˜…
only after deleting all the content and each front matter entry line by line did I found out what the issue was πŸ˜…

can we improve the error message? πŸ™

[DRAFT] Article "Introducing: Modern Web" encountered an error:
Error name: "HTTPError"
Error message: "Response code 422 (Unprocessable Entity)"
Error stack: "HTTPError: Response code 422 (Unprocessable Entity)
    at EventEmitter.<anonymous> (/html/web/node_modules/dev-to-git/bin/dev-to-git.umd.js:7080:23)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)"

Different Authors within one Repository

For out dev.to/rxjs (https://github.com/rxjs-blog/blog) organization I would like to have one central repository, where everyone can file prs to publish his article within the org. Therefore I would appreciate supporting authors on blog article level and not having one central dev.to user configured in the travis pipeline. I don't if that is even feasible?

Many thanks for maintaining this project. It helped me a lot with setting up the blogs!

The automated release is failing 🚨

🚨 The automated release from the master branch failed. 🚨

I recommend you give this issue a high priority, so other packages depending on you could benefit from your bug fixes and new features.

You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. I’m sure you can resolve this πŸ’ͺ.

Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.

Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the master branch. You can also manually restart the failed CI job that runs semantic-release.

If you are not sure how to resolve this, here is some links that can help you:

If those don’t help, or if this issue is reporting something you think isn’t right, you can always ask the humans behind semantic-release.


Missing package.json file.

A package.json file at the root of your project is required to release on npm.

Please follow the npm guideline to create a valid package.json file.


Good luck with your project ✨

Your semantic-release bot πŸ“¦πŸš€

Update an article which has an empty body

If an article has an empty body, it should be able to update (which is not the case)

Error name: "Error"
Error message: ""
Error stack: "Error
    at Article.<anonymous> (/home/maxime/Documents/perso/projects/my-dev.to/node_modules/dev-to-git/bin/dev-to-git.umd.js:11180:39)
    at step (/home/maxime/Documents/perso/projects/my-dev.to/node_modules/dev-to-git/bin/dev-to-git.umd.js:77:27)
    at Object.next (/home/maxime/Documents/perso/projects/my-dev.to/node_modules/dev-to-git/bin/dev-to-git.umd.js:58:57)
    at fulfilled (/home/maxime/Documents/perso/projects/my-dev.to/node_modules/dev-to-git/bin/dev-to-git.umd.js:48:62)
    at processTicksAndRejections (internal/process/task_queues.js:89:5)"

To repro:

  • create a draft on dev.to
  • set a title but no body
  • try to update that article from the command line with yarn run dev-to-git --dev-to-token YOUR-TOKEN

422 (Unprocessable Entity)

I'm still trying to use dev-to-git, hoping a successful upload could fix my dev.to account?

I'm getting 422 (Unprocessable Entity)

No idea what is wrong.

Seeing #27 I checked my cover image = I don't have one.

Also checked links to all images.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.