Feeds

Beta for Amarok 3.1 available

Planet KDE - Tue, 2024-07-23 17:30

Dear fans of music & open source music players,
in preparation of the upcoming Amarok 3.1 release, a beta release (3.0.81) has been prepared.

As is observable from the ChangeLog, in addition to various bugfixes, there will be some, but not that many, new features included in the upcoming version. However, there has been a lot of Qt6 compatibility preparation work done under the hood, so version number 3.1 reflects the amount of changed code better than 3.0.2 would. 3.1.0 is likely to be released in early August, and all help catching any regressions during this period is highly appreciated. (n.b. one won't be able to compile a Qt6 Amarok with 3.1 yet, but perhaps with the eventual 3.2)

The source tarball is available on download.kde.org and it has been signed with Tuomas Nurmi's GPG key. There doesn't appear to be many binary packages of the beta available, at least at the moment, but the various nightly git builds provided by various splendid packagers are also based on corresponding source code, so using them and reporting findings is also a valid way to participate in the beta test effort.

Happy listening!

Categories: FLOSS Project Planets

Kirigami Addons 1.4

Planet KDE - Tue, 2024-07-23 17:20

Kirigami Addons 1.4 is out! This release introduce a new module to manage actions similar to that we can find in the QtWidgets world with KXmlGui. This was not written from scratch but upstream the existing infrastructure from Merkuro (ex-Kalendar) and Marknote. These two applications have already been ported to this new module and more like Tokodon or KDE Keychain will follow soon.

This includes a shortcut editor to assign and modify the shortcuts of an application and a command bar to quickly search and trigger actions

Shortcut editor

Command bar

Similar to KXmlGui, the actions are defined in C++, which allows to make use KStandardActions and get consistent shortcuts accross all your applications.

class MyApplication : public AbstractKirigamiApplication { Q_OBJECT QML_ELEMENT public: explicit MyApplication(QObject *parent = nullptr); void setupActions() override; Q_SIGNALS: void addNotebook(); }; MyApplication::MyApplication(QObject *parent) : AbstractKirigamiApplication(parent) { setupActions(); } void MyApplication::setupActions() { AbstractKirigamiApplication::setupActions(); auto actionName = QLatin1String("add_notebook"); if (KAuthorized::authorizeAction(actionName)) { auto action = mainCollection()->addAction(actionName, this, &MyApplication::addNotebook); action->setText(i18nc("@action:inmenu", "New Notebook")); action->setIcon(QIcon::fromTheme(QStringLiteral("list-add-symbolic"))); mainCollection()->addAction(action->objectName(), action); mainCollection()->setDefaultShortcut(action, QKeySequence(Qt::CTRL | Qt::SHIFT | Qt::Key_N)); } }

These new actions can then be used from QML thanks to the new Kirigami.Action::fromQAction property.

import org.kde.kirigamiaddons.statefulapp as StatefulApp import org.kde.kirigamiaddons.settings as Settings StatefulApp.StatefulWindow { id: root windowName: 'Main' application: MyApplication { configurationView: Settings.ConfigurationView { ... } } Kirigami.Action { fromQAction: MyApplication.action('add_notebook') } Connections { target: MyApplication function onAddNotebook(): void { ... } } }

There is a new template available in KAppTemplate, which allows you to kickstart your new Kirigami application with the basic skeleton with this new module and other “Kirigami Addons” modules.

Other Changes

The FormCard design was tweaked a bit more when using a dark theme, thanks to James and Joshua for their feedback.

Speaking of FormCard, with the development of KeyChain, I ended up adding a new component to the FormCard collection: FormTextAreaDelegate. This component is the equivalent of FormTextFieldDelegate but with a TextArea instead. FormComboBoxDelegate and FormTextFieldDelegate also received a bunch of new properties and functions to proxy the underlying QtQuick.Controls component.

Evgeniy Harchenko tweaked a bit the headers of the TableView component.

Finally, a new contributor Andreas Gattringer fixed a crash in the video maximizing component which was affecting NeoChat.

Packager Section

You can find the package on download.kde.org and it has been signed with my GPG key.

Categories: FLOSS Project Planets

Four Kitchens: Why time is of the essence for a Drupal 11 migration

Planet Drupal - Tue, 2024-07-23 17:19

Shanice Ortiz

Director of Projects

Alongside her project management duties, Shanice is passionate about expanding Four Kitchens’ DEI efforts and fostering a culture of advocates and allies.

January 1, 1970

Platform upgrade.

For any IT manager, especially those at large organizations, these two words are enough to cause stress. Even if you just completed a move to Drupal 10, the release of Drupal 11 is around the corner with the latest version available in late July 2024.

What does that mean for your organization? Primarily, your greatest takeaway is that you shouldn’t feel the anxiety of another looming deadline. You still have two years to complete the upgrade. Plus, engineering plans are just starting to come together about how to tackle the upgrade multiple different ways. Time is still on your side.

However, just because a move to Drupal 11 isn’t cause for immediate alarm doesn’t mean you shouldn’t start planning an upgrade. You and your organization will see considerable benefits by addressing this change sooner rather than later.

What the move to Drupal 11 means for your website

In terms of adding new tools or website features, moving to Drupal 11 doesn’t mean much for your organization. Drupal rolls out upgrades differently than conventional software platforms. Version 11 will seem a lot like Drupal 10.3 in terms of new functionality.

Instead, Drupal will be deprecating features to eliminate ‌unnecessary or outdated code from the core platform. For example, in moving from Drupal 9.5 to 10, the CKEditor 4 module was removed to make room for CKEditor 5. For Drupal 11, the Book module will be deprecated.

If your organization doesn’t use this feature, its subtraction amounts to a positive by eliminating unneeded weight to the platform. If you do, then Book will still function in a more nimble way as a contrib module.

Ultimately, your organization won’t see any new features from Drupal 11 until the release of the next version, Drupal 11.1. Does that mean you should wait until then to start planning a website upgrade? You guessed it — absolutely not.

Why get ahead of Drupal 11?

The biggest benefit of planning your upgrade to Drupal 11 early is to avoid the scramble of a last-minute migration. This creates headaches for your team, and you also run into crowded schedules if you rely on a development partner. You don’t just run the risk of incurring unnecessary charges for trying to plan an upgrade at the last minute. You also risk limited availability as development agencies support other clients who also waited until the last minute.

Plus, planning to migrate to Drupal 11 now enables you to sidestep the complications of upgrading after 11.1 is released. Version 11.1 will include new features, and migrating across two versions will be more difficult, especially if you manage multiple websites.

Making the Drupal 11 move now gives you a leaner version of the platform while leaving you better positioned for 11.1. In all, your journey to Drupal 11.1 will be significantly faster and easier if you’ve already completed the migration to Drupal 11.

What stakeholders need to know about Drupal 11

As you plan an upgrade to Drupal 11, you need to keep your stakeholders informed about what to expect. Rather than getting bogged down with deprecations or other elements, you should frame the upgrade as a maintenance release.

In other words, the migration is primarily a way to improve your organization’s position going forward. Along with creating an easier path toward accessing the new features coming for 11.1, this update also will improve the performance and scalability of the platform for your websites.

How to plan a Drupal 11 migration

Drupal 11 will be released in late July. Consequently, your organization has a long runway toward completing an upgrade. In fact, you have two years until version 10 reaches its end of life in mid- to late 2026.

While that sounds like an eternity from now, your organization has more options at its disposal for planning an upgrade the sooner you begin. With enough lead time, you could include much of the work of preparing for Drupal 11 as part of a Continuous Care program with Four Kitchens.

Depending on your subscription tier, you can allocate your hours differently to support the upgrade. Alternatively, you can plan to allocate additional hours to your tier to complete the upgrade. Or, you can upgrade to Drupal 11 as part of a standalone project separate from your Continuous Care engagement.

The point, ultimately, is to underscore that you have options. At Four Kitchens, we’re already working on our upgrade plan to guide our clients through a seamless transition to Drupal 11. By considering the right approach for your organization sooner rather than later, you can ensure you still have options for navigating this upgrade in a timely, efficient way.

If you’re ready to start planning, we should talk.

The post Why time is of the essence for a Drupal 11 migration appeared first on Four Kitchens.

Categories: FLOSS Project Planets

Bounteous.com: The Future of Experimentation: Acquia Convert

Planet Drupal - Tue, 2024-07-23 17:04
As of July 1, Acquia Personalization is no longer available for new customers. The platform is being replaced by Acquia Convert, powered by VWO.
Categories: FLOSS Project Planets

PyCoder’s Weekly: Issue #639 (July 23, 2024)

Planet Python - Tue, 2024-07-23 15:30

#639 – JULY 23, 2024
View in Browser »

Asyncio gather() Handle Exceptions

The asyncio.gather() function takes an optional argument return_exceptions which changes the behavior of the co-routine when an error occurs. This article shows you how to use it.
JASON BROWNLEE

Python Protocols: Leveraging Structural Subtyping

In this tutorial, you’ll learn about Python’s protocols and how they can help you get the most out of using Python’s type hint system and static type checkers.
REAL PYTHON

Prod Alerts? You Should be Autoscaling

Let Judoscale solve your scaling issues. We support Django, Flask, and FastAPI, and we also autoscale your Celery and RQ task queues. Traffic spike? Scaled up. Quiet night? Scaled down. Work queue backlog? No problem →
JUDOSCALE sponsor

Trying Out Free-Threaded Python on macOS

Free-threaded mode is available as a compile option in the beta of Python 3.13. Simon decided to try it out on his Mac.
SIMON WILLISON

Quiz: Python’s Built-in Functions: A Complete Exploration

Take this quiz to test your knowledge about the available built-in functions in Python. By taking this quiz, you’ll deepen your understanding of how to use these functions and the common programming problems they cover, from mathematical computations to Python-specific features.
REAL PYTHON

Python 3.13.0 Beta 4 Released

CPYTHON DEV BLOG

Articles & Tutorials Exercises Course: Introduction to Web Scraping With Python

In this course, you’ll practice the main steps of the web scraping process. You’ll write a script that uses Python’s requests library to scrape and parse data from a website. You’ll also interact with HTML forms using tools like Beautiful Soup and Mechanical Soup to extract specific information.
REAL PYTHON course

When Generators Get Cleaned Up

When playing with generators in asynchronous code, Sam ran into some things he didn’t quite expect with how and when resources get cleaned up. This article shows you what you can and can’t control, and in some cases whether you should.
SAM EISENHANDLER

Posit Connect - Help Your Data Science Team Share and Collaborate

Tired of emailing files around & trying to use general-purpose collaboration tools? Posit Connect makes it easy to share, collaborate, & get feedback on your data science work including Jupyter notebooks, Streamlit, & other analytics applications.
POSIT sponsor

Different Ways I Start Writing New Code

In this article, the author talks about the different approaches they use to create new code depending on the mood, the feature or bug at hand, and their confidence level. Five different approaches are covered.
JUHA-MATTI SANTALA

A Python Epoch Timestamp Timezone Trap

Date and times are problematic and there are all sorts of problems you can get into when you use them in Python. This post talks about one challenge when using epoch timestamp numbers.
JOËL PERRAS

How to Convert a Python Script Into a Web App

This post shows you how to take a Python script and turn it into a web application using FastAPI. It includes information about how to choose endpoints and how to do authentication.
AHMED LEMINE

Instrumenting Python GIL With eBPF

eBPF is a tool available on Linux to dig into the profile of your code. In this article, Nikolay uses it to inspect when the GIL gets invoked in CPython.
NIKOLAY SIVOK

Approximate Counting in Django and Postgres

Pagination in Django uses the rather slow SELECT COUNT(*) SQL call. This article looks at how to speed up counting with Django and PostgreSQL.
NIK TOMAZIC

Assignment vs. Mutation in Python

In Python, “change” can mean two different things. Assignment changes which object a variable points to. Mutation, changes the object itself.
TREY HUNNER

Flask vs Django in 2024

This post compares Flask and Django, from what they specialize in to what it takes to do a personal web site in each.
WILL VINCENT

Making an Iterator Out of a Function

You can use the Python built-in function iter with two arguments to create an iterator from a function.
RODRIGO GIRÃO SERRÃO

Developing GraphQL APIs in Django With Strawberry

This tutorial details how to integrate GraphQL with Django using Strawberry.
TESTDRIVEN.IO • Shared by Michael Herman

Projects & Code cbfa: Class-Based Views for FastAPI

GITHUB.COM/POMPONCHIK • Shared by Evgeniy Blinov (pomponchik)

Satyrn: macOS App for Jupyter Nobtebooks

SATYRN.APP

Datasketch: Probabilistic Data Structures

PYPI.ORG

pyNES: Python Programming for Nintendo 8 Bits

GITHUB.COM/GUTOMAIA

staged-script: Divide Automation Scripts Into Stages

GITHUB.COM/SANDIALABS • Shared by Jason M. Gates

Events Weekly Real Python Office Hours Q&A (Virtual)

July 24, 2024
REALPYTHON.COM

SPb Python Drinkup

July 25, 2024
MEETUP.COM

PyOhio 2024

July 27 to July 28, 2024
PYOHIO.ORG

PyDelhi User Group Meetup

July 27, 2024
MEETUP.COM

Lightning Talks

July 27, 2024
MEETUP.COM

Happy Pythoning!
This was PyCoder’s Weekly Issue #639.
View in Browser »

[ Subscribe to 🐍 PyCoder’s Weekly 💌 – Get the best Python news, articles, and tutorials delivered to your inbox once a week >> Click here to learn more ]

Categories: FLOSS Project Planets

GNU Guix: The European Union must keep funding free software

GNU Planet! - Tue, 2024-07-23 11:46

Guix is the fruit of a combination of volunteer work by an amazing number of people, work paid for by employers, but also work sponsored by public institutions. The European Commission’s Next Generation Internet (NGI) calls have been instrumental in that regard. News that NGI funding could vanish came to us as a warning signal.

Since 2020, NGI has supported many free software projects, allowing for significant strides on important topics that would otherwise be hard to fund. As an example, here are some of the NGI grants that directly benefited Guix and related projects:

Over the years, NGI has more than demonstrated that public financial support for free software development makes a difference. We strongly believe that this support must continue, that it must strengthen the development of innovative software where user autonomy and freedom is a central aspect.

For these reasons, the Guix project joins a growing number of projects and organizations in signing the following open letter to the European Commission.

The open letter below was initially published by petites singularités. English translation provided by OW2.

Open Letter to the European Commission

Since 2020, Next Generation Internet (NGI) programmes, part of European Commission's Horizon programme, fund free software in Europe using a cascade funding mechanism (see for example NLnet's calls). This year, according to the Horizon Europe working draft detailing funding programmes for 2025, we notice that Next Generation Internet is not mentioned any more as part of Cluster 4.

NGI programmes have shown their strength and importance to supporting the European software infrastructure, as a generic funding instrument to fund digital commons and ensure their long-term sustainability. We find this transformation incomprehensible, moreover when NGI has proven efficient and economical to support free software as a whole, from the smallest to the most established initiatives. This ecosystem diversity backs the strength of European technological innovation, and maintaining the NGI initiative to provide structural support to software projects at the heart of worldwide innovation is key to enforce the sovereignty of a European infrastructure. Contrary to common perception, technical innovations often originate from European rather than North American programming communities, and are mostly initiated by small-scaled organisations.

Previous Cluster 4 allocated 27 million euros to:

  • "Human centric Internet aligned with values and principles commonly shared in Europe" ;
  • "A flourishing internet, based on common building blocks created within NGI, that enables better control of our digital life" ;
  • "A structured ecosystem of talented contributors driving the creation of new internet commons and the evolution of existing internet commons".

In the name of these challenges, more than 500 projects received NGI funding in the first 5 years, backed by 18 organisations managing these European funding consortia.

NGI contributes to a vast ecosystem, as most of its budget is allocated to fund third parties by the means of open calls, to structure commons that cover the whole Internet scope - from hardware to application, operating systems, digital identities or data traffic supervision. This third-party funding is not renewed in the current program, leaving many projects short on resources for research and innovation in Europe.

Moreover, NGI allows exchanges and collaborations across all the Euro zone countries as well as "widening countries"¹, currently both a success and an ongoing progress, likewise the Erasmus programme before us. NGI also contributes to opening and supporting longer relationships than strict project funding does. It encourages implementing projects funded as pilots, backing collaboration, identification and reuse of common elements across projects, interoperability in identification systems and beyond, and setting up development models that mix diverse scales and types of European funding schemes.

While the USA, China or Russia deploy huge public and private resources to develop software and infrastructure that massively capture private consumer data, the EU can't afford this renunciation. Free and open source software, as supported by NGI since 2020, is by design the opposite of potential vectors for foreign interference. It lets us keep our data local and favors a community-wide economy and know-how, while allowing an international collaboration.

This is all the more essential in the current geopolitical context: the challenge of technological sovereignty is central, and free software allows to address it while acting for peace and sovereignty in the digital world as a whole.

In this perspective, we urge you to claim for preserving the NGI programme as part of the 2025 funding programme.

¹ As defined by Horizon Europe, widening Member States are Bulgaria, Croatia, Cyprus, Czechia, Estonia, Greece, Hungary, Latvia, Lituania, Malta, Poland, Portugal, Romania, Slovakia, and Slovenia. Widening associated countries (under condition of an association agreement) include Albania, Armenia, Bosnia, Feroe Islands, Georgia, Kosovo, Moldavia, Montenegro, Morocco, North Macedonia, Serbia, Tunisia, Turkeye, and Ukraine. Widening overseas regions are Guadeloupe, French Guyana, Martinique, Reunion Island, Mayotte, Saint-Martin, The Azores, Madeira, the Canary Islands.

Categories: FLOSS Project Planets

Mike Driscoll: ANN: ObjectListView3 for wxPython

Planet Python - Tue, 2024-07-23 11:44

ObjectListView is a third-party wxPython widget that wraps the wx.ListCtrl. I have used it for over 10 years in quite a few different GUI applications because it works much nicer than wx.ListCtrl does. Unfortunately, ObjectListView was never integrated into wxPython core like some other amazing third-party packages were, and so it has become broken over the past couple of years such that you can’t use it with the latest version of Python / wxPython.

So, I decided to fork the project, as its defects were simple enough that I could resolve them quickly. The new version of ObjectListView is now called ObjectListView3.

You can get the new version of ObjectListview here:

Note that this version of ObjectListView works with Python 3.11+ and wxPython 4.2+. It may work with earlier versions as well.

Installation

If you’d like to install ObjectListView3, you can use Python’s pip to do so like this:

python -m pip install ObjectListView3

Now let’s see how an example of using ObjectListView!

Sample Usage

The following is an application that starts out by listing two books in an ObjectListView3 widget. When you press the “Update OLV” button, it will add three more books to the ObjectListView3 widget.

This demonstrates how to create the ObjectListview3 widget and update it after the application is running:

import wx from ObjectListView3 import ObjectListView, ColumnDefn class Book(object): """ Model of the Book object Contains the following attributes: 'ISBN', 'Author', 'Manufacturer', 'Title' """ def __init__(self, title, author, isbn, mfg): self.isbn = isbn self.author = author self.mfg = mfg self.title = title class MainPanel(wx.Panel): def __init__(self, parent): super().__init__(parent=parent, id=wx.ID_ANY) self.products = [ Book("wxPython in Action", "Robin Dunn", "1932394621", "Manning"), Book("Hello World", "Warren and Carter Sande", "1933988495", "Manning"), ] self.dataOlv = ObjectListView( self, wx.ID_ANY, style=wx.LC_REPORT | wx.SUNKEN_BORDER ) self.setBooks() # Allow the cell values to be edited when double-clicked self.dataOlv.cellEditMode = ObjectListView.CELLEDIT_SINGLECLICK # create an update button updateBtn = wx.Button(self, wx.ID_ANY, "Update OLV") updateBtn.Bind(wx.EVT_BUTTON, self.updateControl) # Create some sizers mainSizer = wx.BoxSizer(wx.VERTICAL) mainSizer.Add(self.dataOlv, 1, wx.ALL | wx.EXPAND, 5) mainSizer.Add(updateBtn, 0, wx.ALL | wx.CENTER, 5) self.SetSizer(mainSizer) def updateControl(self, event): """ Update the ObjectListView """ product_dict = [ { "title": "Core Python Programming", "author": "Wesley Chun", "isbn": "0132269937", "mfg": "Prentice Hall", }, { "title": "Python Programming for the Absolute Beginner", "author": "Michael Dawson", "isbn": "1598631128", "mfg": "Course Technology", }, { "title": "Learning Python", "author": "Mark Lutz", "isbn": "0596513984", "mfg": "O'Reilly", }, ] data = self.products + product_dict self.dataOlv.SetObjects(data) def setBooks(self, data=None): self.dataOlv.SetColumns( [ ColumnDefn("Title", "left", 220, "title"), ColumnDefn("Author", "left", 200, "author"), ColumnDefn("ISBN", "right", 100, "isbn"), ColumnDefn("Mfg", "left", 180, "mfg"), ] ) self.dataOlv.SetObjects(self.products) class MainFrame(wx.Frame): def __init__(self): wx.Frame.__init__( self, parent=None, id=wx.ID_ANY, title="ObjectListView Demo", size=(800, 600), ) panel = MainPanel(self) class OLVDemoApp(wx.App): def __init__(self, redirect=False, filename=None): super().__init__(redirect, filename) def OnInit(self): # create frame here frame = MainFrame() frame.Show() return True def main(): """ Run the demo """ app = OLVDemoApp() app.MainLoop() if __name__ == "__main__": main()

When you initially run this code, you will see the following application:

When you press the “Update OLV” button, the application will update to look like the following:

Wrapping Up

The ObjectListView3 widget makes working with tabular data easy in wxPython. You also get nice editing, sorting and more from this widget via different mixins or styles. Give ObjectListView3 a try when you create your next wxPython GUI application.

The post ANN: ObjectListView3 for wxPython appeared first on Mouse Vs Python.

Categories: FLOSS Project Planets

The Drop Times: Inside Look at DrupalCamp Colorado 2024: What to Expect from the Event

Planet Drupal - Tue, 2024-07-23 11:17
Get exclusive insights from the organizers about DrupalCamp Colorado 2024. Learn about keynote speakers, session highlights, venue details, networking opportunities, and the vital role of sponsors and volunteers.
Categories: FLOSS Project Planets

Real Python: pandas GroupBy: Grouping Real World Data in Python

Planet Python - Tue, 2024-07-23 10:00

Whether you’ve just started working with pandas and want to master one of its core capabilities, or you’re looking to fill in some gaps in your understanding about .groupby(), this course will help you to break down and visualize a pandas GroupBy operation from start to finish.

This course is meant to complement the official pandas documentation and the pandas Cookbook, where there are self-contained, bite-sized examples. Here, however, you’ll focus on three more involved walkthroughs that use real-world datasets.

In this course, you’ll cover:

  • How to use pandas GroupBy operations on real-world data
  • How the split-apply-combine chain of operations works
  • How to decompose the split-apply-combine chain into steps
  • How to categorize methods of a pandas GroupBy object based on their intent and result

[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short & sweet Python Trick delivered to your inbox every couple of days. >> Click here to learn more and see examples ]

Categories: FLOSS Project Planets

Sitback Solutions: Making the polyfill.io vulnerability a thing of the past for Drupal

Planet Drupal - Tue, 2024-07-23 06:35
Recently, there has been a flurry of activity as the Drupal community has scrambled to mitigate a vulnerability caused when the company that bought polyfill(.io) started injecting malware into the scripts returned by the service, referred to as a supply-chain attack. If you own or manage a Drupal site and you haven’t heard about this, ... Making the polyfill.io vulnerability a thing of the past for Drupal
Categories: FLOSS Project Planets

Russell Coker: More About Kogan 5120*2160 Monitor

Planet Debian - Tue, 2024-07-23 05:34

On the 18th of May I blogged about my new 5120*2160 monitor [1]. One thing I noted was that one Netflix movie had run in an aspect ratio that used all space on the monitor. I still don’t know if the movie in question was cropped in a letterbox manner but other Netflix shows in “full screen” mode don’t extend to both edges. Also one movie I downloaded as in 3840*1608 resolution which is almost exactly the same aspect ratio as my monitor. I wonder if some company is using 5120*2160 screens for TVs, 4K and FullHD are rumoured to be cheaper than most other resolutions partly due to TV technology being used for monitors. There is the Anamorphic Format of between 2.35:1 and 2.40:1 [2] which is a close match for the 2.37:1 of my new monitor.

I tried out the HDMI audio on a Dell laptop and my Thinkpad Yoga Gen3 and found it to be of poor quality, it seemed limited to 2560*1440, at this time I’m not sure how much of the fault is due to the laptops and how much is due to the monitor. The monitor docs state that it needs HDMI version 2.1 which was released in 2017 and my Thinkpad Yoga Gen3 was released in 2018 so probably doesn’t have that. The HDMI cable in question did 4K resolution on my previous monitor so it should all work at a minimum of 4K resolution.

The switching between inputs is a problem. If I switch between DisplayPort for my PC and HDMI for a laptop the monitor will usually timeout before the laptop establishes a connection and then switch back to the DisplayPort input. So far I have had to physically disconnect the input source I don’t want to use. The DisplayPort switch that I’ve used doesn’t seem designed to work with resolutions higher than 4K.

I’ve bought a new USB-C dock which is described as doing 8K which means that as my Thinkpad is described as supporting 5120×2880@60Hz over USB-C I should be able to get 5120*2160 without any problems, however for unknown reasons I only get 4K. For work I’m using a Dell Latitude 7400 2in1 that’s apparently only capable of 4096*2304 @24 Hz which is less pixels than 5120*2160 and it will also only do 4K resolution. But for both those cases it’s still a significant improvement over 2560*1440. I tested with a Dell Latitude 7440 which gave the full 5120*2160 resolution, I was unable to find specs on what the maximum resolution of the 7440 is. I also have bought DisplayPort switch rated at 8K resolution. I got a switch that doesn’t also do USB because the ones that do 8K resolution and USB are about $70. The only KVM switch I saw for 8K resolution at a reasonable price was one designed for switching between two laptops and there doesn’t seem to be any adaptors to convert from regular DisplayPort to USB-C alternative mode so that wasn’t viable. Currently I have the old KVM switch used for USB only (for keyboard and mouse) and the new switch which only does DisplayPort. So I have two buttons to push when switching between input sources which isn’t too bad.

It seems that for PCs resolutions with more pixels than 4K are as difficult and inconvenient now as 4K was 6 years ago when I started doing it. If you want higher than 4K resolution to just work at this time then you need Apple hardware.

The monitor has a series of modes for different types of output, I’ve found “standard” to be good for text and “movie” to be good for watching movies/TV and for playing RTS games. I previously wrote about how to use ddcutil to use a monitor as a KVM switch [3], unfortunately I can’t do this with the new monitor as the time that the monitor waits for a good signal on a new input after changing is shorter than the time taken for Linux on the laptops I’m using to enable HDMI output. I’ve found the following commands to do the basics.

# get display mode ddcutil getvcp DC # set standard mode ddcutil setvcp DC 0 # set movie mode ddcutil setvcp DC 03

Now that I have that going the next thing I want to do is to have it switch between “standard” and “movie” modes when I switch keyboard focus.

Related posts:

  1. Kogan 5120*2160 40″ Monitor I’ve just got a new Kogan 5120*2160 40″ curved monitor....
  2. Dell 32″ 4K Monitor and DisplayPort Switch After determining that the Philips 43″ monitor was too large...
  3. DDC as a KVM Switch With the recent resurgence in Covid19 I’ve been working from...
Categories: FLOSS Project Planets

DrupalEasy: Getting ready to run your first migration

Planet Drupal - Tue, 2024-07-23 05:29

Migrating content into Drupal is an extremely useful skill for most Drupal developers. Often, the most difficult step in learning to do migrations is the first one - that of getting everything set up and running your first migration to ensure that everything is working as expected.

Most Drupal migration-related blog posts and documentation that I've seen either completely ignore the setup process or gloss over it before diving into the details of writing migrations. I like to ensure, both here, and when working with participants in our Professional Module Development course, that we ensure a solid understanding of this process to build not only skills, but confidence.

This blog post will explain how to set up and run your first (very simple) Drupal migration. The process I will outline is actually the same steps I do when beginning to write a custom migration - just to make sure I have everything "hooked up" properly before I start getting into the more complex aspects of the project.

I generally write migrations on my local machine, using DDEV as the local development environment. 

Configuration migrations vs. Plugin migrations

When creating a custom migration, one of the initial decisions to be made is whether you'll write the migrations as plugins or configuration entities. I've always used configuration entities, but there are pros and cons to both approaches. Here, we will focus on configuration entity migrations.

There are some minor differences in the workflow presented below when using plugin migrations. For more information on the differences, I recommend Mauricio Dinarte's article

Core and contrib modules used

If you're planning on following along with this article, the following modules should be installed and enabled:

Drupal core: 

  • Migrate
  • Migrate Drupal

Contrib: 

Source database

This blog post will demonstrate importing a small portion of user data from a Drupal 7 site into a Drupal 10 site. Normally, the first step is setting up the source data: in this case a Drupal 7 database. I normally create a new d7 database on the same MariaDB server as the Drupal 10 site (using DDEV, this is quite easy) and then import the Drupal 7 database into it.

Next, we have to tell the Drupal 10 site about the d7 source database. This can be done by adding the following database connection array to the bottom of your settings.local.php file (which I know you're using!):

$databases['migrate']['default'] = array(  'driver' => 'mysql',  'database' => 'd7',  'username' => 'db',  'password' => 'db',  'host' => 'db',  'port' => 3306,  'prefix' => '', );

Note the database key is migrate and the database name is d7. Everything else is identical to the regular Drupal 10 database credentials in DDEV. If you're using Lando or another local development environment, then your database connection array may be different. 

Custom migration module

Next, we need a custom module to house our migration. The easiest way to create one is via Drush's generate command:

$ drush generate module Welcome to module generator! –––––––––––––––––––––––––––––– Module name: ➤ My d7 migration Module machine name [my_d7_migration]: ➤ Module description: ➤ Migrations from Drupal 7 site. Package [Custom]: ➤           Dependencies (comma separated): ➤ migrate, migrate_drupal, migrate_plus Would you like to create module file? [No]: ➤ Would you like to create install file? [No]: ➤ Would you like to create README.md file? [No]: ➤ The following directories and files have been created or updated: ––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––– • /var/www/html/web/modules/custom/my_d7_migration/my_d7_migration.info.yml

Once created, go ahead and enable the module as well:

$ drush en my_d7_migrationMigration group configuration

As this blog post will be writing migrations as configuration entities, create a new config/install directory in your new module. 

We'll define a migration group to which all of our migrations will belong - this is what connects each migration to the source d7 database. Create a new migrate_plus.migration_group.my_group.yml file in the new config/install directory with the following contents:

id: my_d7_migration label: My Drupal 7 migration. description: Content from Drupal 7 site. source_type: Source Drupal 7 site shared_configuration:  source:    key: migrate  migration_tags:    - Drupal 7    - my_d7_migration

The most important bit of this configuration is the source key of migrate; this links up this migration group with the d7 database, with the migrate key we previously configured. Then, any migration created that is in this group automatically has access to the source d7 database.

Simple sample migration configuration

Next, let's look at a super simple example migration for user entities. This will not be a complete user migration, but rather just enough to migrate something. Many migration blog posts, documentation pages and other sources provide guidance and examples for writing migration configuration files (remember, this blog post is focused on all of the configuration and mechanics that normally aren't covered in other places.) 

Here's the user migration configuration we'll use. Create a new /config/install/migrate_plus.migration.user.yml file in your custom module with the following contents:

id: user label: Migrate D7 users. migration_group: my_d7_migration source:  plugin: d7_user process:  name: name  pass: pass  mail: mail  created: created  access: access  login: login  status: status  timezone: timezone destination:  plugin: entity:user

Reputable Drupal migration articles and documentation will explain that migrations need a source (extraction,) some processing (transform,) and a destination (where to load the data.) Often these three concepts will be called ETL. Each of these concepts are easy to spot in our sample configuration file:

  • The data is coming from the d7_user plugin (provided by Drupal core with the data source being that of the my_d7_migration group which we configured in a previous step.) 
  • The processing of the data in this simple migration is just field mapping (tofrom.) Many migration configurations have transformations as part of this section, often provided by Drupal process plugins
  • The destination is Drupal user entities. 
Running the migration

Again, these instructions are specific to Drupal migration configurations when created as configuration entities. Instructions for migration configuration written as plugins are slightly different (and not covered in this article.) 

As we are dealing with configuration entities, they must be imported into the active configuration store - which, by default, is the Drupal database. This is easily accomplished with the drush cim --partial command. This must be run each and every time a migration configuration file is modified. This is one of the (few, in my opinion) downsides of writing migrations as configurations. 

Next, I often check the status of migration via the drush migrate:status command. When using the Migrate Drupal module, it is recommended to always use the --group option otherwise the output of migrate:status can get a bit messy (due to all the default migrations that will be displayed.) 

The drush migrate:import and migrate:rollback commands should be self-explanatory. Each can be used with either the --group option or with a migration name (as shown below.) I almost always use the --update option on migrate:import for updating previously imported data. 

Finally, keep the drush migrate:reset command in your back pocket when writing custom migrations. If the migration crashes, you'll need to use this to reset its status from processing to idle in order to run it again. 

Here's a full set of the command specific to the sample user migration, migration group, and custom module created in this article:

$ drush cim --partial --source=modules/custom/my_d7_migration/config/install $ drush migrate:status --group=whatever $ drush migrate:import user --update $ drush migrate:reset user $ drush migrate:rollback userWhat's next?

What I've presented in this article is 90% of what I regularly use when running migrations. Sure, there are a few edge cases where oddities occur, but I believe this is a solid base of knowledge to start with. 

Once all this makes sense, I encourage you to utilize other blog posts and documentation to extend the user migration we started, or write new ones based on other resources. Once you're comfortable writing additional migrations, learning how to create your own process plugins is the natural next step. As process plugins are written as PHP classes, some knowledge of module development is necessary. 

Interested in learning more about Drupal module development? Check out DrupalEasy's 15-week Professional Module Development course

Additional resources

Lead image generated by OpenAI.

Categories: FLOSS Project Planets

Python Bytes: #393 Dare enter the Bash dungeon?

Planet Python - Tue, 2024-07-23 04:00
<strong>Topics covered in this episode:</strong><br> <ul> <li><a href="https://marimo.io"><strong>Marimo:</strong></a><a href="https://marimo.io"> </a><a href="https://marimo.io"><strong>“Future</strong></a><a href="https://marimo.io"> <strong>of Notebooks”</strong></a></li> <li><a href="https://docs.pytest.org/en/stable/changelog.html#pytest-8-3-1-2024-07-20"><strong>pytest 8.3.0 &amp; 8.3.1 are out</strong></a></li> <li><a href="https://pyfound.blogspot.com/2024/06/python-language-summit-2024.html"><strong>Python Language Summit 2024</strong></a></li> <li><a href="https://github.com/wolandark/bash-dungeon/"><strong>bash-dungeon</strong></a></li> <li><strong>Extras</strong></li> <li><strong>Joke</strong></li> </ul><a href='https://www.youtube.com/watch?v=pwTJpSvrGls' style='font-weight: bold;'data-umami-event="Livestream-Past" data-umami-event-episode="393">Watch on YouTube</a><br> <p><strong>About the show</strong></p> <p>Sponsored by us! Support our work through:</p> <ul> <li>Our <a href="https://training.talkpython.fm/"><strong>courses at Talk Python Training</strong></a></li> <li><a href="https://courses.pythontest.com/p/the-complete-pytest-course"><strong>The Complete pytest Course</strong></a></li> <li><a href="https://www.patreon.com/pythonbytes"><strong>Patreon Supporters</strong></a></li> </ul> <p><strong>Connect with the hosts</strong></p> <ul> <li>Michael: <a href="https://fosstodon.org/@mkennedy"><strong>@mkennedy@fosstodon.org</strong></a></li> <li>Brian: <a href="https://fosstodon.org/@brianokken"><strong>@brianokken@fosstodon.org</strong></a></li> <li>Show: <a href="https://fosstodon.org/@pythonbytes"><strong>@pythonbytes@fosstodon.org</strong></a></li> </ul> <p>Join us on YouTube at <a href="https://pythonbytes.fm/stream/live"><strong>pythonbytes.fm/live</strong></a> to be part of the audience. Usually Tuesdays at 10am PT. Older video versions available there too.</p> <p>Finally, if you want an artisanal, hand-crafted digest of every week of the show notes in email form? Add your name and email to <a href="https://pythonbytes.fm/friends-of-the-show">our friends of the show list</a>, we'll never share it.</p> <p><strong>Michael #1:</strong> <a href="https://marimo.io"><strong>Marimo:</strong></a><a href="https://marimo.io"> </a><a href="https://marimo.io"><strong>“Future</strong></a><a href="https://marimo.io"> <strong>of Notebooks”</strong></a></p> <ul> <li>via Matt Wilkie</li> <li>An <strong>open-source</strong> reactive notebook for Python</li> <li>Run one cell and marimo reacts by <strong>automatically running affected cells</strong>, eliminating the error-prone chore of managing notebook state.</li> <li>Marimo's reactive <strong>UI elements</strong>, like dataframe GUIs and plots, make working with data feel refreshingly fast, futuristic, and intuitive.</li> <li>Rapidly experiment with code and models</li> <li>Bind UI elements to Python values</li> <li>Pick-up-and-play design, with depth for power users</li> <li>See <a href="https://docs.marimo.io/faq.html">the FAQ</a></li> </ul> <p><strong>Brian #2:</strong> <a href="https://docs.pytest.org/en/stable/changelog.html#pytest-8-3-1-2024-07-20"><strong>pytest 8.3.0 &amp; 8.3.1 are out</strong></a></p> <ul> <li>Real excited to get --xfail-tb flag added <ul> <li>This detaches xfail tracebacks from -rx/-ra (which was how it was pre-8.0)</li> </ul></li> <li>Keyword matching for marker expressions, that’s fun. <ul> <li>pytest -v -m "device(serial='123')"</li> </ul></li> <li>--no-fold-skipped allows for explit reporting of names of skipped tests</li> <li>Plus many more improvements, bug fixes, and doc improvements</li> </ul> <p><strong>Michael #3:</strong> <a href="https://pyfound.blogspot.com/2024/06/python-language-summit-2024.html"><strong>Python Language Summit 2024</strong></a></p> <ul> <li><a href="https://pyfound.blogspot.com/2024/06/python-language-summit-2024-should-python-adopt-calver.html">Should Python adopt Calendar Versioning?</a>: talk by Hugo van Kemenade</li> <li><a href="https://pyfound.blogspot.com/2024/06/python-language-summit-2024-python-security-model-after-xz.html">Python's security model after the xz-utils backdoor</a>: talk by Pablo Galindo Salgado</li> <li><a href="https://pyfound.blogspot.com/2024/06/python-language-summit-2024-c-api.html">Native Interface and Limited C API</a>: talks by Petr Viktorin and Victor Stinner</li> <li><a href="https://pyfound.blogspot.com/2024/06/python-language-summit-2024-free-threading-ecosystems.html">Free-threading ecosystems</a>: talk by Daniele Parmeggiani</li> <li><a href="https://pyfound.blogspot.com/2024/06/python-language-summit-2024-python-on-mobile.html">Python on Mobile</a>: talk by Malcolm Smith</li> <li><a href="https://pyfound.blogspot.com/2024/06/python-language-summit-2024-pyrepl-new-default-repl-for-python.html">PyREPL</a><a href="https://pyfound.blogspot.com/2024/06/python-language-summit-2024-pyrepl-new-default-repl-for-python.html"> </a><a href="https://pyfound.blogspot.com/2024/06/python-language-summit-2024-pyrepl-new-default-repl-for-python.html">--</a><a href="https://pyfound.blogspot.com/2024/06/python-language-summit-2024-pyrepl-new-default-repl-for-python.html"> New default REPL written in Python</a>: talk by Pablo Galindo Salgado, Łukasz Langa, and Lysandros Nikolaou</li> <li><a href="https://pyfound.blogspot.com/2024/06/python-language-summit-2024-pyrepl-new-pdb.html">Should we make pdb better?</a>: talk by Tian Gao</li> <li><a href="https://pyfound.blogspot.com/2024/06/python-language-summit-2024-limiting-yield-in-async-generators.html">Limiting yield in async generators</a>: talk by Zac Hatfield-Dodds</li> <li><a href="https://pyfound.blogspot.com/2024/06/python-language-summit-2024-annotations-as-transforms.html">Annotations as Transforms</a>: talk by Jason R. Coombs</li> <li><a href="https://pyfound.blogspot.com/2024/06/python-language-summit-2024-lightning-talks.html">Lightning Talks</a>, featuring talks by Petr Viktorin, David Hewitt, Emily Morehouse, Łukasz Langa, Pablo Galindo Salgado, and Yury Selivanov</li> </ul> <p><strong>Brian #4:</strong> <a href="https://github.com/wolandark/bash-dungeon/"><strong>bash-dungeon</strong></a></p> <ul> <li>“<em>This game is intended to teach new users how to use their shell in a fun and interactive way.”</em></li> <li>Just clone the repo and start exploring with cd, ls, and cat.</li> <li>First moves <ul> <li>cd bash-dungeon</li> <li>ls</li> <li>cd Enter</li> <li>ls</li> <li>cat parchment</li> </ul></li> <li>A fun way to learn some commands you might need and/or might have forgotten about.</li> </ul> <p><strong>Extras</strong> </p> <p>Brian:</p> <ul> <li><a href="https://discuss.python.org/t/python-3-13-0b4-now-available/58565">Python 3.12.0b4, final beta, is out</a></li> <li>If hanging out on discuss.python.org, please checkout <ul> <li><a href="https://discuss.python.org/guidelines/">Community Guidelines</a></li> </ul></li> <li>And if it’s still not clear why we need these, check out <ul> <li><a href="https://discuss.python.org/t/inclusive-communications-expectations-in-python-spaces/57950">Inclusive communications expectations in Python spaces</a></li> </ul></li> <li>Google Chrome news</li> </ul> <p>Michael:</p> <ul> <li><a href="https://fosstodon.org/@ddsmit/112793568816585948">PySimpleGUI goes commercial with obfuscated</a><a href="https://fosstodon.org/@ddsmit/112793568816585948"> </a><a href="https://fosstodon.org/@ddsmit/112793568816585948">“source</a><a href="https://fosstodon.org/@ddsmit/112793568816585948"> open”?</a></li> <li>Still have seats for <a href="https://talkpython.fm/castle">Code in a Castle event</a></li> <li><a href="https://training.talkpython.fm/courses/reactive-web-dashboards-with-shiny-for-data-science">Reactive Dashboards with Shiny for Python free course</a></li> </ul> <p><strong>Joke:</strong> </p> <ul> <li><a href="https://www.smbc-comics.com/comic/investment-2?utm_source=pocket_saves">40 Million in in Series A Funding</a> - may be a lot of reading, but I found it funny <ul> <li>Thanks to VM Brasseur for sharing this one.</li> </ul></li> <li>Also a few from <a href="https://pypi.org/project/pyjokes/0.7.2/#history">pyjokes 0.7.2</a> (first new version since 2019) <ul> <li>If at first you don't succeed, call it version 1.0.</li> <li>A product manager walks into a bar, asks for drink. Bartender says no, but will consider adding later.</li> <li>Triumphantly, Beth removed Python 2.7 from her server in 2030. 'Finally!' she said with glee, only to see the announcement for Python 4.4.1 <ul> <li>Although, if <a href="https://peps.python.org/pep-2026/">CalVer, PEP 2026</a>, happens, that’ll just be Python 3.30.0.</li> </ul></li> </ul></li> </ul>
Categories: FLOSS Project Planets

Golems GABB: Best SEO Practices for Drupal Websites in 2024

Planet Drupal - Tue, 2024-07-23 03:10
Best SEO Practices for Drupal Websites in 2024 Editor Tue, 07/23/2024 - 10:10

If you are enthusiastic about Best SEO Practices for Drupal Websites in 2024 and want to grow your website traffic, you are just in the right place! Drupal is like a wise friend on the web who helps you complete tasks quickly without understanding many programming details. Also, it has some cool tricks that make your website both Google-friendly and user-friendly. And here we go, deeper into optimizing your SEO for Drupal!

Drupal SEO Checklist in 2024

All right, let's make a rough Drupal SEO checklist.

Categories: FLOSS Project Planets

Specbee: Top 8 Drupal modules that can improve user engagement

Planet Drupal - Tue, 2024-07-23 02:33
An engaging website is like a great party host who makes everyone feel welcome and ensures they have such a fantastic time that they never want to leave. Who are these engaged users? They’re your future loyal customers, your content’s biggest fans, and the ones most likely to convert into paying customers. Keeping your content fresh and relevant is one of the best things you can do to maintain user engagement on your website, but a CMS like Drupal offers so much more than just that. From creating personalized experiences to integrating interactive elements, Drupal empowers you to build a dynamic, engaging website that keeps users coming back for more. In this blog, I’ll explore the benefits of creating an engaging website for your business and introduce 8 fantastic Drupal modules that can boost user engagement. Let’s get started! Why is user engagement important anyway Profitable B2B, B2C, or SaaS companies use effective user engagement as one of their KPIs to demonstrate the value they’re offering to their customers through their services. Engagement is crucial to achieving all marketing goals if you want to boost your website traffic, establish brand awareness, or launch social media campaigns. Driving higher user engagement draws substantial benefits for your business.  You get sustained audience attention Build stronger emotional bonds with customers Increase in repeated customers gradually Brand advocacy from loyal customers Shortened sales cycles You can track your user engagement using various user engagement metrics such as customer base growth, average customer value, and churn rate. Your users engage with your business via social media, your company website, and product or service purchases. Here are some common metrics that help measure user engagement: Page/scroll depth Page views Conversions Time spent on the page/site Pages per session Bounce rate And more… How can you improve user engagement With advanced technology and a rise in user expectations, it is only essential to refine websites for optimized user experiences. To begin with, here’s what you can do to improve user engagement: Identify and cater to your target audience: Understand your target audience and customize your content to meet their expectations and preferences. Implement a design that adapts to various devices: Build a responsive website that is adaptable to various devices whether laptop, desktop, mobile, or tablet. It helps deliver a seamless experience with a responsive design and optimum website functionality. Ensure easy-to-use navigation: Develop an intuitive web design, easy to navigate, providing users with what they look for with clear menus and search functionality. Utilize personalized content and experiences: Craft your content, recommendations, and CTAs based on user preferences, behavior, and demographics. Incorporate interactive features and social media integration: Analyze user behavior and gather feedback by implementing interactive elements like forms, surveys, quizzes, polls, etc. Integrate social media buttons on your website for social engagement and brand awareness. Optimize page load time: Reduce bounce rates with the help of leveraging caching, optimized images, compressing files, utilizing CDNs, etc., to optimize page load times for an enhanced user experience. Top 8 Drupal modules to boost user engagement There can be pretty small yet essential elements that can contribute to boosting user engagement, meeting user preferences, and generating valuable statistics. Drupal’s active community continuously develops innovative modules and themes to boost engagement. I have gathered a list of 8 Drupal modules that you can use to build user engagement through your website. 1. Webform Image source: Drupal .org The Webform module is one of the most important Drupal modules that bridges the gap between you and your audience. It helps engage your audience, gather insights about their preferences, maintain interaction with your regular customers, track marketing analytics, and offer assistance as and when required. This module allows you to collect data in any form that is submitted to the application or system. These forms are customizable based on any behavior or aspect. Whether you need a form with multiple pages or multiple columns with conditional logic or a simple, basic form that pushes data to Salesforce/CRM, the Webform module makes it all possible. Users can enter their data through these forms - contact forms, feedback forms, job applications, support requests, subscription forms, surveys, appointment forms, and other types of forms as required for your business and marketing goals. Webforms feature text fields, checkboxes, select menus, radio buttons, and more. Administrators can enhance their features using placeholders for required data formats, autocomplete options, and relevant text to improve user-friendliness. Drupal’s webforms adhere to specific web accessibility standards that ensure seamless functionality even for differently-abled individuals. This includes clear labels, easily associated form validation, and keyboard accessibility. Take a deeper dive into the Webform module in this article. 2. Flag You might dog-ear pages of a novel to mark where you left off or use bookmarks to keep track. The Flag module in Drupal offers similar functionality. It’s an adaptable flagging system, fully customizable by administrators. Admins can create numerous flags for nodes, comments, users, and additional entities. Any website featuring user-generated content may require monitoring for spam and adherence to submission guidelines. The Flag Drupal module allows users to mark (or bookmark) content for future reference. Users have the ability to “Add to wishlist,” “Mark as inappropriate,” “Add to bookmarks,” or “Flag as helpful,” as part of this module’s functionalities. Flags can be either per-user, letting individuals mark items independently, or global, meaning any user’s action affects everyone. This flexibility allows additional flags (similar to published or sticky) to be applied to nodes or other elements, managed according to admin preferences. Additionally, the module’s integration with Views allows you to build custom lists of popular content or monitor key items. 3. Poll Image source: Drupal .org Just like you can vote your opinion on Instagram stories and posts nowadays, the Poll module in Drupal enables users to vote among multiple choices. You can create and manage multiple polls. These polls can be customized among options such as anonymous voting, setting voting requirements, or toggling open/closed status. Administrators can create a block that highlights the most recent poll. Additionally, this module can also be integrated with Views, so admins can create their own blocks and pages. The best thing about these polls is that they are multilingual. Users in any part of the globe can choose their preferences in their respective languages. 4. Node Read Time Image source: Drupal .org Time is precious and you’d like your time to be respected. Many websites understand this sentiment and value their readers’ precious time. When you read a blog on such websites, you may have noticed at the top of the blog that it mentions the time required to read that particular blog. The Node Read Time module in Drupal is behind this feature of Drupal websites. The Node Read Time module allows admins to add an extra field of content types to showcase the time taken for users to read a node. This field considers all text fields in the content type and entity version revision fields like Paragraphs and Custom Blocks. Additionally, the configuration page of this module allows you to enable the reading time field for specific content types. You can also set the “words per minute” value for your users to calculate the reading time. Users usually get to view the time in minutes or minutes and seconds. 5. Like/Dislike Image source: Drupal .org If you want to understand how your readers perceive your blogs, this module can help. The Like/Dislike Drupal module allows you to implement a customizable like and dislike widget anywhere on your site. With the help of the Voting API, the module securely stores, retrieves, and tallies user votes. You can easily configure its settings through a dedicated page to specify which content types or entities the widget should apply to. Users can simply hit the like or dislike button on the page to express their approval or disapproval of your site content. However, be mindful of the fact that only authenticated users can engage with the like or dislike option. Anonymous users are required to log in or register to cast their vote. 6. Commerce Wishlist When we shop online, we mostly tend to “Add to Wishlist” to save our preferences for a later buying decision. The Commerce Wishlist module in Drupal offers such Wishlist functionality. This module is specifically developed for e-commerce websites. With the help of this module, admins can create a dedicated wishlist page, along with a customizable block. Its integration with the Views module makes it easier for straightforward customization. With the help of this module, admins can add an “Add to Wishlist” button on every product display node. You can also generate a customizable list using Views to showcase all Wishlist products. Users can effortlessly remove or transfer Wishlist items to their Shopping Cart with a simple click. 7. Quiz Image source: Drupal .org Have you ever participated in a quiz tournament? While this quiz isn’t related to that one, they do share a common trait. But if you look at it this way, the tournament brings into the limelight the winner who knew the highest number of answers to the questions. It highlights their knowledge of different subjects/topics. The Quiz module in Drupal gathers insights from users with the help of graded assessments that consist of a series of questions. These responses are then stored in the database. The scores and results of these quizzes are displayed during or after completion. Admins can use its intuitive drag-and-drop interface to order the questions (and answers) and pages. Admins can also customize the number of questions on every page. Additionally, the module allows dummy Quiz generation, along with Question and Result data with Devel. The questions can also be randomized where multiple attempts are allowed per user. Admins have the option to provide feedback manually or automatically. Here are the versatile application options of the Quiz module: Integration into larger Learning Management Systems (LMS) or as a supplementary classroom activity Standalone functionality supporting multimedia-rich content in questions and answers Adaptive mode for self-paced learning with multiple attempts Training programs allowing iterative improvement attempts 8. Advanced Content Feedback (Admin Feedback) Image source: Drupal .org Last on my list is a crucial Drupal module that is most helpful in gathering insights about your site’s content. To understand if you’re providing relevant content for your users, you need to be mindful of their preferences. Feedback is a traditional yet proven and useful approach to gathering insights into your users’ preferences. The Admin Feedback module in Drupal allows users to submit feedback on content (nodes) via AJAX requests and ensures a seamless user experience without redirects. The insights from this feedback are then monitored, analyzed, and inspected by administrators from the dashboard. This module facilitates direct improvements based on client feedback gathered via FAQ or help pages seeking user input to enhance content quality. It includes a permission system to control feedback submission and analysis by specific roles. Admins work via two significant features of the Admin Feedback module for its optimum purpose: Feedback Block - This feature offers a customizable form on various content types for users to provide positive or negative feedback backed with optional messages. Content Feedback Dashboard - Accessible at /admin/content/feedback, this dashboard displays all user feedback with permissions to manage access. It offers two views: Summary View and Detail View. Other Drupal Modules that promote user engagement Apart from the previously mentioned modules, here are a few additional Drupal modules that help improve engagement of your Drupal site: Simple Feedback Survey: This module is an alternative to survey forms to collect data from users visiting your site. Website Feedback: This module allows users (with permission) to submit feedback comments along with a screenshot of the page. Reviews: This module allows authenticated users to submit their reviews about the site content.  Social Media Share: As the name suggests, this module allows users to share the current site page to various social media platforms like Twitter (X), Facebook, LinkedIn, WhatsApp, Pinterest, and email. Social Auth Google: This module allows users to register and log in to a Drupal website via their Google account. Final Thoughts Your website is the face of your brand, and users are drawn to businesses that offer a seamless experience, engaging them with interactive features and personalized content. Drupal is an excellent tool for achieving just that. If you’re looking for a reliable Drupal development company to help improve your user engagement with your Drupal website, let’s make it happen together! Contact us today to get started!
Categories: FLOSS Project Planets

Building and Running QML Android Applications

Planet KDE - Mon, 2024-07-22 20:00
Building QML Android Applications

Qt Creator uses Gradle for project building. Once your project code is ready, select the Android kit for building in Qt Creator. Click build, and Qt Creator will generate Gradle configuration files for you. However, you may encounter errors such as:

Execution failed for task ':processDebugResources'. A failure occurred while executing com.android.build.gradle.internal.res.LinkApplicationAndroidResourcesTask$TaskAction Android resource linking failed aapt2 E 07-23 15:59:44 51907 51907 LoadedArsc.cpp:94] RES_TABLE_TYPE_TYPE entry offsets overlap actual entry data. aapt2 E 07-23 15:59:44 51907 51907 ApkAssets.cpp:149] Failed to load resources table in APK '/home/zhy/Android/Sdk/platforms/android-35/android.jar'.

This is because the current Gradle plugin version does not support android-35. SeeHow to fix "Execution failed for task ':app:processDebugResources'. > Android resource linking failed"[Android/Flutter] - Stack Overflow

To resolve this issue, you need to modify the Gradle configuration.

Navigate to the /build/Qt_6_7_2_Clang_arm64_v8a-Debug/android-build folder in your project.

Open the build.gradle file and locate the dependencies block:

dependencies { classpath 'com.android.tools.build:gradle:7.4.1' }

com.android.tools.build:gradle:7.4.1 refers to the Android Gradle Plugin (AGP). This default version is from 2022 and is quite outdated.

You can find the latest version here: Maven Repository: com.android.tools.build » gradle

Update the plugin version to a newer one, for example:

dependencies { classpath 'com.android.tools.build:gradle:8.4.1' }

Additionally, when upgrading the plugin version, ensure compatibility with the Gradle version.

Check the relationship between the Gradle and AGP versions here: Android Gradle plugin 8.5 release notes | Android Studio | Android Developers

Reference: Could not find com.android.tools.build:gradle:7.3.3. error found in build.gradle file - Stack Overflow

Therefore, you should use at least Gradle version 8.6 to support this plugin.

Navigate to the ./gradle/wrapper folder and open the gradle-wrapper.properties file. This file defines the Gradle version used by the project.

Find the line: distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip

Change it to:

distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip

This update specifies that the project will use Gradle version 8.6.

After making these changes, click on build. It will automatically download the specified version of Gradle and then download the necessary Gradle plugins.

If successful, you can find the built APK at ./build/outputs/apk/debug.

Running and Installing APK

In a Linux environment, you can use the adb command to install the APK on your Android device. Alternatively, you can use Qt Creator for one-click deployment.

After connecting your Android device via USB, use the adb command to install the APK:

adb install android-build-debug.apk

Make sure that your Android device has Developer Mode enabled. You can find specific instructions on how to enable Developer Mode based on your device model through an online search.

Categories: FLOSS Project Planets

Christoph Schiessl: How to Serve a Directory of Static Files with FastAPI

Planet Python - Mon, 2024-07-22 20:00
Learn how to serve a static site using FastAPI. Perfect for locally testing statically generated websites, for instance, with `httpie`.
Categories: FLOSS Project Planets

Pages