How to Bulk Convert XML to Markdown

To summarize: you ask for a script to solve your problem. Someone provides you not only with that but also with detailed guidance on installing and using it. And then you can’t be bothered with it because using the Terminal and following the guidance could “mess up” your system. To me, that looks like wasting a lot of time.

2 Likes

I reread my original post. You are correct. I asked for a script. My apologies. I forgot I asked for a script. My first mistake this year. :grinning:

My assumption is that I could download a script into DEVONthink and run it. Once I read the instructions that were kindly given, it felt overwhelming. I was seeking a “plug and play” solution given my lack of experience with scripts, coding, Git, etc.

I apologize for not remembering and acknowledging “I got what I asked for.” :slightly_smiling_face: My mistake was an oversight, not intentional.

That said, the suggestions are appreciated, but what is required is more than I’m willing to do for what I hoped was a one-time plug and play solution.

Thanks again for your kind assistance.

Do you have Xcode or Command Line Tools for Xcode installed? My recollection was that Apple stopped including Python with macOS like rkaplan mentioned – not just Python 2, any Python. Your Python is probably from Xcode? I don’t think it includes pip, which is included in the official python.org installer and assumed by the developer’s instructions. Otherwise the script is supported by Python 3.6 and up.

For a comparison, I get this on Ventura 13.7.2:

Searching for “python” in /Library with EasyFind reveals /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/bin/python3

I don’t have Xcode itself installed, that might explain our different locations. (I only installed Command Line Tools for Xcode to install homebrew… My current version is 15.1 – last time I updated them was almost a year ago. I assume that’s why you have 3.10 and I have 3.9).


@rkaplan Touché :joy:

Sure, dependencies can be a pain. (homebrew’s sandbox workflow didn’t look crazy complicated, I just never bothered.) As this case is a one-time operation it shouldn’t really matter, as long as the script runs. I tried to provide simple, clear instructions and thought the official installer would be the most foolproof.

Thank you for the recommendation, by the way. I don’t think Replit is something I have a need for, but it’s good to be aware of.

Fair enough. I don’t see any particular risk, but I get that unfamiliar things can make one nervous and that the Terminal can be intimidating for the uninitiated.

I’m not a programmer or script wizard – the other participants in this thread have far more experience with scripting than I do. But I’m at least familiar enough with the Terminal that it doesn’t seem like black magic to me. While the solution I suggested might not fully deserve a designation of “plug and play”, I honestly think it’s pretty close.

I must admit it pains me a little to see you give up when there seems to be an ideal, ready-made solution just in front of you… Enough that I will extend my hand further still:

We’re talking about a public blog, right? Is there any private or sensitive information in the XML you exported from Squarespace? If you’re comfortable with it, send me the file and I will run the script with it and return you the result. A few hundred blogposts in plaintext shouldn’t be a large amount of data, and I don’t expect images to be measured in gigabytes.
If you’d like that, I’ll DM you my email address.

1 Like

Wow, that is incredibly kind of you. :pray:t2: I’d feel guilty having you take time to do something that with enough effort, I “may” be able to do myself. As to the content, nothing private. It is a blog for leaders of Christian schools. Here’s the link so you can look at it. After reviewing it, you may not wish to help, depending on your perspective on religion. :slightly_smiling_face: Rest assured, I’ll not be offended in the least if you would prefer not to help given the content.

For those who may be interested - I created a REPL from the Github repository. Anyone can run it with this link and a free Replit.com account

It seems to me that the export to .xml feature of squarespace may be deprecated in favor of a limited export to WordPress feature. Do you have a squarespace.xml file you want to try this on which you have exported from your current version of squarespace? Just drag/drop your .xml file to replace the one there now. Note that free accounts on Replit have public REPLs - so do not post any private documents there.

https://replit.com/join/nuykwllbye-rkaplan

I’m offering, don’t feel guilty. I don’t expect it to take a lot of time, otherwise I’m not sure I would offer :wink:

I don’t consider myself religious—at least not in any traditional sense—but I’m pretty open-minded and don’t discriminate like that. As long as I’m not aiding you in something clearly harmful, I don’t really care about the contents of your blog.

I asked just to be sure, and since I don’t know if the XML file contains anything besides the blog content itself.

But maybe you want to try @rkaplan’s link first?


I don’t know anything about Squarespace’s backend and what might have changed, but did you look here? Exporting Your Site – Squarespace Help Center

What content will and won't export

Because of how WordPress is designed, it’s not possible to import all types of Squarespace content. Our .xml file is primarily set up to export the content that will import to your WordPress site.

What content exports

  • Layout pages
  • One blog page, including all of its posts and up to 1000 comments per post
  • Text blocks
  • Image blocks
  • Text from other blocks like the embed block and Instagram block will export with minimum structure
  • Gallery pages, including York project pages (version 7.0 only)

What content won’t export

  • Other page types (including album pages, cover pages, index pages, info pages, events pages, portfolio pages, and store pages)
  • Content in page-specific headers, footers, and sidebars
  • More than one blog page
  • Dropdowns
  • Audio blocks
  • Product blocks
  • Video blocks
  • Drafts
  • Style settings
  • Custom CSS
1 Like

I did look there and other places - I saw different explanations which did not match what I saw on the trial account I just opened. Perplexity says this- not sure if it is correct:

1 Like