WordPress.org

Ready to get started?Download WordPress

Forums

Best way to add text files as posts (2 posts)

  1. benzdouglas
    Member
    Posted 1 year ago #

    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.
    example:
    File name: day13.txt
    -----
    2012-03-26
    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!

  2. benzdouglas
    Member
    Posted 1 year ago #

    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?

Topic Closed

This topic has been closed to new replies.

About this Topic