f droid dl是一个f-droid(脱机)镜像生成和更新实用程序

fdroid-dl的Python项目详细描述


fdroid dl

是一个基于python的f-droid镜像生成和更新实用程序。指向一个或多个现有的F DROID库,实用程序将下载元数据(图片、描述……),并将其放在本地系统中。只要运行fdroid-dl && fdroid update就可以了。

动机

我们的想法是拥有一个或多个存储库的无Internet本地副本,而无需在自己的构建服务器上编译数以千计的应用程序,而是像Android客户端那样下载它们。因此,这个工具是简单地下载一个完整的存储库并将应用程序导入本地安装的。在编写一份完整的离线拷贝时,包括f-droid.org官方存储库的资产大约为7.5gb。

安装

fdroid dl可以通过pip获得,只需运行pip install fdroid-dl,您就可以在命令行上使用fdroid-dlpypi.org - fdroid-dl

文档

可在fdroid-dl.readthedocs.io

命令行选项

Usage: fdroid-dl [OPTIONS] COMMAND [ARGS]...

  Is a python based f-droid mirror generation and update utility. Point at
  one or more existing f-droid repositories and the utility will download
  the metadata (pictures, descriptions,..) for you and place it in your
  local system.

  Simply run "fdroid-dl update && fdroid update" in your folder with repo
  and you are set.

Options:
  -d, --debug               enable debug level logging
  -c, --config FILE         location of your fdroid-dl.json configuration file
                            [default: fdroid-dl.json]
  -r, --repo DIRECTORY      location of your fdroid repository to store the
                            apk files  [default: ./repo]
  -m, --metadata DIRECTORY  location of your fdroid metadata to store the
                            asset files  [default: ./metadata]
  --cache DIRECTORY         location for fdroid-dl to store cached data
                            [default: ./.cache]
  --help                    Show this message and exit.

Commands:
  update  starts updating process
Usage: fdroid-dl update [OPTIONS] COMMAND [ARGS]...

Options:
  --index / --no-index        download repository index files  [default: True]
  --metadata / --no-metadata  download metadata assset files  [default: True]
  --apk / --no-apk            download apk files  [default: True]
  --apk-versions INTEGER      how many versions of apk to download  [default:
                              1]
  --src / --no-src            download src files  [default: True]
  --threads INTEGER           configure number of parallel threads used for
                              download  [default: 10]
  --head-timeout INTEGER      maximum time in seconds a HEAD request is
                              allowed to take  [default: 10]
  --index-timeout INTEGER     maximum time in seconds index file download is
                              allowed to take  [default: 60]
  --download-timeout INTEGER  maximum time in seconds file download is allowed
                              to take  [default: 60]
  --help                      Show this message and exit.

配置文件

待办事项

  • [X]创建后端爬行现有的版本
  • [X]直接获取index.jar和index-v1.jar的信息
  • [X]与新旧回购风格的兼容性
  • [X]下载多线程
  • [X]验证APK校验和
  • [X]索引文件的本地缓存
  • []源代码下载尚未实现
  • []元数据更新以执行增量,而不是始终完全下载
  • []旧apk文件的清理策略(可能已经有了吗?)
  • [x]创建一个clipython click
  • [X]PIP包packaging.python.org
  • [X]PIP包的CI生成
  • []文档;-)
  • []编写测试pytest

更改日志

  • WIP:添加了文档
  • WIP:已添加测试
    • 请求模拟?

想法

  • 请求缓存?

开发

要求

  • python 2.7.*或3.5.*
  • PIP 3.x
  • Virtualenv 3.x

本地安装

# git clone https://github.com/t4skforce/fdroid-dl.git
# cd fdroid-dl
# virtualenv .env
# source .env/bin/activate
# python setup.py install
# fdroid-dl --help
# python3 -m fdroid_dl --help

参考文献

在开发本项目时,使用了以下参考资料

飞行机器人

Python

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java如何拆分字符串(基于各种分隔符),但不保留空格?   解析。Json格式的txt文件和knime中的java   java Spring rest api为什么在rest api调用的响应中更改了数据类型   升华文本3抛出java。lang.ClassNotFoundException,而记事本++不存在   java Android指纹扫描仪在尝试5次后停止工作?   java Android如何设置精确的重复报警?   java如何使用HTTPGET connect为access API输入用户名和密码   java当测试报告显示没有测试失败时,Gradle为什么说“有失败的测试”?   用Gson实现java获取响应   MapReduce程序中函数错误的java不可映射参数   java spring安全性不符合自动代理的条件   java GWT使用异步回调进行同步/阻塞调用   java奇怪的类数组问题无法在jsp中显示   如何在java中使用PrinterJob使用epl打印条形码   java如何在JTable中居中单元格   将Java Mockito测试转换为Kotlin   html Java正则表达式模式匹配到多个相同标记   testCompile中缺少java Gradle(Android)多项目依赖项   在输入提示后输入字符串时发生java FileNotFoundException