Code Monkey home page Code Monkey logo

historee's Introduction

アクション履歴を管理するPythonパッケージ

画像変換などの思い処理を管理するのに役立ちます。

Historee - 「履歴(History)」と「記録する(Record)」を組み合わせた造語。

Install

pip3 install git+https://github.com/aragig/historee.git

Update

pip3 install --upgrade git+https://github.com/aragig/historee.git

Usage: 画像ファイル変換などの履歴管理に使うケース

# HistoryManager インスタンスの作成
history_manager = HistoryManager('path/to/history.csv')


def convert_image(src_path):
    # 履歴が存在するか確認
    if history_manager.history_exists(src_path):
        # ファイルのの最終更新日時を取得
        last_modified = os.stat(src_path).st_mtime
        # ファイルのの最終更新日時が履歴のタイムスタンプより新しいか確認
        if history_manager.is_newer_than_history(src_path, last_modified):
            # 画像を変換する処理
            pass
        else:
            # 何もしない
            pass
    else:
        # 画像を変換する処理
        # 履歴へ追加
        history_manager.add_history(src_path)

historee's People

Contributors

aragig avatar

Stargazers

 avatar

Watchers

 avatar

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.