Opened 15 years ago

Closed 11 years ago

#3863 closed New Feature (wontfix)

DevTool - autoChangelog

Reported by: Artur Formella Owned by: Garry Yao
Priority: Normal Milestone:
Component: General Version:
Keywords: Confirmed Cc:

Description

It would be great to have a new dev-tool to generate changelog.html. We can avoid conflicts connected with this file.

Attachments (3)

changelogtool.zip (1.3 MB) - added by Garry Yao 15 years ago.
Extract it under "_dev" folder
main.js (1.9 KB) - added by Garry Yao 15 years ago.
source script
changes.xsl (1.6 KB) - added by Michael Osipov 15 years ago.

Download all attachments as: .zip

Change History (23)

comment:1 Changed 15 years ago by Artur Formella

Of course "CHANGES.html", not "changelog.html"

comment:2 Changed 15 years ago by Garry Yao

Rate +1, the changes could be generated from svn submit comments on daily build.

comment:3 Changed 15 years ago by Michael Osipov

This could be done by retrieving fixed tickets with XML PRC and then transform it to HTML with XSLT.

comment:4 Changed 15 years ago by Garry Yao

Keywords: Confirmed added; Discussion removed
Owner: set to Garry Yao
Status: newassigned

Changed 15 years ago by Garry Yao

Attachment: changelogtool.zip added

Extract it under "_dev" folder

comment:5 Changed 15 years ago by Garry Yao

It seems for me TracXML-RPCPlugin currently doesn't support SVN changelog API, so I'd used 'ticket summary' instead of 'commit message' .

Changed 15 years ago by Garry Yao

Attachment: main.js added

source script

comment:6 Changed 15 years ago by Garry Yao

Keywords: Review? added

The authentication part in main.js is subjected to change.

comment:7 Changed 15 years ago by Michael Osipov

As far as I am concerned, there are too many dependencies for such a simple task. I think I can be done with much less effort.

One could define a custom query, read the csv export of it with Ant Get Task, transform to xml with an Ant Custom Task and them transform to HXTML with XSLT Task.

It would take the csv2xml lib (11 KiB) + stylesheet, say 10 KiB. Much less than the zip (1,3 MiB).

comment:8 Changed 15 years ago by Artur Formella

We can also use PHP (+phpSubversion client if it works) or just parse our site:

https://dev.fckeditor.net/log/CKEditor/trunk?action=stop_on_copy&mode=stop_on_copy&rev=3897&stop_rev=3097&limit=100

I think it is the simplest way.

comment:9 Changed 15 years ago by Garry Yao

Thanks for the tips, I like the simplicity promises from your approach, while I'm indented to have those dev tools developed with JavaScript, first for flexibility, then for easy maintainability (everybody could alter it later).
Regard the footprint, the source code it self is only a fews lines, does it really hurt to have more dependency jars for a dev tool?

comment:10 in reply to:  9 ; Changed 15 years ago by Michael Osipov

Replying to arczi:

We can also use PHP (+phpSubversion client if it works) or just parse our site:

https://dev.fckeditor.net/log/CKEditor/trunk?action=stop_on_copy&mode=stop_on_copy&rev=3897&stop_rev=3097&limit=100

I think it is the simplest way.

The link is broken. Anyway, the result would simply give you the log and not the fixed bugs from Trac.

Replying to garry.yao:

Thanks for the tips, I like the simplicity promises from your approach, while I'm indented to have those dev tools developed with JavaScript, first for flexibility, then for easy maintainability (everybody could alter it later).
Regard the footprint, the source code it self is only a fews lines, does it really hurt to have more dependency jars for a dev tool?

In my opinion, it does! Comparing the ratio of real source code to the deps. It's too much for my taste.

<?xml version="1.0" encoding="UTF-8"?>
<!-- ====================================================================== 

     changes-tool    
     creates a changes.html from Trac
                   
     mosipov                                                                
     ====================================================================== -->
<project name="changes-tool" default="create-changes">
    <description>
            creates a changes.html from Trac
    </description>
	<taskdef
	    name="csv2xml"
	    classname="de.oio.util.ant.CSV2XMLKonverterTask" classpath="lib/CSV2XML-ant.jar"/>
    <!-- ================================= 
          target: create-changes              
         ================================= -->
    <target name="create-changes" depends="convert-csv2xml" description="creates a changes.html from Trac">
    	<xslt in="target/changes.xml" out="target/changes.html" style="src/changes.xsl"  />
    	
    </target>

    <!-- - - - - - - - - - - - - - - - - - 
          target: convert-csv                      
         - - - - - - - - - - - - - - - - - -->
    <target name="convert-csv2xml" depends="get-csv">
    	<replaceregexp file="target/changes.csv" byline="true" match="," replace=";" flags="g" />
    	<csv2xml basedir="target" outdir="target" >
    		<include name="changes.csv" />
    		</csv2xml>
    	
    </target>
	
	<!-- - - - - - - - - - - - - - - - - - 
	          target: convert-csv                      
	         - - - - - - - - - - - - - - - - - -->
	    <target name="get-csv">
	    	<mkdir dir="target"/>
	    	<get dest="target/changes.csv" src="http://dev.fckeditor.net/query?status=closed&amp;group=resolution&amp;format=csv&amp;order=priority&amp;col=id&amp;col=summary&amp;col=milestone&amp;col=type&amp;milestone=CKEditor+3.0&amp;milestone=CKEditor+3.1"/>	
	    </target>

</project>

Almost done quick and dirty, add lib, add stylesheet.

comment:11 Changed 15 years ago by Michael Osipov

stub stylesheet (I haven't done them for a while) :-D

<?xml version="1.0"?>

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes"/>
<xsl:template match="/">
  <html>
  <body>
      <xsl:for-each select="//row">
        <xsl:value-of select="id" /> <br />
      </xsl:for-each>
  </body>
  </html>
</xsl:template>

</xsl:stylesheet>

Changed 15 years ago by Michael Osipov

Attachment: changes.xsl added

comment:12 Changed 15 years ago by Michael Osipov

I added a simple stylesheet which is almost complete.

comment:13 in reply to:  10 Changed 15 years ago by Artur Formella

Replying to mosipov:

Replying to arczi:

We can also use PHP (+phpSubversion client if it works) or just parse our site:

https://dev.fckeditor.net/log/CKEditor/trunk?action=stop_on_copy&mode=stop_on_copy&rev=3897&stop_rev=3097&limit=100

The link is broken. Anyway, the result would simply give you the log and not the fixed bugs from Trac.

Correct link: http://dev.fckeditor.net/log/CKEditor/trunk?action=stop_on_copy&mode=stop_on_copy&rev=3697&stop_rev=3097&limit=100

comment:14 Changed 15 years ago by Artur Formella

Keywords: Review- added; Review? removed

First of all - great tool Garry!

I have also some suggestions:

  • I would reverse the order of entries (newest first).
  • "New feature" list is empty.
  • What if we release CKEditor 3.1?

changelog.tpl.html should be improved or the tool could add only new entries (not from the beginning every time) to allow manual editing.

comment:15 Changed 15 years ago by Wiktor Walc

The solution based on Ant is short and simple.

I think we don't need to use javascript here, because there is no place where we actually need to use Rhino features. We're just downloading and parsing data file (correct me if I'm wrong), it can be done with pure Java, PHP or any other server side language.

Anyway, I see here a little problem: automated generation of log file relies on correct assignment of milestones and writing descriptive titles. It seems impossible to generate such a file for CKEditor 3.0 with changes since the release of CKEditor 3.0 RC (without connecting to Trac's database and running custom query to get the date when ticket was fixed for the last time, assuming that it wasn't reopened by some guy and is still opened - that's another problem).

So imho, it's something me may try to use in the next release after 3.0. In the meantime we could still create CHANGES.html manually.

If we keep tickets sorted by number in CHANGES.html, then it will be easier to compare if we're ready to use this tool. Even if we don't use automatically generated file in the release (we need more flexibility), it could be still used in the nightly build and useful to check if we didn't miss some tickets in the changelog.

comment:16 Changed 15 years ago by Garry Yao

I've talked with Wiktor right now, we result in using mosipov's Ant-based solution, we may even consider bring more flexibility later with changelog filtering capability, but as Wiktor said, the tool should become useful only from next release.

comment:17 Changed 15 years ago by Michael Osipov

This is good news (for me ;-). Please consider that my stylesheet is incomplete. I'd be happy to extend it when the time will come. XSLT ist extremely powerful.

comment:18 Changed 15 years ago by Michael Osipov

I have just received the source for the csv2xml lib from the author. So we are completely free then.

comment:19 Changed 14 years ago by Frederico Caldeira Knabben

Milestone: CKEditor 3.x

Milestone CKEditor 3.x deleted

comment:20 Changed 11 years ago by Piotrek Koszuliński

Resolution: wontfix
Status: review_failedclosed

Expired.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy