Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
79 additions
and
74 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 | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/usr/bin/env python | ||
# encoding: utf-8 | ||
|
||
from interssection import * | ||
from core import * |
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 |
---|---|---|
@@ -1,4 +1,20 @@ | ||
#!/usr/bin/env python | ||
# encoding: utf-8 | ||
|
||
from templates import * | ||
from jinja2 import Environment, PackageLoader | ||
|
||
|
||
__all__ = ['render_as_atom'] | ||
|
||
|
||
# create environment | ||
env = Environment(loader=PackageLoader('interssection', 'templates'), | ||
extensions=['jinja2.ext.autoescape'], | ||
autoescape=True) | ||
|
||
# get template | ||
template = env.get_template('atom.xml') | ||
|
||
|
||
def render_as_atom(context): | ||
return template.render(context) |
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,13 @@ | ||
#!/usr/bin/env python | ||
# encoding: utf-8 | ||
|
||
import datetime | ||
import uuid | ||
|
||
|
||
def get_iso8601_datetime(): | ||
return datetime.datetime.utcnow().strftime('%Y-%m-%dT%H:%M:%SZ') | ||
|
||
|
||
def get_urn(): | ||
return uuid.uuid4().urn |
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
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