Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
first commit, command still hardcoded in
- Loading branch information
0 parents
commit 0fbef13
Showing
2 changed files
with
90 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,45 @@ | |||
syntax: glob | |||
|
|||
# build directories and files | |||
**/build/* | |||
build/* | |||
target/**.* #hg syntax | |||
target #git syntax | |||
dist/**.* | |||
*.pyc | |||
|
|||
|
|||
#Eclipse | |||
.settings/*.** | |||
.classpath | |||
.project | |||
|
|||
# Netbeans | |||
nb-configuration.xml | |||
nbactions.xml | |||
|
|||
# Backup files left behind by the Emacs editor. | |||
*~ | |||
# Lock files used by the Emacs editor. | |||
.\#* | |||
# Temporary files used by TestMate | |||
._* | |||
# XCode user data | |||
**.pbxuser | |||
**.mode?v? | |||
**.perspectivev? | |||
# documentation | |||
**.docset/* | |||
# for those crazies using svn and hg at the same time | |||
*.svn* | |||
*.swp | |||
|
|||
# Random OS stuff | |||
.DS_Store | |||
Thumbs.db | |||
|
|||
# temporary folders | |||
syntax: regexp | |||
.*/te?mp/.* | |||
# Temporary files used by the vim editor. | |||
.*.swp |
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
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,45 @@ | |||
#!/usr/bin/env python | |||
""" | |||
SYNOPSIS | |||
TODO helloworld [-h,--help] [-v,--verbose] [--version] | |||
DESCRIPTION | |||
Runs a command when a file in the current working directory is changed | |||
EXAMPLES | |||
TODO: Show some examples of how to use this script. | |||
EXIT STATUS | |||
TODO: List exit codes | |||
AUTHOR | |||
Leonard Ehrenfried <leonard.ehrenfried@web.de> | |||
""" | |||
|
|||
import os | |||
import subprocess | |||
import time | |||
import re | |||
|
|||
SCAN_INTERVAL=10 | |||
|
|||
def main (): | |||
cwd = os.getcwd() | |||
last_run=os.path.getmtime(cwd) | |||
while(True): | |||
last_modified=os.path.getmtime(cwd) | |||
if (last_modified > last_run): | |||
print "*** Save detected - running command ***" | |||
subprocess.Popen(['pdflatex', 'cv.tex', ]) | |||
last_run=last_modified | |||
time.sleep(SCAN_INTERVAL) | |||
|
|||
if __name__ == '__main__': | |||
main() | |||
|