As single application might be better, but in case you don't want to reinvent things, there are two related calibre plugins you might want to look at.
Firstly, GoodReads Sync can import books from Goodreads to your calibre or the other way round. That includes adding them to shelves on Goodreads or tagging them based on the Goodreads shelves.
The Import List plugin can import a CSV file. It will attempt to match the entries in the CSV to books in the library. You can also manually match the books if needed or add new books.
So, generate the CSV. Use the Import List plugin to get the books into calibre. And GoodReads Sync to get the books into GR.
|