Bug 796540

Summary: RFE: htmlview command for csprocessor
Product: [Community] PressGang CCMS Reporter: Joshua Wulf <jwulf>
Component: CSProcessorAssignee: Lee Newson <lnewson>
Status: CLOSED WORKSFORME QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 1.xCC: jwulf, lcarlon
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-05-01 07:41:35 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Joshua Wulf 2012-02-23 07:04:28 UTC
Parse the Content spec and turn it into an html representation.

Make a html file and then do this:

1. Substitute &nbsp; for all spaces to preserve the indentation
2. Turn the line items into links

&nbsp;&nbsp;<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.

Comment 1 Joshua Wulf 2012-02-23 14:30:13 UTC
The link should probably be 

<a target="_new" href="....

to open it in a new window.

Comment 2 Joshua Wulf 2012-02-23 14:33:45 UTC
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.

Comment 3 Joshua Wulf 2012-02-23 14:48:39 UTC
...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

Comment 4 Joshua Wulf 2012-03-21 04:27:55 UTC
Maybe this can be done by requesting the Content Spec from the Skynet REST interface, and using a Greasemonkey script to rewrite it?