[ 
https://issues.apache.org/jira/browse/ODFTOOLKIT-308?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13224006#comment-13224006
 ] 

charitha Madusanka commented on ODFTOOLKIT-308:
-----------------------------------------------

Exposing ODF toolkit functions through a command line interface idea is a very 
interesting. Here is abstraction of  my approach.
 
First we need to identify the functions we provide through the CLI and 
implement that fuctions ( ex : search, merge, replace, format ....)  
 
Then we need to figure out commands structure. ( eg.  odf < function > <option 
... > <files....> ).

We can to use a Java CLI parsing library [1][2] to process the command line 
options.

Finally we need to invoke the back-end functions appropriate to command.

[1] - http://commons.apache.org/cli/
[2] - http://pholser.github.com/jopt-simple/
                
> GSoC:  ODF Command Line Tools
> -----------------------------
>
>                 Key: ODFTOOLKIT-308
>                 URL: https://issues.apache.org/jira/browse/ODFTOOLKIT-308
>             Project: ODF Toolkit
>          Issue Type: New Feature
>            Reporter: Rob Weir
>            Assignee: Rob Weir
>              Labels: gsoc2012, mentor
>
> GNU/Linux, and UNIX before then has shown the great power of a text 
> processing via simple command line tools, combined with operating facilities 
> for piping and redirection. This filter-baed text processing is what makes 
> shell programming so powerful.  But it only works well for text documents.  
> But what about more complex, WYSIWYG documents, spreadsheets, word 
> processors, with more complex formats, often not text based at all?  The tool 
> set becomes far weaker.
> The Apache ODF Toolkit is a Java API that gives a high level view of a 
> document, and enables programmatic manipulation of a document.  We have 
> functions for doing things like search & replace.  There is a lot you can do 
> using the ODF Toolkit.  But it still requires Java programming, and that 
> limits its reach to professional programmers.
> What if we could write, using the ODF Toolkit, a set of command line 
> utilities that made it easy to do both simple and complex text manipulation 
> tasks form a command line, things like:
> 1) Concatenate documents
> 2) Replace slide 3 in presentation A with slide 3 from presentation B
> 3) Apply the styles of document A to all documents in the current directory
> 4) Find all occurances of "sausages" in the given document and add a 
> hyperlink to sausages.com
> and so on.
> Clearly analogs of cat, grep, diff and sed are obvious ones. Maybe something 
> awk-like that works with spreadsheets?  No need to be slavish to the original 
> tools, but create something of similar power, but which operate on ODF 
> documents.  For example, an alternative solution might be to write a new 
> shell processor that has native commands for ODF document manipulation.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to