Giter VIP home page Giter VIP logo

markdown-imgbed-migrating's Introduction

markdown-imgbed-migrating

Created by 2022-04-27 22:19:22

markdown-imgbed-migrating is a python script for dealing with markdown imgbed migrating.

Markdown文件中图床迁移到本地。

Installation - 安装

  • oss2

Requirements - 必要条件

  • python 3.x

Usage - 用法

  1. 云端图片下载到本地。
$ git clone https://github.com/Yangliuly1/markdown-imgbed-migrating.git
$ cd markdown-imgbed-migrating
$ python markdown-imgbed-migrating.py -i ./input -o ./output
  1. 云端图片迁移到阿里云图床,需要配置参数:access_key_id, access_key_secret, endpoint, bucket_namedir_path
$ git clone https://github.com/Yangliuly1/markdown-imgbed-migrating.git
$ pip install oss2
$ cd markdown-imgbed-migrating
$ python markdown-imgbed-migrating-v2.py -i ./input -o ./output1

Changelog - 更新日志

  • 2022.04.28 Mardkwon文件中图片从云端迁移到阿里云。

  • 2022.04.27 修复bug,本地图片无法转移。

  • 2022.04.27 Mardkwon文件中图片从云端下载到本地。

License - 版权信息

License:MIT

markdown-imgbed-migrating's People

Contributors

pre-commit-ci[bot] avatar yangly0 avatar

Stargazers

 avatar

Watchers

 avatar

markdown-imgbed-migrating's Issues

图片重复BUG

这行代码的文件名, 最小单位是是秒, 貌似在一秒内可以处理了多张图片, 就会出现图片重复(路径不大对)

img_name = str(
    time.strftime('%Y%m%d%H%M%S', time.localtime(int(
        time.time())))) + ".png"

个人感觉换成UUID会好点

img_name = uuid.uuid4().hex + '.png'

原markdown路径
image

用时间生成的路径
image

修改成UUID生成的路径
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.