Parse the Content spec and turn it into an html representation. Make a html file and then do this: 1. Substitute for all spaces to preserve the indentation 2. Turn the line items into links <a href="http://skynet.bne.redhat.com:8080/TopicIndex/Topic.seam?topicTopicId=TOPIC_ID">Here's a line in a Content Spec [TOPIC_ID]</a> Make the url of the Skynet instance configurable in the config file.
The link should probably be <a target="_new" href=".... to open it in a new window.
So a user can create a content spec file, then run: csprocessor create My_New_Book.spec This creates a "project", which consists of a server stored Content Spec, and a local directory called My_New_Book containing a populated csprocessor.cfg file, and the latest post-processed spec file. Then the user can do: cd My_New_Book csprocessor htmlview The result is that an html version of the latest Content Spec opens in a browser, and they can start writing the topics by clicking on the topic titles in the html page, which then opens the topic in the relevant Skynet instance in another tab. Boom - magic workflow is magic.
...and the url of the skynet instance should come from the SERVER attribute in the csprocessor.cfg file of the project. Ref: https://bugzilla.redhat.com/show_bug.cgi?id=796708
Maybe this can be done by requesting the Content Spec from the Skynet REST interface, and using a Greasemonkey script to rewrite it?
Implemented using Greasemonkey on the client: https://engineering.redhat.com/docs/en-US/Engineering_Content_Services/1/html-single/Content_Spec_Processor_Guide/index.html#Configure_HTML_Preview_with_Topic_ID_display