WikiHomePage | CweAdmin | RecentChanges | Preferences
Removing Purple Numbers (161)
PurpleNumbers are supposed to be unique (i.e. they should not be duplicated), within the same wiki site. Therefore, when one has to copy one wiki page to another, he/she should first remove all the purple numbers from the source page, before pasting the content over. (16H)
There is a win32 <nopurple> utility that can help remove purple numbers from the CWE-wiki page edit text. This will facilitate administrators who need to move multiple wiki pages from one site to another, or to re-factor existing wiki pages into templates. (162)
- This solution handles one wiki page at a time. To use this: (163)
- user should setup a temporary working directory on his/her windows machine (164)
- download the two files "sed-3.59.exe" and "nopurple.bat" into that working directory. They can be found at: http://community.cim3.net/file/resource/tool_win2kxp/no-purple/ (165)
- goto "edit" mode on the wiki, save the whole page as "temp-wp.txt" (temporary text file with purple numbers) into this working directory (166)
- in the edit window, do: copy all (ctrl-A | ctrl-C); paste (ctrl-V) to a notepad new page, file | save-as "temp-wp.txt" into the working directory (167)
- then run: (168)
> nopurple (169)
- take what comes out in "temp-np.txt" (temporary text file with no purple numbers) (16A)
- and paste that onto the new wiki page (of the corresponding wiki-page-name). (16B)
- For those who are curious how this works (16C)
- a win32 version of the popular unix command "sed" is used (super-sed v3.59, to be exact) (16D)
- the one-line "nopurple.bat" file actually reads: sed-3.59 "s/{[^{]*}//g" temp-wp.txt > temp-np.txt (16E)
- the input and output file names are hard-coded in the batch file as "temp-wp.txt" & "temp-np.txt" respectively, to simplify the process (16F)
- E-mail <cwe-admin@cim3.com> if there is any question. (16G)