mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-13 14:32:28 +03:00
add some example plugins for repo key extraction and migration
This commit is contained in:
parent
d16ccc6d6c
commit
c8f21bf0e0
5 changed files with 177 additions and 0 deletions
22
examples/fdroid_extract_repo_pubkey.py
Normal file
22
examples/fdroid_extract_repo_pubkey.py
Normal file
|
@ -0,0 +1,22 @@
|
|||
#!/usr/bin/env python3
|
||||
#
|
||||
# an fdroid plugin print the repo_pubkey from a repo's keystore
|
||||
#
|
||||
|
||||
from argparse import ArgumentParser
|
||||
from fdroidserver import common, index
|
||||
|
||||
fdroid_summary = 'export the keystore in standard PEM format'
|
||||
|
||||
|
||||
def main():
|
||||
parser = ArgumentParser()
|
||||
common.setup_global_opts(parser)
|
||||
options = parser.parse_args()
|
||||
common.config = common.read_config(options)
|
||||
pubkey, repo_pubkey_fingerprint = index.extract_pubkey()
|
||||
print('repo_pubkey = "%s"' % pubkey.decode())
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
Loading…
Add table
Add a link
Reference in a new issue