OpenPecha / Toolkit

🛠 Tools to create, edit and export texts and annotations
https://toolkit.openpecha.org
Apache License 2.0
7 stars 4 forks source link

fix(storages): add check geo_restriciton in meta for private repo #194

Closed ta4tsering closed 1 year ago

ta4tsering commented 1 year ago

check for geo_restricition in source_metadata, CN found it publish the repo as Private else it will be public repo.

kaldan007 commented 1 year ago

i think it is better to reuse load_yaml from openpecha utils to load the meta in _init_remote_repo.

ta4tsering commented 1 year ago

utils from openpecha is import from storage so it becoming circular import error https://github.com/OpenPecha/Toolkit/blob/fix-storages/openpecha/utils.py#L17

kaldan007 commented 1 year ago

@10zinten publishing asset in release with pecha is also included in this request. did a dependency injection in epub serializer method to generalise css template

kaldan007 commented 1 year ago

@10zinten suggestion considered and pecha about has been updated. Will send separate PR in future.

10zinten commented 1 year ago

just a quick note, we should check if self.meta.source_metadata.get("geo_restriction", []) is empty or not, any value should make the repository private, not just "CN"

fixed with https://github.com/OpenPecha/Toolkit/pull/207