Skip to content

Instantly share code, notes, and snippets.

@nicdoye
Last active March 22, 2016 15:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nicdoye/1b240b54364a8e78a0b5 to your computer and use it in GitHub Desktop.
Save nicdoye/1b240b54364a8e78a0b5 to your computer and use it in GitHub Desktop.
Dump TeamForge Wiki to files with markup using TeamForge CLI Client
ctf api CollabNet->getProjectListForUser USERNAME
foreach
do
copy as project
mkdir "$project.title"
tools wiki
foreach
do
copy as wiki
if wikitext
do
cd "$project.title"
save wikitext `print "$wiki.title"`.txt
cd ..
done
done
done
@nicdoye
Copy link
Author

nicdoye commented Mar 22, 2016

Note: you have to replace USERNAME with your username. If you only have access to projects you're a member of (rather than all public projects) you can use this instead:

ctf api CollabNet->getProjectList

This script solves the issue where project titles have spaces in them, but not Wiki pages. So "Home Page" gets saved as "Home" (instead of "Home.txt").

Invoke via:

TeamForge-CLI-Windows-1.8.2.0-6426\ctf.exe --script teamForgeWikiDump.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment