To add opening tags to a PGN with pgn-extract, it's necessary to also have the eco.pgn file. Ever since I first looked at it I've wanted to update it. Today I found this over at GitHub: https://github.com/lichess-org/chess-openings
In it you can find a list of every named opening used by Lichess. Here is a formatted version of that list:
https://chessnerd.net/lichess-named-openings.txt
And here is that list turned into a new version of the eco.pgn file. I've tested it with pgn-extract, and it works the way it's supposed to.
https://chessnerd.net/eco.pgn
Alternate pgn-extract eco.pgn
Moderators: Elijah, Igbo, timetraveller