FLOSS Project Planets

Two Breeze Icon Updates

Planet KDE - Thu, 2024-01-04 20:05

Hi all,

I made a couple of videos explaining more updates for Breeze icons. Enjoy!

Categories: FLOSS Project Planets

ImageX: Accessibility Elements, Part 4: Accessible Keyboard Navigation in Drupal

Planet Drupal - Thu, 2024-01-04 19:54

Authored by: Nadiia Nykolaichuk.

Since Douglas Engelbart invented the computer mouse in 1963, it has become a popular device that many people use for browsing the Internet today. However, there are still a great number of people who cannot afford the comfort of using a mouse. A wide range of temporary or permanent impairments make them rely on keyboard-only navigation.

Categories: FLOSS Project Planets

Valhalla's Things: Random Sashiko + Crazy Quilt Pocket

Planet Debian - Thu, 2024-01-04 19:00
Posted on January 5, 2024

Lately I’ve seen people on the internet talking about victorian crazy quilting. Years ago I had watched a Numberphile video about Hitomezashi Stitch Patterns based on numbers, words or randomness. Few weeks ago I had cut some fabric piece out of an old pair of jeans and I had a lot of scraps that were too small to do anything useful on their own. It easy to see where this can go, right?

I cut a pocket shape out of old garment mockups (this required some piecing), drew a square grid, arranged scraps of jeans to cover the other side, kept everything together with a lot of pins, carefully avoided basting anything, and started covering everything in sashiko / hitomezashi stitches, starting each line with a stitch on the front or the back of the work based on the result of:

import random random.choice(["front", "back"])

For the second piece I tried to use a piece of paper with the square grid instead of drawing it on the fabric: it worked, mostly, I would not do it again as removing the paper was more of a hassle than drawing the lines in the first place. I suspected it, but had to try it anyway.

Then I added a lining from some plain black cotton from the stash; for the slit I put the lining on the front right sides together, sewn at 2 mm from the marked slit, cut it, turned the lining to the back side, pressed and then topstitched as close as possible to the slit from the front.

I bound everything with bias tape, adding herringbone tape loops at the top to hang it from a belt (such as one made from the waistband of one of the donor pair of jeans) and that was it.

I like the way the result feels; maybe it’s a bit too stiff for a pocket, but I can see it work very well for a bigger bag, and maybe even a jacket or some other outer garment.

Categories: FLOSS Project Planets

Aigars Mahinovs: Figuring out finances part 5

Planet Debian - Thu, 2024-01-04 15:46

At the end of the last part of this, we got a Home Assistant OS installation that contains in itself a Firefly III instance and that contains all the current financial information. They are communicating and calculating predictions for me.

The only part that I was not 100% happy with was accounting of cash transactions. You see payments in cash are mostly made away from computer and sometimes even in areas without a mobile Internet connection. And all Firefly III apps that I tried failed at the task of creating a new transaction when offline. Even the one recommended Telegram bot from Firefly III page used a dialog-based approach for creating even a simplest transaction. Issue asking for a one-shot transaction creation option stands as unresolved.

Theoretically it would have been best if I could simply contribute that feature to that particular Telegram bot ... but it's written in Javascript. By mapping the API onto tasks somehow. After about 4 hours I still could not figure out where in the code anything actually happens. It all looked like just sugar or spagetty. Connectors on connectors on mappers.

So I did the real open-source thing and just wrote my own tool. firefly3_telegram_oneshot is a maximally simple Telegram bot based on python-telegram-bot library.

So what does it do? The primary usage for me is to simply send a message to the bot at any time with text like "23.2 coffee and cake" and when the message eventually reaches the bot, it then should create a new transaction from my "cash" account to "Unknown" account in amount of 23.20€ and description "coffee and cake".

That is the key. Everything else in the bot is comfort.

For example "/undo" command deletes the last transaction in cash account (presumably added by error) and "/last" shows which transaction the "/undo" would delete.

And to help with expense categorisation one can also do a message like "6.1 beer, dest=Edeka, cat=alcohol" that would search for a destination account that would fuzzy match to "Edeka" (a supermarket in Germany) and add the transation to the category fuzzy matched to "alcohol", like "Shopping - alcoholic drinks".

And to make that fuzzy matching more reliable I also added "/cat something" and "/dest something" commands that would show which category or destination account would be matched with a given string.

All of that in around 250 lines of Python code and executed by a 17 line Dockerfile (via the Portainer on my Home Assistant OS). One remaining function that could be nice is creating a category or destination account on request (for example when the first character of the supplied string is "+").

I am really plesantly surprised about how much can be done with how little code using the above Python library. And you never need to have any open incoming ports anywhere to runs such bots, so the attack surface for such bot-based service is much tighter.

All in all the system works and works well. The only exception is that for my particual bank there is still no automatic way of extracting data about credit card transactions. For those I still have to manually log into the Internet bank, export a CSV file and then feed that into the Firefly III importer. Annoying. And I am not really motivated to try to hack my bank :D

Has this been useful to any of you? Any ideas to expand or improve what I have? Just find me as "aigarius" on any social media and speak up :)

Categories: FLOSS Project Planets

TechBeamers Python: How to Achieve Python String indexOf Using Find() and Index()

Planet Python - Thu, 2024-01-04 12:10

The indexOf method helps locate a substring in a string, pointing to its first appearance. In Python, there isn’t a direct string indexOf method. But we can achieve the same functionality using various string indexing and search methods. In this tutorial, we’ll delve into these methods, providing multiple examples and additional information to help readers […]

The post How to Achieve Python String indexOf Using Find() and Index() appeared first on TechBeamers.

Categories: FLOSS Project Planets

Django Weblog: Unlock Early Savings: Early Bird Tickets for DjangoCon Europe 2024 Now Available!

Planet Python - Thu, 2024-01-04 11:52

You can take advantage of our Early Bird ticket sale for DjangoCon Europe 2024. By purchasing your tickets early, you not only guarantee your attendance at one of the most exciting Django events but also enjoy significant savings.

Buy tickets on the conference website

Why Go Early?

You can secure your tickets at a special Early Bird rate, providing exceptional value for your conference experience.

Also, your early commitment goes a long way in supporting the success of DjangoCon Europe 2024. It helps us plan better and ensure a seamless event.

Act now and secure your Early Bird tickets before the sale closes on April 31st. Don't miss out on the chance to save and be a part of this exciting event.

We can't wait to welcome you to DjangoCon Europe 2024!

Categories: FLOSS Project Planets

Matt Glaman: My Dependabot configuration for Drupal (and other PHP projects)

Planet Drupal - Thu, 2024-01-04 11:19

I use GitHub to host my repositories, such as this website. To keep my dependencies up-to-date, I leverage Dependabot. The product has matured a lot over the past few years. Before, it was a standalone service and then acquired by GitHub. It did not support dependencies managed by Composer. It was pretty spammy and very noisy. However, it has drastically improved over the past few years. Thanks to all of those at GitHub who have worked to improve it (that includes you, Mike Crittenden.)

My Dependabot configuration consists of a few items, nothing overly specific.

Categories: FLOSS Project Planets

Matt Glaman: PhpStorm live templates to automate the boring things

Planet Drupal - Thu, 2024-01-04 11:19

I finally took a look at writing a custom live template with PhpStorm. I've used them several times to automate scaffolding a foreach statement or other random suggestions that a Tab keypress leads to automated scaffolded code. But I never really dove in to see how they work or could be customized. Then, I had to fix some of my code to comply with Drupal's coding standards.

Drupal requires document comments for all methods, including a short comment. 

Categories: FLOSS Project Planets

Matt Glaman: How do theme template overrides in Drupal work?

Planet Drupal - Thu, 2024-01-04 11:19

In Drupal, with themes, you can override default template output by copying, pasting, and customizing those templates. It works, but how? I thought I always knew how this worked. But I realized I didn't when I dove into supporting Drupal 7 themes with Retrofit.

I know Drupal builds the theme registry and theme hook suggestions. In doing so, it scans templates, and part of that process includes scanning the active theme for template and theme hook template implementations. But when reading the \Drupal\Core\Theme\Registry code, I was coming up blank.

Categories: FLOSS Project Planets

Matt Glaman: Protect your investment in Drupal 7 with Retrofit for Drupal

Planet Drupal - Thu, 2024-01-04 11:19

The final countdown to the Drupal 7 end-of-life has begun ticking after receiving its final extension. Why is upgrading from Drupal 7 to Drupal 10 so daunting? Three problems must be faced when upgrading from Drupal 7 to Drupal 10:

Categories: FLOSS Project Planets

TechBeamers Python: A Beginner’s Guide to Python Random Sampling

Planet Python - Thu, 2024-01-04 09:07

Random sampling might sound complicated, but it’s a super useful skill when working with data in Python. It helps you pick out bits of information without going through everything. Python’s got this cool toolbox called the random module that makes random sampling a breeze. In this tutorial, we’re going to explore different ways to use […]

The post A Beginner’s Guide to Python Random Sampling appeared first on TechBeamers.

Categories: FLOSS Project Planets

LN Webworks: How Skilled Drupal Developers Can Benefit Your Business

Planet Drupal - Thu, 2024-01-04 04:55

Drupal is a cutting-edge and versatile content management system regarded as an incredible solution for a diverse range of web development projects. However, building a Drupal project that aligns with your business goals and produces the desired results can be quite challenging. To effortlessly navigate through all the complexities, it is best to hire proficient Drupal web developers who know how to unleash the true power of the CMS.

As a product of their rigorous training and vast experience, Drupal experts are well versed in the do’s and don’ts to tap into the unfathomable potential of the CMS. This implies that they can certainly take your business on an upward growth spiral with Drupal. Now, let’s delve into some more incredible benefits of hiring experienced Drupal developers.

Categories: FLOSS Project Planets

Pages