Conversation
What is the current approach? |
The script looks for an author-mapping.php file. If it doesn't see one, it reads the authors out of the WXR and attempts to produce a mapping. It's a pain because with large imports there are typically dozens of associations that need to be manually fixed. |
|
Ok, and what does the
Because they weren't handled in author-mapping.php or...? |
Associative array.
Because the usernames typically are different when we do the import, so someone needs to create all of the old => new associations. |
|
Well, I'd go with |
|
|
You could create a |
|
I'm thrilled you guys are building this. I'm testing it now on a local import. I had a hard time figuring out how the --authors argument was supposed to be used. I initially assumed it would be a comma separated list of ID's not a file path. You probably already know, but this needs a bit more explanation |
|
Yeah, I think it's good enough. For the functional tests, I'm thinking something like this: |
|
@scribu functional tests in place (although Travis doesn't seem to be running...). Good with a merge when you are. |
|
Yeah, travis is having some issues right now: http://status.travis-ci.com/incidents/fh3cz68wk3ms Not sure why, but the test fails for me: Out: |
|
Odd. Test runs clean for me. |
Using the export-api branch (#525) to generate a file works. Going to merge that first.
(I'm using
|
… whether a number of supplemental actions are run (or not)
…entially support multiple importers.
* If a .csv filename is specified, it will look for an author mapping file. * If the .csv author mapping file doesn't exist, it will create one for you and wait for you to edit. * `--authors=create` will create any missing users, and expect that either user_email or user_logins map up directly. * `--authors=skip` will ignore any byline mapping.
…ven if just to have the user confirm they're skipping mappings.
…Writing to file %s'`
Hmm, I can't reproduce. I did an export / import yesterday on my personal website and it worked fine. The tests pass in my local environment.
Does the author already exist? Can you share more details about the import file?
Welcome to the WordPress importer :) There's a little extra HTML output everywhere. |
Now I can't reproduce either. Nevermind.
I think the problem is that all my posts have post_author=0.
Right, but if we can't hide the HTML, we should at least not show the superfluous "Success" message. |
|
Build passes.
The "Success" message indicates the subcommand completed fully, and didn't exist prematurely. I'd prefer to keep it. |
|
The test fails on my end (OS X) because That's why I added |
Could we at least show it on its own line then? |
Yep f7c0354 |
|
Just for the record, I think 6300862 is pretty damn cool. |

I started porting over Thorsten's existing cli importer on a flight yesterday. Before I dive too far into it, there are some issues I'd like to address up front.
I thought I'd pose these questions before I migrate what Thorsten wrote completely so we can change to a new direction if we'd like