Skip to content

Commit

Permalink
addes a generate line for schema in the format used for github pages (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
m00sey authored May 18, 2023
1 parent 9e8665a commit c5ac992
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -129,4 +129,6 @@ dmypy.json
.pyre/

.idea
./vLEI/
./vLEI/

./publish
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
'PyYaml>=6.0',
'apispec>=5.1.1',
'mnemonic>=0.20',
'keri @ git+https://[email protected]/weboftrust/keripy@development',
'keri>=1.0.0',
],
extras_require={
},
Expand Down
8 changes: 8 additions & 0 deletions src/vlei/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"""
import json
import os
from pathlib import Path

from keri.core import scheming, coring
Expand Down Expand Up @@ -78,6 +79,13 @@ def __save(p, d):
s = open(p, 'w')
s.write(json.dumps(schemer.sed, indent=2))

# for github pages
p = 'publish'
os.makedirs(os.path.join(p, schemer.said), exist_ok=True)
f = open(os.path.join(p, schemer.said, 'index.json'), 'wb')
f.write(schemer.raw)
f.close()


if __name__ == "__main__":
main()

0 comments on commit c5ac992

Please sign in to comment.