Support » Fixing WordPress » Best way to add text files as posts

  • I’ve been working on my travel website and I’d like to import a bunch of text documents as posts.

    What I have:
    A whole bunch of folders (each for a particular trip) with text documents for each day of travel. They’re not really standardized, but I could go through all of them and arrange them such that it would be the date, title, and then the content.
    File name: day13.txt
    Porto to Lagos

    Checked out
    walked around
    blah blah blah…

    Instead of laboriously copying and pasting the title/content into a post and then changing the time stamp – which would take forever, I’m wondering how I would write a parsing script that would shuffle these into wordpress posts (or at least into a CSV format which I could then import).

    Extra points if I can somehow import the country as a tag or custom field!

Viewing 1 replies (of 1 total)
  • I assume I would want to somehow get the text files to be readable by the CSV Importer plugin, but I’m too dumb to know how to do that. Can someone enlighten me?

Viewing 1 replies (of 1 total)
  • The topic ‘Best way to add text files as posts’ is closed to new replies.