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

Uwe Schindler commented on LUCENE-9321:
---------------------------------------

Hi,
I can look at this. The idea of that piecie is just to generate the linklist. 
XSL is fine for that, if you prefer something else, it's fine. I have the 
following plan:

- the first step is collecting all build files, filters some of them, converts 
them to URL and concats all those URL using "|". The result is a property
- the second step wasn't added by me: It is more or less only grepping the 
Default Codec out of Codec.java. I think that should be some one-liner with 
groovy: Load file, apply regex, return result. I would not port that using Ant. 
Most stuff like this is so complicated in ant, because you are very limited in 
what you can do. All this resouce/filtering is more or less way too much work 
to do. A single line of Groovy can do this most of the times. 
- The XSL is pain simple, the interesting part is only that it takes the 
parameters from the first 2 steps as input and generates the HTML out of it. 
Can be easily ported using Groovy code (Groovy knows XSL, too)
- The last step is converting some markdown files to HTML. I have no idea if 
there's a plugin available to do that. It's basically a macro that uses the 
copy task to copy some markdown file (input) to an output file and converts it 
to HTML.

To test this, jsut run "ant process-webpages" and look into build/docs folder.

My plan:
- Instead of colecting build.xml files, just ask Gradle for all projects and 
filter them. The later scripts just need to get the directory names relative to 
the docs root folder of all modules to create the links
- The extraction of codec should be a one-liner: open file, read as string, 
apply regex, assign result to Groovy variable
- The XSL step could maybe replaced by generating a temporary generated 
markdown "overview" file with a list of all subdirectories, the title and the 
default codec.
- Use some Gradle task to convert all makrdown input files (including the one 
generated previously) to HTML.

If you have some hints where to place the task and if there's a Markdown->HTL 
converter readily available for Gradle, I'd happy to code it :-) For Maven 
there's a plugin to do that, I use it quite often to generate documentation.

> Port documentation task to gradle
> ---------------------------------
>
>                 Key: LUCENE-9321
>                 URL: https://issues.apache.org/jira/browse/LUCENE-9321
>             Project: Lucene - Core
>          Issue Type: Sub-task
>          Components: general/build
>            Reporter: Tomoko Uchida
>            Assignee: Tomoko Uchida
>            Priority: Major
>
> This is a placeholder issue for porting ant "documentation" task to gradle. 
> The generated documents should be able to be published on lucene.apache.org 
> web site on "as-is" basis.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to