added stubs
This commit is contained in:
parent
446b22959c
commit
be14acd718
16
decal
16
decal
|
@ -51,11 +51,19 @@ parser.add_argument("-y",
|
||||||
action="store_true",
|
action="store_true",
|
||||||
help="show the whole year")
|
help="show the whole year")
|
||||||
parser.add_argument("-n",
|
parser.add_argument("-n",
|
||||||
action="store_const",
|
action="store",
|
||||||
const=int,
|
type=int,
|
||||||
help="show n months")
|
help="show n months")
|
||||||
|
|
||||||
args = vars(parser.parse_args())
|
args = vars(parser.parse_args())
|
||||||
|
|
||||||
|
# some stubs for now
|
||||||
|
if args["create"]:
|
||||||
|
print("Not implemented")
|
||||||
|
exit(0)
|
||||||
|
if args["json"]:
|
||||||
|
print("Not implemented")
|
||||||
|
exit(0)
|
||||||
#check some stuff, do some warnings, initiate the config, etc.
|
#check some stuff, do some warnings, initiate the config, etc.
|
||||||
if not os.path.exists(configpath):
|
if not os.path.exists(configpath):
|
||||||
config['DEFAULT'] = {'uri': 'your caldav server here',
|
config['DEFAULT'] = {'uri': 'your caldav server here',
|
||||||
|
@ -238,6 +246,7 @@ for year,month in ympairs((args['year'],args['month']),offset,dstart=args['3']):
|
||||||
month,
|
month,
|
||||||
cell_modifier=lambdafunc))
|
cell_modifier=lambdafunc))
|
||||||
|
|
||||||
|
# function to print 3 calendar lines at a time
|
||||||
def printlines(c1,c2,c3):
|
def printlines(c1,c2,c3):
|
||||||
for count in range(len(c1)):
|
for count in range(len(c1)):
|
||||||
line = ""
|
line = ""
|
||||||
|
@ -245,9 +254,12 @@ def printlines(c1,c2,c3):
|
||||||
if len(c2) > 0: line += c2.pop(0)+" "
|
if len(c2) > 0: line += c2.pop(0)+" "
|
||||||
if len(c3) > 0: line += c3.pop(0)+" "
|
if len(c3) > 0: line += c3.pop(0)+" "
|
||||||
print(line)
|
print(line)
|
||||||
|
|
||||||
|
# array padding
|
||||||
for count in range(3-(len(cal_prints)%3)):
|
for count in range(3-(len(cal_prints)%3)):
|
||||||
cal_prints.append([])
|
cal_prints.append([])
|
||||||
|
|
||||||
|
# finally, print the fucking calendar
|
||||||
for cal in range(0,len(cal_prints),3):
|
for cal in range(0,len(cal_prints),3):
|
||||||
printlines(cal_prints[cal],cal_prints[cal+1],cal_prints[cal+2])
|
printlines(cal_prints[cal],cal_prints[cal+1],cal_prints[cal+2])
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue