IT博客汇
  • 首页
  • 精华
  • 技术
  • 设计
  • 资讯
  • 扯淡
  • 权利声明
  • 登录 注册

    图床转换工具推荐

    Teacher Du发表于 2024-11-01 03:51:26
    love 0

    前几天和小伙伴有聊到图床迁移,恰好遇到 BBing 童靴编写的图床转换工具,推荐给需要做图床迁移的小伙伴!

    原文地址

    具体用法详见工具原文:

    图床转换工具-picvt

    https://bbing.com.cn/202205/aboutpicvt/

    源码下载

    源码地址「鼠标放在下面即可查看」

    https://github.com/caibingcheng/picvt

    使用方法

    命令格式:

    1
    python3 ./picvt.py -D ../blog/content/posts/ -F imgtu -T github -t **** --repo resources --branch main --path images

    更多参数请参考 python3 ./picvt.py -h:

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    usage: picvt.py [-h] [-u USER] [-p PASSWORD] [-t TOKEN]
    [-f FORMAT [FORMAT ...]] [-r RETRY] [--repo REPO]
    [--branch BRANCH] [--path PATH] -D DIR -F {imgtu,github} -T
    {imgtu,github}

    optional arguments:
    -h, --help show this help message and exit
    -u USER, --user USER target user
    -p PASSWORD, --password PASSWORD
    target password
    -t TOKEN, --token TOKEN
    target token
    -f FORMAT [FORMAT ...], --format FORMAT [FORMAT ...]
    file format
    -r RETRY, --retry RETRY
    retry times
    --repo REPO repo name
    --branch BRANCH branch name
    --path PATH content path
    -D DIR, --dir DIR target dir
    -F {imgtu,github}, --from {imgtu,github}
    from
    -T {imgtu,github}, --to {imgtu,github}
    to

    支持图床

    • GitHub 下载至本地
    1
    python3 ./picvt.py -D ../blog/content/ -F github -T local --path /home/xxxx/projects/blog/content/statics/ --link /statics/ -r 3
    • 本地上传去不
    1
    python3 ./picvt.py -D ../blog/content/ -F local -T 7bu --path /home/xxx/projects/blog/content/ --user xx@xx.com --paasswd *****


沪ICP备19023445号-2号
友情链接