-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Get the resume's updated date from the S3 object's metadata
- Loading branch information
Showing
7 changed files
with
40 additions
and
33 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
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
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 | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
type resume = { | ||
updated: string; | ||
} |
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
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
This file was deleted.
Oops, something went wrong.
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 | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import argparse | ||
import json | ||
|
||
from .common import output | ||
|
||
import boto3 | ||
|
||
def parse_args(): | ||
parser = argparse.ArgumentParser(description="Grab metadata about the resume stored on s3") | ||
|
||
parser.add_argument("--output", metavar="OUTPUT") | ||
|
||
return parser.parse_args() | ||
|
||
def main(): | ||
args = parse_args() | ||
|
||
s3 = boto3.resource("s3") | ||
obj = s3.Object("rootmos-static", "resume-gustav-behm.pdf") | ||
meta = obj.metadata | ||
|
||
with output(args.output) as f: | ||
f.write(json.dumps(meta)) |