URL required in script to import from csv

AI-generated summary

Importing a Custom Forum to Discourse from CSV Files

Shenron_segamag is trying to import a custom forum to Discourse using the Zendesk script and CSV files. However, the script requires existing URLs for each category, topic, and post, which is not necessary for the import.

Shenron_segamag asks if Discourse can generate these URLs automatically and how to modify the script to prevent it from requiring old URLs.

Pfaffman suggests modifying an SQL-based importer, such as those for vBulletin or Vanilla, as the existing script may be too complex to modify. Pfaffman later clarifies that Discourse can create URLs automatically, but the script may not be designed to handle this process seamlessly.

Shenron_segamag mentions that the original SQL data is a mess, making it easier to work with CSV files.

Hi,

I’m trying to import a custom forum to Discourse, and I’m using the zendesk script, since I need to run the import from csv files.

Unfortunately, the script seems to require an existing url for each category, topic and post. I don’t need this feature, and the script fails to run if I don’t provide those urls.

My questions are :
1 - Can Discourse generate all these urls automatically ?
2 - How should I edit this script to prevent it from requiring old urls ?

Thanks.

Unless the custom forum somehow keeps its data in csv files, or you have zero programming knowledge, I’d recommend that you modify some sql-based importer.

I think vBulletin or vanilla might be good places to start.

But how to modify the existing script is mostly beyond the level of support you’re likely to get here.

The SQL is a mess, and it was somehow easier to export the data to a csv.

I was curious about the way Discourse handles the creation of new urls if an import script doesn’t do it.

And yeah, it was certainly too much to ask to rewrite parts of a script from a contributor.

Without looking at the code I can’t quite guess what’s going on. If the urls that you are referring to are the category and topic urls, then yes, they are created automation, but it sounds like the script generates the category, topic, and posts separately, so the left hand doesn’t know what the right hand is doing.

If that’s the case, you’d need to run the category creator, then put the category path in the topic creator, then put those topic paths in the post creator? If you want them all in one category, then you should use just the one url for that.

It’s hard for me to imagine that the sql is more of a mess than the csv, but sometimes I don’t have a very good imagination.