3 Commits

4 changed files with 9 additions and 6 deletions
Unified View
  1. +4
    -1
      Makefile
  2. +1
    -1
      layout/base.j2
  3. +3
    -3
      publishers/s3.py
  4. +1
    -1
      requirements.txt

+ 4
- 1
Makefile View File

@@ -1,5 +1,8 @@
.PHONY: deploy
.PHONY: env
env: requirements.txt
python3 -m venv p && . ./p/bin/activate && pip install -r requirements.txt


.PHONY: deploy
deploy: deploy:
rm -rf deploy rm -rf deploy
hyde gen hyde gen


+ 1
- 1
layout/base.j2 View File

@@ -94,7 +94,7 @@
<div class="contact"> <div class="contact">
<ul> <ul>
<li><a href="/calendar.ics">Calendar</a></li> <li><a href="/calendar.ics">Calendar</a></li>
<li><a href="https://twitter.com/search?f=live&vertical=default&q=%23baysec&src=typd">Twitter</a></li>
<li><a rel="me" href="https://infosec.exchange/@baysec">Fediverse</a></li>
<li class="copyright">Brought to you by <a href="https://www.funkthat.com/gitea/jmg/baysec">some folks</a>.</li> <li class="copyright">Brought to you by <a href="https://www.funkthat.com/gitea/jmg/baysec">some folks</a>.</li>
</div> </div>
</div> </div>


+ 3
- 3
publishers/s3.py View File

@@ -46,10 +46,10 @@ class S3(Publisher):
redirect_meta = redirect['to'] redirect_meta = redirect['to']
k.key = item.path.replace(str(root), '') k.key = item.path.replace(str(root), '')
kmd5 = bucket.get_key(item.path.replace(str(root), '')) kmd5 = bucket.get_key(item.path.replace(str(root), ''))
#print 'f:', `item.path`, `kmd5.etag[1:-1], k.compute_md5(open(item.path))[0]`
#print('f:', repr(item.path), repr(kmd5.etag[1:-1], k.compute_md5(open(item.path))[0]))
if kmd5 is None or \ if kmd5 is None or \
kmd5.etag[1:-1] != k.compute_md5(open(item.path))[0]:
print 'updating:', `item.path.replace(str(root), '')`
kmd5.etag[1:-1] != k.compute_md5(open(item.path, 'rb'))[0]:
print('updating:', repr(item.path.replace(str(root), '')))
k.set_contents_from_filename(item.path) k.set_contents_from_filename(item.path)
if redirect_meta: if redirect_meta:
k.set_metadata('website-redirect-location', redirect_meta) k.set_metadata('website-redirect-location', redirect_meta)

+ 1
- 1
requirements.txt View File

@@ -1,2 +1,2 @@
git+git://github.com/jmgurney/hyde.git@c8a8aafe081ce7bf9ea90b7e260914522e546210
git+https://www.funkthat.com/gitea/jmg/hyde@be6a0ec164309c102768970ef988c437c6a0afa6
boto boto

Loading…
Cancel
Save