def get_file_for(name):
"""webber.files is an hash of File objects, but keyed on the real file name.
This function returns a File object for a specific linktitle."""
-
+
try:
return _get_file_for_cache[name]
except:
# At startup:
# addoptions allow plugins to add command-line options
# checkconfig check configuration
-# start
+# start
# While reading files:
# read ask any reader (plugins!) to read the file
# filter ask anybody to filter the contents
)
file.inheritFrom(direc)
read_file(direc, file)
-
+
walk(dirpath)
s = reMacro.sub(do_macro, contents)
#print s
return s
-
+
def scan_files():
info("Scanning files ...")
direc = directories[file.direc]
+ # Output-Filename "berechnen"
+ if file.render and file.render == "html":
+ file.out_path = os.path.splitext(s)[0] + ".html"
+
run_hooks("scan",
direc=direc,
file=file)
continue
file.contents = contents
- # Output-Filename "berechnen"
- file.out_path = os.path.splitext(fname_in)[0] + ".html"
-
for fname_in in files:
file = files[fname_in]
current_file = file
return parser
-
+
@set_hook("checkconfig", last=True)
def checkconfig(params):
# Ensure absolute paths that end in '/'.