42f53c320ab58bd064970888b47c2f4d5497621b — rjpcasalino 7 months ago a925e3c
change how we format file mod time
1 files changed, 4 insertions(+), 3 deletions(-)

M src/odyssey
M src/odyssey => src/odyssey +4 -3
@@ 123,15 123,16 @@ def do_build():
                f = re.match("(?:png|jpg|jpeg|gif|svg|md|pdf)", file.split(".")[1])
                if "md" in f.group():
                    filename = os.path.join(dirpath, file)
                    file_last_modified = os.stat(filename).st_mtime
                    file_last_modified = os.path.getmtime(filename)
                    formatted_mod_time = time.strftime("%Y-%m-%d", time.localtime(file_last_modified))
                    with open(filename, "r+") as f:
                        # returns a tuple containing a count (from start which defaults to 0) and
                        # the values obtained from iterating over iterable.
                        block = list(enumerate(read_file(f, "---")))
                    if "index.md" in filename:
                        build_index(filename, block[0][1], block[1][1], datetime.fromtimestamp(file_last_modified))                           
                        build_index(filename, block[0][1], block[1][1], formatted_mod_time)                           
                        build_page(filename, block[0][1], block[1][1], datetime.fromtimestamp(file_last_modified))
                        build_page(filename, block[0][1], block[1][1], formatted_mod_time)
                elif "pdf" in f.group():
                    ## this is cv related
                    shutil.copy(os.path.join(dirpath, file), "_site/cv/")