Skip to content

Conversation

@LarsenJMarquardt
Copy link
Contributor

@LarsenJMarquardt LarsenJMarquardt commented Apr 19, 2021

-Removed leading and trailing white space around the chapter names
-Removed the current ids, as these will be redistributed when the data is imported to mongodb

I don't know how the data will be imported to mongodb, but if it'll be imported straight from the csv, the chapterData will be lost. I don't know if the api exposes any of this data anyway, so it might not be a big deal, but something to be aware of.

When importing the csv data to mongodb from the command line, be sure to include the
"--maintainInsertionOrder" command, so that the chapters will be added in order and receive "_ids" on which to sort them by.

The full command should probably look something like this:
mongoimport --type csv -d lotr -c chapters --headerline --drop --maintainInsertionOrder chapters.csv

@gitfrosh
Copy link
Owner

gitfrosh commented May 4, 2021

Hello @LarsenJMarquardt, thanks so much for your contribution! This adds real value to the API 👍🏻
Also thanks for researching the mongoimport statement which made it a lot easier for me to integrate the improved data.
Your changes will be included in the next release!

Take care,
rike

@gitfrosh gitfrosh merged commit 4263e62 into gitfrosh:release May 4, 2021
@gitfrosh gitfrosh linked an issue May 4, 2021 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add default sort order for chapters

2 participants