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标准API:在具有继承用户权限的树中查找实体   带有Hibernate和注释的java多对多自引用   java如何下载和安装Xugler?   java如何向JFrame JButton添加操作?   java如何安装自定义LAF?   java将旧对象的id分配给新对象将把它作为重复的@ManyToMany插入   java如何从WSDL生成/创建服务端点?   java使用基于iText Core的OpenPdf从pdf页面删除或更新添加的图像图标   java WeakHashMap,具有Long、Int或String等类型   java在JFrame中获取和更改值   java变量在扩展另一个类的类中不可见   地理定位Java和GeoLite数据库:如何使用GeoLiteCity。生产方式中的dat?   java类加载器应该能够解析和加载来自不同包的类吗?   java试图调用虚拟方法Volley Android Api   UDP数据报在Java中仅显示第一个字符