geekcomputers / geekcomputers/Python
Capitalize an output file name (date)
まだ誰も着手していません。
- 主要言語
- Python
- スター
- 35.4k
- フォーク
- 12.9k
- 平均マージ
- 2時間 37分
- マージ済み PR(30日)
- 1
説明
I have this code that results in: 2018_Aug_TCRArchive.pdf - a simple request has come in to capitalize the month... i.e. 2018_AUG_TCRArchive.pdf - why can't I figure this out?? Thanks in advance (FYI, I took over this code from another employee who is no longer here, and I don't 100% understand the code quite yet).
d = datetime.date.today()
if not d.month == 1:
dSubtracted = datetime.date(d.year,d.month-1,d.day)
else:
dSubtracted = datetime.date(d.year-1,12,d.day)
mxd = arcpy.mapping.MapDocument(r"C:\Mxds\TCRArchive.mxd")
outputpath = 'r"C:\Pdfs'
pdfarchivefilename = '{:%Y_%b_%d}_TCRArchive.pdf"'.format(dSubtracted)
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
issue本文内でpdfarchivefilenameを生成する日付フォーマット式から始め、周辺の日付処理およびPDFエクスポートコードも確認します。代表的な日付でスクリプトを実行し、生成されたファイル名で月の略称が大文字になっており、年、日、サフィックスが維持されていることを確認します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- tooling
- issue の種類
- バグ
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 42/100