Basic webdav support
This commit is contained in:
parent
6ebc482236
commit
df781c1058
20
apkdroid.py
20
apkdroid.py
@ -3,6 +3,13 @@ import logging
|
||||
import re
|
||||
import os
|
||||
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_name = "lsd.cat Proprietary Apps Repo"
|
||||
@ -80,8 +87,17 @@ def check_env(repo):
|
||||
def build(repo):
|
||||
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)
|
||||
|
||||
def main():
|
||||
check_env(repo)
|
||||
for i in urls:
|
||||
get_apk(i)
|
||||
for url in urls:
|
||||
get_apk(url)
|
||||
build(repo)
|
||||
publish(repo, davoptions)
|
||||
|
||||
main()
|
Loading…
Reference in New Issue
Block a user