2 # Copyright (c) Twisted Matrix Laboratories.
3 # See LICENSE for details.
6 from twisted
.python
import filepath
8 def updateDocumentation(project
, twistedCheckoutPath
, websiteCheckoutPath
):
10 Copy documentation for a particular project out of the craphole where lore
11 dumps it, and into a WebSite working copy.
13 @param generatedDocPath: The path to the root of a Twisted checkout, ie
14 ~/Projects/Twisted/tags/releases/TwistedWeb/0.5.x/
16 @param websiteCheckoutPath: The path to the root of a WebSite checkout, ie
17 ~/Projects/WebSite/branches/update-web-docs-123/
19 docPath
= twistedCheckoutPath
.child('doc').child(project
)
20 minusSVN
= docPath
.temporarySibling()
21 docPath
.copyTo(minusSVN
)
22 for child
in minusSVN
.walk():
23 if child
.basename() == '.svn':
26 minusSVN
.copyTo(websiteCheckoutPath
.child('vhosts').child('twistedmatrix.com').child('projects').child(project
).child('documentation'))
30 if __name__
== '__main__':
31 if len(sys
.argv
) != 4:
32 raise SystemExit("Usage: %s <project> <twisted checkout root> <website checkout root>" % (sys
.argv
[0],))
33 updateDocumentation(sys
.argv
[1], filepath
.FilePath(sys
.argv
[2]), filepath
.FilePath(sys
.argv
[3]))