naming convention

This commit is contained in:
aceisace
2022-10-02 00:49:27 +02:00
parent 8b0f21a649
commit 4d1ed107b7
29 changed files with 30 additions and 35 deletions

3
inkycal/modules/__init__.py Normal file → Executable file
View File

@@ -6,5 +6,4 @@ from .inkycal_todoist import Todoist
from .inkycal_image import Inkyimage
from .inkycal_jokes import Jokes
from .inkycal_stocks import Stocks
from .inkycal_slideshow import Slideshow
# from .inkycal_server import Inkyserver
from .inkycal_slideshow import Slideshow

0
inkycal/modules/dev_module.py Normal file → Executable file
View File

2
inkycal/modules/ical_parser.py Normal file → Executable file
View File

@@ -1,7 +1,7 @@
#!python3
"""
iCalendar (parsing) module for Inky-Calendar Project
Inkycal iCalendar parsing module
Copyright by aceisace
"""
import urllib

16
inkycal/modules/inky_image.py Normal file → Executable file
View File

@@ -8,14 +8,12 @@ images.
Copyright by aceisace
"""
import logging
import os
import numpy
import requests
from PIL import Image
import requests
import numpy
import os
import logging
from PIL.Image import Resampling
filename = os.path.basename(__file__).split('.py')[0]
logger = logging.getLogger(filename)
@@ -170,7 +168,7 @@ class Inkyimage:
"""Resize an image to desired width or height"""
if self._image_loaded():
if width == None and height == None:
if not width and not height:
logger.error('no height of width specified')
return
@@ -180,7 +178,7 @@ class Inkyimage:
initial_width = image.width
wpercent = (width / float(image.width))
hsize = int((float(image.height) * float(wpercent)))
image = image.resize((width, hsize), Resampling.LANCZOS)
image = image.resize((width, hsize), Image.LANCZOS)
logger.info(f"resized image from {initial_width} to {image.width}")
self.image = image
@@ -188,7 +186,7 @@ class Inkyimage:
initial_height = image.height
hpercent = (height / float(image.height))
wsize = int(float(image.width) * float(hpercent))
image = image.resize((wsize, height), Resampling.LANCZOS)
image = image.resize((wsize, height), Image.LANCZOS)
logger.info(f"resized image from {initial_height} to {image.height}")
self.image = image

2
inkycal/modules/inkycal_agenda.py Normal file → Executable file
View File

@@ -1,7 +1,7 @@
#!python3
"""
Agenda module for Inky-Calendar Project
Inkycal Agenda Module
Copyright by aceisace
"""

2
inkycal/modules/inkycal_calendar.py Normal file → Executable file
View File

@@ -1,7 +1,7 @@
#!python3
"""
Calendar module for Inky-Calendar Project
Inkycal Calendar Module
Copyright by aceisace
"""
from inkycal.modules.template import inkycal_module

2
inkycal/modules/inkycal_image.py Normal file → Executable file
View File

@@ -1,7 +1,7 @@
#!python3
"""
Image module for Inkycal Project
Inkycal Image Module
Copyright by aceisace
"""

0
inkycal/modules/inkycal_jokes.py Normal file → Executable file
View File

0
inkycal/modules/inkycal_server.py Normal file → Executable file
View File

2
inkycal/modules/inkycal_slideshow.py Normal file → Executable file
View File

@@ -1,7 +1,7 @@
#!python3
"""
Image module for Inkycal Project
Inkycal Slideshow Module
Copyright by aceisace
"""
import glob

1
inkycal/modules/inkycal_stocks.py Normal file → Executable file
View File

@@ -1,5 +1,4 @@
#!python3
"""
Stocks Module for Inkycal Project

2
inkycal/modules/inkycal_weather.py Normal file → Executable file
View File

@@ -1,7 +1,7 @@
#!python3
"""
Weather module for Inky-Calendar software.
Inkycal weather module
Copyright by aceisace
"""

0
inkycal/modules/template.py Normal file → Executable file
View File