Basic webdav support

This commit is contained in:
Giulio 2018-05-22 11:40:12 +02:00
parent 6ebc482236
commit df781c1058

View File

@ -3,6 +3,13 @@ import logging
import re import re
import os import os
import shutil import shutil
import webdav.client as wc
davoptions = {
'webdav_hostname': "https://fdroid.lsd.cat",
'webdav_login': "login",
'webdav_password': "password"
}
repo_url = "https://fdroid.lsd.cat" repo_url = "https://fdroid.lsd.cat"
repo_name = "lsd.cat Proprietary Apps Repo" repo_name = "lsd.cat Proprietary Apps Repo"
@ -80,8 +87,17 @@ def check_env(repo):
def build(repo): def build(repo):
os.system('fdroid update -c') os.system('fdroid update -c')
def publish(repo, davoptions):
client = wc.Client(davoptions)
files = [f for f in os.listdir('.') if os.path.isfile(f)]
for file in files:
client.upload_sync(remote_path="/" + file, local_path=file)
check_env(repo) def main():
for i in urls: check_env(repo)
get_apk(i) for url in urls:
build(repo) get_apk(url)
build(repo)
publish(repo, davoptions)
main()