eSpeak NG is an open source speech synthesizer that supports more than hundred languages and accents.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

shadowdir 470B

12345678910111213141516171819202122
  1. #!/usr/bin/python
  2. #
  3. # Copyright (C) 2011 Reece H. Dunn
  4. # Licence: GPLv3
  5. #
  6. # A script for shadowing a directory tree to another (equivalent to lndir).
  7. import sys
  8. import os
  9. def shadow(src, dst):
  10. if not os.path.exists(dst):
  11. os.makedirs(dst)
  12. for fn in os.listdir(src):
  13. srcpath = os.path.join(src, fn)
  14. dstpath = os.path.join(dst, fn)
  15. if os.path.isdir(srcpath):
  16. shadow(srcpath, dstpath)
  17. else:
  18. os.symlink(srcpath, dstpath)
  19. shadow(sys.argv[1], sys.argv[2])