[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Script help for docs

From: Kevin Grover <kevin_at_kevingrover.net>
Date: Tue, 29 Jun 2010 12:30:54 -0700

Here's a version in Python. It's pretty crude, but it ran:

H:\dl\src\tsvn-trunk>python chkidd.py doc\source\en
src\Resources\TortoiseProcENG.rc src\Resources\TortoiseMergeENG.rc

# IDDs not found in XML files for src\Resources\TortoiseProcENG.rc
src\Resources\TortoiseProcENG.rc:1571:0: IDDS_AUTOTEXTTESTDLG
src\Resources\TortoiseProcENG.rc:742:0: IDDS_CHECKFORUPDATES
src\Resources\TortoiseProcENG.rc:1515:0: IDDS_CREATECHANGELIST
src\Resources\TortoiseProcENG.rc:1320:0: IDDS_DELUNVERSIONED
src\Resources\TortoiseProcENG.rc:979:0: IDDS_DIFFFILES
src\Resources\TortoiseProcENG.rc:1596:0: IDDS_EDITPROPCONFLICT
src\Resources\TortoiseProcENG.rc:1731:0: IDDS_EDITPROPEOL
src\Resources\TortoiseProcENG.rc:1644:0: IDDS_EDITPROPEXECUTABLE
src\Resources\TortoiseProcENG.rc:1766:0: IDDS_EDITPROPEXTERNALS
src\Resources\TortoiseProcENG.rc:1780:0: IDDS_EDITPROPEXTERNALSVALUE
src\Resources\TortoiseProcENG.rc:1748:0: IDDS_EDITPROPKEYWORDS
src\Resources\TortoiseProcENG.rc:1673:0: IDDS_EDITPROPMIMETYPE
src\Resources\TortoiseProcENG.rc:1659:0: IDDS_EDITPROPNEEDSLOCK
src\Resources\TortoiseProcENG.rc:1823:0: IDDS_EDITPROPTSVNLANG
src\Resources\TortoiseProcENG.rc:1802:0: IDDS_EDITPROPTSVNSIZES
src\Resources\TortoiseProcENG.rc:1275:0: IDDS_EXPORT
src\Resources\TortoiseProcENG.rc:1181:0: IDDS_HISTORYDLG
src\Resources\TortoiseProcENG.rc:650:0: IDDS_INPUTDLG
src\Resources\TortoiseProcENG.rc:1332:0: IDDS_INPUTLOGDLG
src\Resources\TortoiseProcENG.rc:157:0: IDDS_LOGCACHESTATISTICS
src\Resources\TortoiseProcENG.rc:829:0: IDDS_PATCH_FILE_OPEN_CUSTOM
src\Resources\TortoiseProcENG.rc:437:0: IDDS_PROMPT
src\Resources\TortoiseProcENG.rc:769:0: IDDS_PROPERTIES
src\Resources\TortoiseProcENG.rc:1301:0: IDDS_REVGRAPHFILTER
src\Resources\TortoiseProcENG.rc:728:0: IDDS_REVISION
src\Resources\TortoiseProcENG.rc:844:0: IDDS_SETOVERLAYICONS
src\Resources\TortoiseProcENG.rc:1628:0: IDDS_SETTINGSOVERLAYHANDLERS
src\Resources\TortoiseProcENG.rc:634:0: IDDS_SIMPLEPROMPT
src\Resources\TortoiseProcENG.rc:714:0: IDDS_TOOLASSOC
src\Resources\TortoiseProcENG.rc:1345:0: IDDS_UNLOCK

# IDDs not found in XML files for src\Resources\TortoiseMergeENG.rc
src\Resources\TortoiseMergeENG.rc:60:0: IDDS_DIFFLOCATOR
src\Resources\TortoiseMergeENG.rc:125:0: IDDS_FILEPATCHES
src\Resources\TortoiseMergeENG.rc:241:0: IDDS_FIND
src\Resources\TortoiseMergeENG.rc:66:0: IDDS_LINEDIFF
src\Resources\TortoiseMergeENG.rc:234:0: IDDS_PATCH_FILE_OPEN_CUSTOM

the command line I used assumed the python files are in the root directory
(of the checked out trunk), but you can run if from anywhere as long as the
python path is correct.

I tried to run it on some of the other RC files (not in the Resources
directory) and got errors: they were NOT UTF-16. I can make the script
smarter about picking an encoding, but I did not know how to do that off the
top of my head, so I skipped it.

The fileutil.py is from something else I did a while ago, over half of it is
not really needed for this application.

If this is close to what you want, feel free to let me know what you'd like
changed and I'll update it -- I'll also clean it up and prehaps add some
better error checking.

Feel free to included it in in your repository.

Stupid Assumptions:
* writen for python 2.5.2 (should work on 2.6.x)
* only looks for *.xml files
* Does not try to figure out context (comments) for RCFiles or XML Files
when look for IDs
* Minimal error checking
* Needs to be cleaned up and documented

On Fri, Jun 25, 2010 at 15:40, Simon Large <simon.tortoisesvn_at_googlemail.com
> wrote:

> Hi folks,
>
> This is pleas for someone smarter than me to write a python or perl
> script to check the docs for missing context links. Every dialog has
> an IDD_xxx reference in the resource file, and I need to check that
> every one of those has a corresponding HIDD_xxx reference in the doc
> source files. As there are currently 171 dialogs, doing that check
> manually is not something I relish. What I would like is script to
> scan a .rc file (UTF16) for IDD_ references, scan the .xml files in
> nested directories, and then flag up any IDD_ that does not have a
> corresponding HIDD_ reference somewhere in the XML file set.
>
> Any script fiends out there who would like to take this up?
>
> Simon
>
> --
> : ___
> : oo // \\ "De Chelonian Mobile"
> : (_,\/ \_/ \ TortoiseSVN
> : \ \_/_\_/> The coolest Interface to (Sub)Version Control
> : /_/ \_\ http://tortoisesvn.net
>
> ------------------------------------------------------
>
> http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=757&dsMessageId=2626093
>
> To unsubscribe from this discussion, e-mail: [
> dev-unsubscribe_at_tortoisesvn.tigris.org].
>

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=757&dsMessageId=2627448

To unsubscribe from this discussion, e-mail: [dev-unsubscribe_at_tortoisesvn.tigris.org].

Received on 2010-06-29 21:31:02 CEST

This is an archived mail posted to the TortoiseSVN Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.