Skip to content

Instantly share code, notes, and snippets.

@xero
Created August 30, 2012 19:40
Show Gist options
  • Save xero/3538917 to your computer and use it in GitHub Desktop.
Save xero/3538917 to your computer and use it in GitHub Desktop.
working on automating my documentation generation. this script pulls out all the php files from a git repo, parses the names, and feeds them into doxphp and pipes that into doxphp2sphinx. which will make rst files from the inline phpdoc comments. the seco
#!/bin/sh
@echo "Making docs"
git ls-files | grep php | while read line; do filename=$(basename $line); newfile=docs/$filename; echo $newfile; doxphp
< $line | doxphp2sphinx > ${newfile/%.php/.rst}; done
@echo "deleting empty files"
rm -f $(find . -empty)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment