0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

いい感じのヘッダー(Spyder)

Posted at

templateファイル

完全に自分用。
普段Spyderを使ってコーディングしており、PCによってテンプレートが統一されていないのでここらでいい感じのヘッダーをメモっておく。

テンプレートファイルは基本的にC:\Users\***\.spyder-py3\template.pyに保存されている。

Spyderなら%(date)sThu Jun 6 22:09:00 2024のような日付に、%(username)sはユーザー名になる。
%(username)sの部分はベタ打ちでもいいと思う。

# -*- coding: utf-8 -*-
# =============================================================================
#                                  HEADER
# =============================================================================
__version__ = "1.0.0"
# Author: %(username)s
# Created on %(date)s
# Description: 
# =============================================================================
#                                  HISTORY
# =============================================================================
# __version__ = "x.y.z"
# Date:                 Updater: 
# Modifications: 
# -----------------------------------------------------------------------------
# __version__ = "x.y.z"
# Date:                 Updater: 
# Modifications: 
# -----------------------------------------------------------------------------


def main():
    return


if __name__ == "__main__":
    main()

使い方

新規作成時にHEADERを記入、アップデートするたびにHISTORYをしたに追加していく。
最新の__version__をアンコメントしておくことでバージョン表示ができる。

# -*- coding: utf-8 -*-
# =============================================================================
#                                  HEADER
# =============================================================================
# __version__ = "1.0.0"
# Author: Yulily
# Created on Thu Jun  1 22:19:54 2024
# Description: ここに説明を書く
# =============================================================================
#                                  HISTORY
# =============================================================================
# __version__ = "1.0.1"
# Date: 20240603        Updater: Yulily
# Modifications: パッチバージョンアップ、バグの修正や誤字の訂正
# -----------------------------------------------------------------------------
# __version__ = "1.1.0"
# Date: 20240606        Updater: Yulily
# Modifications: マイナーバージョンアップ、細かな機能向上や部分的な修正
# -----------------------------------------------------------------------------
__version__ = "2.0.0"
# Date: 20240607        Updater: Yulily
# Modifications: メジャーバージョンアップ、見た目や操作に大きく影響を及ぼすような変更
# -----------------------------------------------------------------------------
# __version__ = "x.y.z"
# Date:                 Updater: 
# Modifications: 
# -----------------------------------------------------------------------------


def main():
    return


if __name__ == "__main__":
    main()
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?