35 lines
920 B
Python
35 lines
920 B
Python
import sys, os
|
|
|
|
sampleMode = False
|
|
|
|
def identifyDay(inputArgument):
|
|
twoDigitsDay = '00'
|
|
day = 0 if (inputArgument[inputArgument.rfind('/')+4:inputArgument.rfind('.')] == 'X') else inputArgument[inputArgument.rfind('/')+4:inputArgument.rfind('.')]
|
|
twoDigitsDay = str(day).zfill(2)
|
|
return twoDigitsDay
|
|
|
|
def setSampleMode(mode:bool):
|
|
global sampleMode
|
|
if (mode) : sampleMode = True
|
|
return
|
|
|
|
def getSampleMode():
|
|
return sampleMode
|
|
|
|
def showSampleMode():
|
|
if ( getSampleMode() ):
|
|
print ("----------------------")
|
|
print ("Running im Sample Mode")
|
|
print ("----------------------")
|
|
return
|
|
|
|
def getPath2Data(aocDay):
|
|
return './day'+str(aocDay)+'/'
|
|
|
|
def getFilename2Data(aocDay):
|
|
dataFilename = 'sample.day'+str(aocDay) if ( sampleMode ) else 'data.day'+str(aocDay)
|
|
return dataFilename
|
|
|
|
def readDataFile (path, filename):
|
|
data = ''
|
|
return data |