Skip to content

Commit

Permalink
cf: change workdir
Browse files Browse the repository at this point in the history
  • Loading branch information
azuki774 committed Feb 4, 2024
1 parent f0149fd commit 8148974
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def main():
htmlページをパースして、DBに情報を格納する。
引数に対象のページ名を入れる。
main.py <cf|portofolio>
読み込みディレクトリは、/data/yyyymmdd/<file名>
読み込みディレクトリは、/data/<file名>
"""

logger.info("start")
Expand All @@ -40,20 +40,15 @@ def main():
)
argp = argparser.parse_args()

today = datetime.date.today() # 出力:datetime.date(2020, 3, 22)
yyyymmdd = "{0:%Y%m%d}".format(today) # 20200322

# if argp.component == "portfolio":
# portfolio.get(DATA_BASE_DIR + yyyymmdd + "/portfolio")

if argp.component == "cf":
# --last-month があれば cf_lastmonth も
ret = cf.get(DATA_BASE_DIR + yyyymmdd + "/cf")
ret = cf.get(DATA_BASE_DIR + "/cf")
if ret != 0:
return ret # error end
if argp.lastmonth:
logger.info("lastmonth option detected")
ret = cf.get(DATA_BASE_DIR + yyyymmdd + "/cf_lastmonth")
ret = cf.get(DATA_BASE_DIR + "/cf_lastmonth")
if ret != 0:
return ret # error end

Expand Down

0 comments on commit 8148974

Please sign in to comment.