ashishb / wp2hugo

The best WordPress to Hugo migrator (written in Go)
https://ashishb.net/tech-thoughts/migrating-from-wordpress-to-hugo/
Other
181 stars 7 forks source link

Suppress comment media download? #25

Closed iglazer closed 1 month ago

iglazer commented 1 month ago

I've got an old blog I am trying to convert and it has comments which have links to media (gravars and more). One of the old comments has a link to media which is 404'ing, which isn't a big deal because I don't really want to port the comments of the blog to Hugo. Anyway to either suppress 404's thrown via converting comments or suppress the conversion of comments all together?

ashishb commented 1 month ago

Hi @iglazer you should still get the result but with a lot of warnings. Is the migration failing due to the warnings?

iglazer commented 1 month ago

It looks like a post is failing migration because of a 404 for an image: {"level":"fatal","time":1720982186,"message":"Error: error fetching media file http://eldred.cc/images/mouse.gif: error fetching media http://eldred.cc/images/mouse.gif: 404 Not Found"}

That's the last message in the log

ashishb commented 1 month ago

Can you try without -download-media flag? I want you to know that failure fast is intentional here as I don't want to claim an incomplete migration as a success. However, I may put a failure budget where a certain number or percentage of media downloads can fail, which might be OK.

iglazer commented 1 month ago

Everything works without the download-media flag.

Is there a way for me to suppress the failures?

Thanks for the help!

i

On Jul 15, 2024 at 12:18:44 AM, Ashish Bhatia @.***> wrote:

Can you try without -download-media flag? I want you to know that failure fast is intentional here as I don't want to claim an incomplete migration as a success. However, I may put a failure budget where a certain number or percentage of media downloads can fail, which might be OK.

— Reply to this email directly, view it on GitHub https://github.com/ashishb/wp2hugo/issues/25#issuecomment-2227674701, or unsubscribe https://github.com/notifications/unsubscribe-auth/AANU267OIMVX4GDBKYDDAFDZMNESJAVCNFSM6AAAAABKZFDA36VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMRXGY3TINZQGE . You are receiving this because you were mentioned.Message ID: @.***>

ashishb commented 1 month ago

Thanks, I will add that option

ashishb commented 1 month ago

@iglazer right now, no, and this is intentional. If the download-media flag is enabled, I don't want to give a fake sense of success if one or more media files cannot be downloaded.