Converting RSS from markdown to WP editor

I have a RSS feed going from a markdown site to a WP site using the auto-blog plugin. The import is a bit goofy looking, since the code is incompatible.

I've looked at markdown plugins, but am unsure of how to get one to convert from a feed. Any suggestions?

  • Sajid
    • DEV MAN’s Sidekick

    Hello Nitrous Cloud,
    Hope you are doing good today :slight_smile:

    First of all since this thread is related to our AutoBlog plugin, so I am moving this thread from Members Area forum to Support forum.

    If I understood correctly, MarkDown is currently supported by WordPress itself so you don't need a plugin for it.

    Did that not work for you when you check post in WP Editor ?

    Also, if you could please share the link of RSS feed and enable support staff access then I would be able to take a closer look.

    To grant access go to WPMU DEV -> Support -> Support Access -> Grant Support Access or see this manual for more details regarding how to enable support staff access.

    Best Regards,
    Sajid

  • Nitrous Cloud
    • The Crimson Coder

    Thanks for moving it to the appropriate location, Sajid.

    From my experience, WP doesn't post MarkDown appropriately. It just comes out like it looks in the MD editor.

    Here are two articles that I just imported:
    http://steemitnews.net/2016/12/03/nine-trust-based-problems-with-bitcoin-not/
    http://steemitnews.net/2016/12/03/top-bitcoin-city-adds-auto-repair-pizza-to-roster-of-businesses-accepting-bitcoin/

    This was using the following rss feed
    https://streemian.com/rss/@steemit.news

    As you can see, the format that works for MarkDown simply isn't converting on WP. I tried activating PrettyPress, but it's not helping. I can just copy and paste from the original content and it'll work fine, but the Auto-Blog import doesn't.

    Also, it's grabbing an odd image often. You can see it on the home page - http://steemitnews.net/. This city image is unknown to me and not associated with the imported articles.

    I have granted support access so you can take it for a spin. I have some layout questions too, but I suspect they should be in the theme area, correct?

    Thanks for your help!

  • Sajid
    • DEV MAN’s Sidekick

    Hello Nitrous Cloud,
    Hope you are doing good today :slight_smile:

    Yes, by default it does not convert Markdown into readable form for me too.

    However, it does work when JetPack is installed and Markdown module is enabled. It applies the filter to convert all those markup into html code in a readable form.

    Here is what I did to get those characters converted correctly.

    1. Installed Jetpack plugin and connected my site with WordPress.com.

    2. Enabled Markdown module from Jetpack -> Settings.

    3. Created feed in AutoBlog and processed it.

    If you don't want to use Jetpack, then you can also use one of following plugin.
    https://wordpress.org/plugins/jetpack-markdown/ (this is the single module extracted from JP)

    https://wordpress.org/plugins/wp-markdown-editor/ (complete editor to type with Markdown).

    Hope that helps! Feel free to post a reply if you need further assistance :slight_smile:

    Best Regards,
    Sajid

  • Nitrous Cloud
    • The Crimson Coder

    Thanks Sajid,

    I can't tell yet if it's helping, but it seems to be. For some reason, the first image won't show up in my main featured article though. You can see it's the top one on the home page now.

    I'll keep monitoring and see how it goes.

    Regards,
    Joe

  • Sajid
    • DEV MAN’s Sidekick

    Hello Nitrous Cloud,
    Hope you are doing good today :slight_smile:

    Did you enabled the Import image or Featured Image addon from AutoBlog -> Add-ons. Also, after enabling you would have to select one of relevant option to actually import and attach the image according to the RSS feed.

    Let me know if you need further assistance :slight_smile:

    Best Regards,
    Sajid

  • Nitrous Cloud
    • The Crimson Coder

    Hi Sajid,

    I had the featured image import addon activated, but not the import one.

    For the featured image setting, I have "Find the first image within content of a feed item" right now. It's been set that way most of the time, though I did try other settings to test it.

    The Image Import option is on now too, in case that helps.

    Thanks
    Joe

  • Nitrous Cloud
    • The Crimson Coder

    Update:

    This is what I got with the settings above.

    http://steemitnews.net/2016/12/06/where-does-our-household-water-come-from-and-is-the-worlds-fresh-water-supply-is-really-running-out/

    As you can see, no images - just the urls.

    But look! http://steemitnews.net/2016/12/06/elon-musks-global-internet-global-chaos-according-to-the-media-hype-on-pizzagate-and-fakenews/

    This one seemed to work fine, other than the signature button at the bottom.

    Those are from the Featured section. The ones in the right column (News) and the four column section below (Newslinks) are reacting with similar irregularity.

    Yeah, I'm confused. :slight_smile: Not to worry. It's not the first time.

    Thoughts?

    Thanks
    Joe

  • Sajid
    • DEV MAN’s Sidekick

    Hello Nitrous Cloud,
    Hope you are doing good today :slight_smile:

    That means the plugin and its add-ons are working fine. Its just the content you are pulling is not in a valid format.

    Our plugin will try to find the URL of the image in html img tag by using algorithm. Which is in this case not true because, there is no actual tag is available in the feed.

    So let me try to explain it. You may find the following code in your RSS feed source code (just copy the below code as it and find). This is actually an image HTML tag that is being imported successfully for this post.

    <center><img src="http://www.steemimg.com/images/2016/12/06/DANGER-INTERNET-AHEAD-PROCEED-WITH-CAUTION24060.png" alt="DANGER-INTERNET-AHEAD-PROCEED-WITH-CAUTION24060.png" border="0"></center>
    <center><em>

    This actually converts into a valid HTML image tag that can be recognized by the plugin and therefore the image is imported successfully.

    You can decode the above code on this third party online utility. Add this code in Encoded and you will see the valid HTML img tag in Decoded field.

    Now for the post it does not work, here is the encoded HTML code provided by RSS feed.

    <html>
    <center><p>https://imgs.mongabay.com/wp-content/uploads/sites/20/2015/10/03151633/1280px-Mt_Banner_and_Thousand_Island_Lake.jpg</p></center>
    <p>

    Do the same with this code in https://mothereff.in/html-entities site and you will it converts into an invalid HTML code instead of valid HTML img code.

    So, if the other site is yours then you have to fix this issue there. If no then I don't think we can do much here on plugin's side.

    Take care and have a nice day :slight_smile:

    Best Regards,
    Sajid

  • Nitrous Cloud
    • The Crimson Coder

    Thanks Sajid,

    So the Markdown converter in Jetpack is simply unable to translate some of the code? You think It's possible that the originating site has set up some atypical markdown codes?

    Originally, nothing was formatted correctly. Now some things are, but others aren't. So it's pretty confusing for me, being a non-programmer.

    I realize that, at this point, it's not the Auto Blog plugin. Just trying to figure out the next step, if I can find one.

    Thanks again,
    Joe

  • Sajid
    • DEV MAN’s Sidekick

    Hello Nitrous Cloud,
    Hope you are doing good today :slight_smile:

    So the Markdown converter in Jetpack is simply unable to translate some of the code?

    Well, I don't think its JP Markdown! Actually its the RSS feed that does not have valid image code in it for Auto Blog to find and import that image even before JP Markdown came into play.

    Also, sorry about the last reply, our forum automatically decoded HTML entities into HTML tags.
    Here is the code I were referring above:
    Invalid:
    http://pastebin.com/QcbBFLSR
    Valid:
    http://pastebin.com/XxpMx05h

    So, according to this, JP Markdown and Auto Blog are working fine. Its the feed format that some times break it.

    I know you are getting compatibility issues between JetPack and Comments +. So if its just Markdown you are using JetPack for, then you can just use this plugin instead:
    https://wordpress.org/plugins/jetpack-markdown/

    Its author don't support it anymore but it should still work.

    Best Regards,
    Sajid

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.