Merge pull request #384 from aceinnolab/feature/#383

Feature/#383
This commit is contained in:
Ace
2024-11-07 08:52:10 +01:00
committed by GitHub
15 changed files with 74 additions and 20 deletions

View File

@@ -17,7 +17,7 @@ Before submitting a bug report, check if the issue is already reported in the [I
We welcome suggestions for new features or enhancements. Use the [Issues](https://github.com/aceinnolab/Inkycal/issues) section to submit your ideas, and provide as much detail as possible. We welcome suggestions for new features or enhancements. Use the [Issues](https://github.com/aceinnolab/Inkycal/issues) section to submit your ideas, and provide as much detail as possible.
### Third party modules ### Third party modules
So you had a great idea for an inkycal-module? Awesome! In fact, there is already a repo sepcfifically created for that purpose: [inkycal-modules-template](https://github.com/aceisace/inkycal-modules-template). Just fork that repo, add your module and give me a shout via Discord, Github or Email. So you had a great idea for an inkycal-module? Awesome! In fact, there is already a repo sepcfifically created for that purpose: [inkycal-modules-template](https://github.com/aceinnolab/inkycal-modules-template). Just fork that repo, add your module and give me a shout via Discord, Github or Email.
### Pull Requests ### Pull Requests

View File

@@ -12,5 +12,5 @@ jobs:
- uses: actions/first-interaction@v1 - uses: actions/first-interaction@v1
with: with:
repo-token: ${{ secrets.GITHUB_TOKEN }} repo-token: ${{ secrets.GITHUB_TOKEN }}
issue-message: "Hi there and welcome to Inkycal. Thanks for opening this issue. As this is your first issue in this repository, please read through the [contributing guidelines](https://github.com/aceisace/Inkycal/blob/main/.github/CONTRIBUTING.md)" issue-message: "Hi there and welcome to Inkycal. Thanks for opening this issue. As this is your first issue in this repository, please read through the [contributing guidelines](https://github.com/aceinnolab/Inkycal/blob/main/.github/CONTRIBUTING.md)"
pr-message: "Hi there and welcome to Inkycal. Thanks for opening this issue. As this is your first Pull-Request in this repository, please read through the [contributing guidelines](https://github.com/aceisace/Inkycal/blob/main/.github/CONTRIBUTING.md). Please note that non-critical pull-request cannot be merged into the main branch to ensure stability. Please create a new branch and ask to have it merged into main. Thanks for your understanding." pr-message: "Hi there and welcome to Inkycal. Thanks for opening this issue. As this is your first Pull-Request in this repository, please read through the [contributing guidelines](https://github.com/aceinnolab/Inkycal/blob/main/.github/CONTRIBUTING.md). Please note that non-critical pull-request cannot be merged into the main branch to ensure stability. Please create a new branch and ask to have it merged into main. Thanks for your understanding."

View File

@@ -270,10 +270,60 @@ With your setup being complete at this stage, you may want to 3d-print a case. T
friendly community: friendly community:
[3D-printable case](https://github.com/aceinnolab/Inkycal/wiki/3D-printable-files) [3D-printable case](https://github.com/aceinnolab/Inkycal/wiki/3D-printable-files)
## Directory structure
```tree
├── __init__.py
├── custom (custom functions of Inkycal are inside here)
│   ├── __init__.py
│   ├── functions.py
│   ├── inkycal_exceptions.py
│   └── openweathermap_wrapper.py
├── display (display drivers and functions)
│   ├── __init__.py
│   ├── display.py (this file acts like a wrapper for the display drivers)
│   ├── drivers (actual driver files are inside here)
│   │   ├── epd_7_in_5_colour.py (7.5" display driver). Each supported display has it's own driver
│   │   └── parallel_drivers (parallel display drivers, e.g. 9.7", 10.2" etc.)
│   ├── supported_models.py (this file contains the supported display models and is used to check which displays are supported)
│   └── test_display.py (a dummy driver which does not require a display to be attached)
├── fonts (fonts used by Inkycal are located here)
│   ├── NotoSansUI
│   ├── ProFont
│   └── WeatherFont
├── loggers.py (logging functions)
├── main.py (main file to run Inkycal)
├── modules (inkycal modules, e.g. calendar, weather, stocks etc.)
│   ├── __init__.py
│   ├── dev_module.py (a dummy module for development)
│   ├── ical_parser.py (parses icalendar files, not strictly a module, but helper class)
│   ├── inky_image.py (module to display images)
│   ├── inkycal_agenda.py (agenda module)
│   ├── inkycal_calendar.py (calendar module)
│   ├── inkycal_feeds.py (feeds module)
│   ├── inkycal_fullweather.py (full-weather module)
│   ├── inkycal_image.py (image module)
│   ├── inkycal_jokes.py (jokes module)
│   ├── inkycal_server.py (module for inkycal-server, by third party)
│   ├── inkycal_slideshow.py (slideshow module)
│   ├── inkycal_stocks.py (stocks module - credit to @worstface)
│   ├── inkycal_textfile_to_display.py (module to display text files)
│   ├── inkycal_tindie.py (tindie module)
│   ├── inkycal_todoist.py (todoist module)
│   ├── inkycal_weather.py (weather module)
│   ├── inkycal_webshot.py (webshot module - credit to @worstface)
│   ├── inkycal_xkcd.py (xkcd module - credit to @worstface)
│   └── template.py (template module)
├── settings.py (settings for Inkycal)
└── utils (utility functions)
├── __init__.py
├── json_cache.py
└── pisugar.py (PiSugar driver)
```
## Contributing ## Contributing
All sorts of contributions are most welcome and appreciated. To start contributing, please follow All sorts of contributions are most welcome and appreciated. To start contributing, please follow
the [Contribution Guidelines](https://github.com/aceisace/Inkycal/blob/main/.github/CONTRIBUTING.md) the [Contribution Guidelines](https://github.com/aceinnolab/Inkycal/blob/main/.github/CONTRIBUTING.md)
The average response time for issues, PRs and emails is usually 24 hours. In some cases, it might be longer. If you want The average response time for issues, PRs and emails is usually 24 hours. In some cases, it might be longer. If you want
to have some faster responses, please use Discord (link below) to have some faster responses, please use Discord (link below)
@@ -286,7 +336,7 @@ We're happy to help, to beginners and developers alike. In fact, you are more li
than on GitHub. than on GitHub.
<a href="https://discord.gg/sHYKeSM"> <a href="https://discord.gg/sHYKeSM">
<img src="https://github.com/aceisace/Inkycal/blob/assets/Repo/discord-logo.png?raw=true" alt="Inkycal chatroom Discord" width=200> <img src="https://github.com/aceinnolab/Inkycal/blob/assets/Repo/discord-logo.png?raw=true" alt="Inkycal chatroom Discord" width=200>
</a> </a>
## Sponsoring ## Sponsoring
@@ -325,5 +375,5 @@ perks after confirming 💯
## Our Contributors ## Our Contributors
<table><tr><td align="center"><a href="https://github.com/aceisace"><img alt="aceisace" src="https://avatars.githubusercontent.com/u/29558518?v=4" width="117" /><br />aceisace</a></td><td align="center"><a href="https://github.com/Atrejoe"><img alt="Atrejoe" src="https://avatars.githubusercontent.com/u/585091?v=4" width="117" /><br />Atrejoe</a></td><td align="center"><a href="https://github.com/actions-user"><img alt="actions-user" src="https://avatars.githubusercontent.com/u/65916846?v=4" width="117" /><br />actions-user</a></td><td align="center"><a href="https://github.com/emilyboda"><img alt="emilyboda" src="https://avatars.githubusercontent.com/u/9170143?v=4" width="117" /><br />emilyboda</a></td><td align="center"><a href="https://github.com/StevenSeifried"><img alt="StevenSeifried" src="https://avatars.githubusercontent.com/u/39765956?v=4" width="117" /><br />StevenSeifried</a></td><td align="center"><a href="https://github.com/mrbwburns"><img alt="mrbwburns" src="https://avatars.githubusercontent.com/u/66523867?v=4" width="117" /><br />mrbwburns</a></td></tr><tr><td align="center"><a href="https://github.com/apps/dependabot"><img alt="dependabot[bot]" src="https://avatars.githubusercontent.com/in/29110?v=4" width="117" /><br />dependabot[bot]</a></td><td align="center"><a href="https://github.com/LakesideMiners"><img alt="LakesideMiners" src="https://avatars.githubusercontent.com/u/23389169?v=4" width="117" /><br />LakesideMiners</a></td><td align="center"><a href="https://github.com/hjiang"><img alt="hjiang" src="https://avatars.githubusercontent.com/u/18527?v=4" width="117" /><br />hjiang</a></td><td align="center"><a href="https://github.com/ch3lmi"><img alt="ch3lmi" src="https://avatars.githubusercontent.com/u/19972012?v=4" width="117" /><br />ch3lmi</a></td><td align="center"><a href="https://github.com/mygrexit"><img alt="mygrexit" src="https://avatars.githubusercontent.com/u/33792951?v=4" width="117" /><br />mygrexit</a></td><td align="center"><a href="https://github.com/tobychui"><img alt="tobychui" src="https://avatars.githubusercontent.com/u/24617523?v=4" width="117" /><br />tobychui</a></td></tr><tr><td align="center"><a href="https://github.com/worstface"><img alt="worstface" src="https://avatars.githubusercontent.com/u/72295005?v=4" width="117" /><br />worstface</a></td><td align="center"><a href="https://github.com/sapostoluk"><img alt="sapostoluk" src="https://avatars.githubusercontent.com/u/7192139?v=4" width="117" /><br />sapostoluk</a></td><td align="center"><a href="https://github.com/freezingDaniel"><img alt="freezingDaniel" src="https://avatars.githubusercontent.com/u/82905307?v=4" width="117" /><br />freezingDaniel</a></td><td align="center"><a href="https://github.com/dealyllama"><img alt="dealyllama" src="https://avatars.githubusercontent.com/u/5891782?v=4" width="117" /><br />dealyllama</a></td><td align="center"><a href="https://github.com/rafaljanicki"><img alt="rafaljanicki" src="https://avatars.githubusercontent.com/u/7746477?v=4" width="117" /><br />rafaljanicki</a></td><td align="center"><a href="https://github.com/priv-kweihmann"><img alt="priv-kweihmann" src="https://avatars.githubusercontent.com/u/46938494?v=4" width="117" /><br />priv-kweihmann</a></td></tr><tr><td align="center"><a href="https://github.com/surak"><img alt="surak" src="https://avatars.githubusercontent.com/u/878399?v=4" width="117" /><br />surak</a></td><td align="center"><a href="https://github.com/AlessandroMandelli"><img alt="AlessandroMandelli" src="https://avatars.githubusercontent.com/u/65062723?v=4" width="117" /><br />AlessandroMandelli</a></td><td align="center"><a href="https://github.com/DavidCamre"><img alt="DavidCamre" src="https://avatars.githubusercontent.com/u/1098069?v=4" width="117" /><br />DavidCamre</a></td><td align="center"><a href="https://github.com/jordanschau"><img alt="jordanschau" src="https://avatars.githubusercontent.com/u/412028?v=4" width="117" /><br />jordanschau</a></td><td align="center"><a href="https://github.com/mshulman"><img alt="mshulman" src="https://avatars.githubusercontent.com/u/1484420?v=4" width="117" /><br />mshulman</a></td><td align="center"><a href="https://github.com/vitasam"><img alt="vitasam" src="https://avatars.githubusercontent.com/u/5597505?v=4" width="117" /><br />vitasam</a></td></tr></table> <table><tr><td align="center"><a href="https://github.com/aceinnolab"><img alt="aceinnolab" src="https://avatars.githubusercontent.com/u/29558518?v=4" width="117" /><br />aceisace</a></td><td align="center"><a href="https://github.com/Atrejoe"><img alt="Atrejoe" src="https://avatars.githubusercontent.com/u/585091?v=4" width="117" /><br />Atrejoe</a></td><td align="center"><a href="https://github.com/actions-user"><img alt="actions-user" src="https://avatars.githubusercontent.com/u/65916846?v=4" width="117" /><br />actions-user</a></td><td align="center"><a href="https://github.com/emilyboda"><img alt="emilyboda" src="https://avatars.githubusercontent.com/u/9170143?v=4" width="117" /><br />emilyboda</a></td><td align="center"><a href="https://github.com/StevenSeifried"><img alt="StevenSeifried" src="https://avatars.githubusercontent.com/u/39765956?v=4" width="117" /><br />StevenSeifried</a></td><td align="center"><a href="https://github.com/mrbwburns"><img alt="mrbwburns" src="https://avatars.githubusercontent.com/u/66523867?v=4" width="117" /><br />mrbwburns</a></td></tr><tr><td align="center"><a href="https://github.com/apps/dependabot"><img alt="dependabot[bot]" src="https://avatars.githubusercontent.com/in/29110?v=4" width="117" /><br />dependabot[bot]</a></td><td align="center"><a href="https://github.com/LakesideMiners"><img alt="LakesideMiners" src="https://avatars.githubusercontent.com/u/23389169?v=4" width="117" /><br />LakesideMiners</a></td><td align="center"><a href="https://github.com/hjiang"><img alt="hjiang" src="https://avatars.githubusercontent.com/u/18527?v=4" width="117" /><br />hjiang</a></td><td align="center"><a href="https://github.com/ch3lmi"><img alt="ch3lmi" src="https://avatars.githubusercontent.com/u/19972012?v=4" width="117" /><br />ch3lmi</a></td><td align="center"><a href="https://github.com/mygrexit"><img alt="mygrexit" src="https://avatars.githubusercontent.com/u/33792951?v=4" width="117" /><br />mygrexit</a></td><td align="center"><a href="https://github.com/tobychui"><img alt="tobychui" src="https://avatars.githubusercontent.com/u/24617523?v=4" width="117" /><br />tobychui</a></td></tr><tr><td align="center"><a href="https://github.com/worstface"><img alt="worstface" src="https://avatars.githubusercontent.com/u/72295005?v=4" width="117" /><br />worstface</a></td><td align="center"><a href="https://github.com/sapostoluk"><img alt="sapostoluk" src="https://avatars.githubusercontent.com/u/7192139?v=4" width="117" /><br />sapostoluk</a></td><td align="center"><a href="https://github.com/freezingDaniel"><img alt="freezingDaniel" src="https://avatars.githubusercontent.com/u/82905307?v=4" width="117" /><br />freezingDaniel</a></td><td align="center"><a href="https://github.com/dealyllama"><img alt="dealyllama" src="https://avatars.githubusercontent.com/u/5891782?v=4" width="117" /><br />dealyllama</a></td><td align="center"><a href="https://github.com/rafaljanicki"><img alt="rafaljanicki" src="https://avatars.githubusercontent.com/u/7746477?v=4" width="117" /><br />rafaljanicki</a></td><td align="center"><a href="https://github.com/priv-kweihmann"><img alt="priv-kweihmann" src="https://avatars.githubusercontent.com/u/46938494?v=4" width="117" /><br />priv-kweihmann</a></td></tr><tr><td align="center"><a href="https://github.com/surak"><img alt="surak" src="https://avatars.githubusercontent.com/u/878399?v=4" width="117" /><br />surak</a></td><td align="center"><a href="https://github.com/AlessandroMandelli"><img alt="AlessandroMandelli" src="https://avatars.githubusercontent.com/u/65062723?v=4" width="117" /><br />AlessandroMandelli</a></td><td align="center"><a href="https://github.com/DavidCamre"><img alt="DavidCamre" src="https://avatars.githubusercontent.com/u/1098069?v=4" width="117" /><br />DavidCamre</a></td><td align="center"><a href="https://github.com/jordanschau"><img alt="jordanschau" src="https://avatars.githubusercontent.com/u/412028?v=4" width="117" /><br />jordanschau</a></td><td align="center"><a href="https://github.com/mshulman"><img alt="mshulman" src="https://avatars.githubusercontent.com/u/1484420?v=4" width="117" /><br />mshulman</a></td><td align="center"><a href="https://github.com/vitasam"><img alt="vitasam" src="https://avatars.githubusercontent.com/u/5597505?v=4" width="117" /><br />vitasam</a></td></tr></table>

View File

@@ -1,5 +1,5 @@
# About Inkycal # About Inkycal
<img align="center" src="https://raw.githubusercontent.com/aceisace/Inkycal/assets/Repo/logo.png" width="800" alt="inkycal logo"> <img align="center" src="https://raw.githubusercontent.com/aceinnolab/Inkycal/assets/Repo/logo.png" width="800" alt="inkycal logo">
Inkycal is a python3 software for selected E-Paper displays. Inkycal is a python3 software for selected E-Paper displays.
It's open-source (non-commercially), fully modular, user-friendly and even runs It's open-source (non-commercially), fully modular, user-friendly and even runs

View File

@@ -5,7 +5,7 @@
Inkycal documentation Inkycal documentation
====================== ======================
.. image:: https://raw.githubusercontent.com/aceisace/Inkycal/assets/Repo/logo.png .. image:: https://raw.githubusercontent.com/aceinnolab/Inkycal/assets/Repo/logo.png
:alt: logo :alt: logo
.. toctree:: .. toctree::

View File

@@ -1,4 +1,4 @@
.. image:: https://raw.githubusercontent.com/aceisace/Inkycal/assets/Repo/logo.png .. image:: https://raw.githubusercontent.com/aceinnolab/Inkycal/assets/Repo/logo.png
:alt: logo :alt: logo
:align: center :align: center

View File

@@ -17,7 +17,7 @@ pip3 install -e ./
``` ```
## Creating settings file ## Creating settings file
Please navigate to the [WEB-UI](https://aceisace.eu.pythonanywhere.com/index) to create your settings file. Please navigate to the [WEB-UI](https://inkycal.aceinnolab.com/ui) to create your settings file.
Copy the generated settings file to the Raspberry Pi Copy the generated settings file to the Raspberry Pi
more coming soon.. more coming soon..

View File

@@ -82,7 +82,7 @@
<section id="about-inkycal"> <section id="about-inkycal">
<h1>About Inkycal<a class="headerlink" href="#about-inkycal" title="Link to this heading"></a></h1> <h1>About Inkycal<a class="headerlink" href="#about-inkycal" title="Link to this heading"></a></h1>
<img align="center" src="https://raw.githubusercontent.com/aceisace/Inkycal/assets/Repo/logo.png" width="800" alt="inkycal logo"><p>Inkycal is a python3 software for selected E-Paper displays. <img align="center" src="https://raw.githubusercontent.com/aceinnolab/Inkycal/assets/Repo/logo.png" width="800" alt="inkycal logo"><p>Inkycal is a python3 software for selected E-Paper displays.
Its open-source (non-commercially), fully modular, user-friendly and even runs Its open-source (non-commercially), fully modular, user-friendly and even runs
well even on the Raspberry Pi Zero. Inkycal even has a web-UI which takes well even on the Raspberry Pi Zero. Inkycal even has a web-UI which takes
care of adding your details! No more editing files, Yay :partying_face:</p> care of adding your details! No more editing files, Yay :partying_face:</p>

View File

@@ -81,7 +81,7 @@
<section id="inkycal-documentation"> <section id="inkycal-documentation">
<h1>Inkycal documentation<a class="headerlink" href="#inkycal-documentation" title="Link to this heading"></a></h1> <h1>Inkycal documentation<a class="headerlink" href="#inkycal-documentation" title="Link to this heading"></a></h1>
<img alt="logo" src="https://raw.githubusercontent.com/aceisace/Inkycal/assets/Repo/logo.png" /> <img alt="logo" src="https://raw.githubusercontent.com/aceinnolab/Inkycal/assets/Repo/logo.png" />
<div class="toctree-wrapper compound"> <div class="toctree-wrapper compound">
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p> <p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
<ul> <ul>

View File

@@ -123,7 +123,7 @@
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article"> <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody"> <div itemprop="articleBody">
<img alt="logo" class="align-center" src="https://raw.githubusercontent.com/aceisace/Inkycal/assets/Repo/logo.png" /> <img alt="logo" class="align-center" src="https://raw.githubusercontent.com/aceinnolab/Inkycal/assets/Repo/logo.png" />
<section id="module-inkycal.main"> <section id="module-inkycal.main">
<span id="inkycal"></span><h1>Inkycal<a class="headerlink" href="#module-inkycal.main" title="Link to this heading"></a></h1> <span id="inkycal"></span><h1>Inkycal<a class="headerlink" href="#module-inkycal.main" title="Link to this heading"></a></h1>
<p>Main class for inkycal Project <p>Main class for inkycal Project

View File

@@ -102,7 +102,7 @@ pip3<span class="w"> </span>install<span class="w"> </span>-e<span class="w"> </
</section> </section>
<section id="creating-settings-file"> <section id="creating-settings-file">
<h2>Creating settings file<a class="headerlink" href="#creating-settings-file" title="Link to this heading"></a></h2> <h2>Creating settings file<a class="headerlink" href="#creating-settings-file" title="Link to this heading"></a></h2>
<p>Please navigate to the <a class="reference external" href="https://aceisace.eu.pythonanywhere.com/index">WEB-UI</a> to create your settings file.</p> <p>Please navigate to the <a class="reference external" href="https://inkycal.aceinnolab.com/ui">WEB-UI</a> to create your settings file.</p>
<p>Copy the generated settings file to the Raspberry Pi <p>Copy the generated settings file to the Raspberry Pi
more coming soon..</p> more coming soon..</p>
</section> </section>

View File

@@ -1,5 +1,5 @@
# About Inkycal # About Inkycal
<img align="center" src="https://raw.githubusercontent.com/aceisace/Inkycal/assets/Repo/logo.png" width="800" alt="inkycal logo"> <img align="center" src="https://raw.githubusercontent.com/aceinnolab/Inkycal/assets/Repo/logo.png" width="800" alt="inkycal logo">
Inkycal is a python3 software for selected E-Paper displays. Inkycal is a python3 software for selected E-Paper displays.
It's open-source (non-commercially), fully modular, user-friendly and even runs It's open-source (non-commercially), fully modular, user-friendly and even runs

View File

@@ -17,7 +17,7 @@ pip3 install -e ./
``` ```
## Creating settings file ## Creating settings file
Please navigate to the [WEB-UI](https://aceisace.eu.pythonanywhere.com/index) to create your settings file. Please navigate to the [WEB-UI](https://inkycal.aceinnolab.com) to create your settings file.
Copy the generated settings file to the Raspberry Pi Copy the generated settings file to the Raspberry Pi
more coming soon.. more coming soon..

View File

@@ -78,13 +78,17 @@ class TextToDisplay(inkycal_module):
with open(self.filepath, 'r') as file: with open(self.filepath, 'r') as file:
file_content = file.read() file_content = file.read()
fitted_content = text_wrap(file_content, font=self.font, max_width=im_width) # Split content by lines if not making a request
if not self.make_request:
lines = file_content.split('\n')
else:
lines = text_wrap(file_content, font=self.font, max_width=im_width)
# Trim down the list to the max number of lines # Trim down the list to the max number of lines
del fitted_content[max_lines:] del lines[max_lines:]
# Write feeds on image # Write feeds on image
for index, line in enumerate(fitted_content): for index, line in enumerate(lines):
write( write(
im_black, im_black,
line_positions[index], line_positions[index],

View File

@@ -17,7 +17,7 @@ __version__ = "2.0.4"
__description__ = "Inkycal is a python3 software for syncing icalendar events, weather and news on selected E-Paper displays" __description__ = "Inkycal is a python3 software for syncing icalendar events, weather and news on selected E-Paper displays"
__packages__ = ["inkycal"] __packages__ = ["inkycal"]
__author__ = "aceinnolab" __author__ = "aceinnolab"
__author_email__ = "aceisace63@yahoo.com" __author_email__ = "inkycal@aceinnolab.com"
__url__ = "https://github.com/aceinnolab/Inkycal" __url__ = "https://github.com/aceinnolab/Inkycal"
__install_requires__ = required __install_requires__ = required