The UI for creating annotations in the viewer is done. Serializing and displaying annotations is next. After that storing them in the db and having some dedicated UI for browsing/searching them across books.
You can tryout the UI (its a bit rough at the moment) with
Code:
calibre-debug -c "from calibre.utils.rapydscript import *; compile_viewer();" && CALIBRE_ENABLE_DEVELOP_MODE=1 calibre-debug -w file.epub
Then press the "a" key to start creating an annotation. Note that currently you can only highlight, adding text to highlights is not yet implemented.