Last active
March 22, 2016 15:46
-
-
Save nicdoye/1b240b54364a8e78a0b5 to your computer and use it in GitHub Desktop.
Dump TeamForge Wiki to files with markup using TeamForge CLI Client
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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