Skip to main content

the avatar of Klaas Freitag

Kraft Dokumente mit Weasyprint gestalten

Um es deutlicher zu machen, wie mit dem neuen PDF Konverter, der in Kraft Version 0.95 eingeführt wurde, Dokumente gestaltet werden können habe ich ein neues Beispiel-Template in das Kraft Repository gestellt.

Mit diesem Template werden die Posten auf dem PDF in zwei Zeilen ausgegeben: In der ersten Zeile steht der Text, und darunter werden in einer separaten Zeile die Menge, der Einzelpreis und der Gesamtpreis des Posten gedruckt:

Firmen Logo

Außerdem hat das Dokument ein Bild als Firmen-Logo auf der ersten Seite.

Das Template besteht wie die meisten aus zwei Dateien: Das eigentliche Template File (kraft_kfg.gtmpl) und das dazugehörige stylesheet file (kraft_kfg.css).

Um sie zu verwenden, müssen beide Files heruntergeladen werden und im Kraft Einstellungsdialog bei den Dokument Typen das gtmpl File ausgewählt werden. Zu beachten ist, dass der Link zum css File in dem gtmpl File angepasst wird.

Grob gesagt: In dem template file kraft_kfg.gtmpl wird die Dokument-Struktur in html gesetzt, das heisst die Abfolge von Dokumentkopf mit Adressen, dem Einführungstext etc und dann den Posten und so weiter, festgelegt.

Das Stylesheet-File kraft_kfg.css definiert das Aussehen der einzelnen Elemente.

Eine Überschrift

Als grundsätzliches Beispiel sei hier die folgende Zeile herausgegriffen:

<h1>{{ doc.docType }} {{ doc.ident }}</h1>

Die in den geschweiften Klammern stehenden Texte bezeichnen Template-Variablen, die ersetzt werden: doc.docType ist (genau wie doc.ident) ein Wert des Dokumentes, nämlich dessen Dokument-Typ wie Angebot oder Rechnung. doc.ident ist bezeichnet die Dokumentnummer. Es gibt eine feste Anzahl von solchen Variablen, die durch den Kraft-Code festgelegt sind. Es ist hoffentlich durch ihre Verwendung im Template selbsterklärend, was sie bedeuten.

Die beiden Werte werden innerhalb des html tags h1 gedruckt. Das bezeichnet eine Überschrift ersten Grades (die „oberste“ Überschrift), die üblicherweise etwas größer und fett geschrieben wird.

Wie genau die Überschrift in diesem Fall aussehen soll, wird im Stylesheet festgelegt. Dort ist zu finden:

html h1 {
    color: #2f590a;
    font-family: Roboto;
    font-size: 14pt;
    margin: 0;
}

Das bedeutet, dass die Farbe #2f580a verwendet werden soll, und der Text ohne Rand im Font Roboto in der Größe 14 Punkt geschrieben werden soll.

CSS bietet eine große Menge von Gestaltungsmöglichkeiten. Dazu sei auf die zahlreiche Dokuementation im Internet verwiesen.

Meistens wird CSS zur Gestaltung von Webseiten verwendet. Hier wird jedoch ein Druckbild gestaltet. Das ist durch die Zeile, mit dem die Stylesheet Datei geladen wird, festgelegt. Das Attribut media legt den Stylesheet für print Medium fest.

Wie ist das Logo verwirklicht?

Im Template File ist es nur ein HTML Image Tag, das ein Bild von einer URL lädt. Da kann aber auch eine lokale Datei angegeben werden. Dem img Tag die ID „logo“ zugewiesen wird, das es für das CSS identifizierbar macht.

Das Aussehen ist wieder im CSS File festgelegt:

img#logo {
  position: absolute;
  right: 0px;
  top: -150px;
  width: 178px;
  height: 191px;
  z-index: -1;
}

Etwas besonderes ist hier, das das Bild mit einer absoluten Position gesetzt wird. Die Positionsangaben werden in Pixel angegeben. Das Bild wird direkt an den rechten Rand und 150 px von oben (ein positiver Wert würde vom unteren Papierrand aus zählen) auf die Ausgabe gesetzt.

Ich hoffe, dieses Beispiel erleichtert das Anpassen des Templates an die eigenen Bedürfnisse ein wenig. Am besten geht man dabei schrittweise vor und verändert immer nur ein Detail nach dem anderen.

the avatar of Ish Sookun

Microsoft Edge preview for Linux

Microsoft Edge preview for Linux

Last November, Microsoft announced that its Edge browser is coming to Linux in the near future. That day has arrived.

On 20 October 2020, Microsoft released Edge preview builds for Linux and with that Microsoft Edge is now available for all major desktop and mobile platforms.

Microsoft Edge preview for Linux
Microsoft Edge on all major platforms

DEB and RPM packages are available on the Microsoft Edge Insider website. These packages are updated every week.

Hence, to install Microsoft Edge on openSUSE, simply download the .rpm file and use zypper for the installation.

sudo zypper in ~/Downloads/microsoft-edge-dev-88.0.680.1-1.x86_64.rpm

That's it! You should now be able to run Edge on openSUSE. In fact, the above screenshots are from the Edge build version 88.0.680.1 running on openSUSE Tumbleweed.

Microsoft Edge preview for Linux
Microsoft Edge build version 88.0.680.1
the avatar of openSUSE Mauritius

Does Microsoft Edge run on openSUSE Linux?

The short answer is, yes!

Microsoft Edge is a web browser developed by Microsoft. It is based on the open source project Chromium and it aims to be fully cross-platform. It was released in 2015 for Windows 10 and it became available for Android and iOS in 2017. A preview for Linux became available in October 2020.

If you visit the Microsoft Edge website using a browser on a Linux machine at the moment it will display that it is not supported for Linux. In order to download the the preview for Linux, you need to visit the Microsoft Edge Insider page. The preview is available from the Edge Dev Channel which releases weekly updates.

Microsoft Edge for Linux
Microsoft Edge for Linux

You can select to download a .deb or .rpm file according to the Linux distribution you are using. In our case, for our openSUSE desktop machine, be it Leap or Tumbleweed, we are going to download the .rpm file.

The file is approximately 87 MB.

Once the download is complete we can use zypper to install.

sudo zypper in ~/Downloads/microsoft-edge-dev-88.0.680.1-1.x86_64.rpm

The application shortcuts will be created.

At first run, Microsoft Edge goes through a traditional setup of EULA acceptance, privacy notice and configuring the browser appearance.

Microsoft Edge post setup
Microsoft Edge post setup

Edge is now ready to be used on the openSUSE Tumbleweed desktop!

the avatar of Nathan Wolf

a silhouette of a person's head and shoulders, used as a default avatar

Otras novedades de plasma 5.20: notificaciones

Tercera parte de la tradicional serie dedicada a la última actualización del entorno de trabajo de la Comunidad KDE con otras novedades de plasma 5.20 que no son menores y que mejoran la eficacia al trabajar en este entorno de trabajo libre. Bienvenidos a las nuevas notificaciones de Plasma 5.20.

Otras novedades de plasma 5.20: notificaciones

Continuo esta serie de artículo con el vídeo promocional de Plasma 5.20 que ya presenté hace unos días y que me parece sencillamente espectacular, para pasar más abajo a describir las novedades de Plasma 5.20 aportando mi opinión personal.

Como se suele decir, dentro vídeo…

Notificaciones en pantalla

El tema de las notificaciones es una de esas cosas que están en continuo desarrollo, pulíéndose para que sean útiles pero no molestas.

En primer lugar, y creo que más importantes, ahora se recibirá una notificación cuando el sistema esté quedándose sin espacio en disco, incluso si su directorio personal está en otra partición.

Esta funcionalidad es muy importante y nos puede salvar de situaciones comprometidas en las que ni siquiera puede guardar los cambios de un documento porque no dispone de espacio suficiente en el disco duro o directamente el sistema se rompe al no poder generar archivos temporales.

He de confesar que me he visto en esta situación en varias ocasiones, tanto en mis dispositivos como en el de amigos que me han presentado el problemas. A partir de ahora, tenemos una medida preventiva paras que no ocurra.

Por otra parte, se ha cambiado el nombre de la miniaplicación del Notificador de dispositivos a Discos y dispositivos, que ahora es más fácil de usar, ya que permite mostrar todos los discos en lugar de solo los extraíbles.

Otras novedades de plasma 5.20: notificaciones

Seguimos con los cada día más importantes dispositivos de sonido, los cuales se han multiplicado en esta era de las webconferencias. A partir de ahora los que no se usan ya no se muestran de forma predeterminada en la miniaplicación de sonido ni en la correspondiente página de las Preferencias del sistema.

Otras mejoras menores son:

  • Se puede configurar un límite de carga por debajo del 100% para preservar la salud de la batería de los portátiles que lo permitan.
  • Se puede entrar en el modo No molestar con solo hacer clic con el botón central en la miniaplicación de notificaciones o en su icono de la bandeja del sistema.

Más información: KDE

a silhouette of a person's head and shoulders, used as a default avatar

10 trucos para Krita, vídeo de Ramón Miranda

Hoy os traigo una otra obra de Ramón Miranda en que nos explica 10 trucos para Krita con los que podemos ser más efectivos, productivos y más creativos con esta herramienta de dibujo artístico digital.

10 trucos para Krita, vídeo de Ramón Miranda

Lo he encontrado en Youtube y no he podido resistirme a compartirlo con todos vosotros.

Recuerdo bien a Ramón Miranda, al cual tuve el gusto de conocer en la Akademy y Akademy-es de 2013 de Bilbao, y que ya ha aparecido en alguna que otra ocasión en el blog.

En sus propias palabras:

«¡Hola a todos! y bienvenidos a este nuevo video. En este video aprendereis trucos rápidos para pintar más rápido y mejor porque ahorrar tiempo es importante en el trabajo diario.
Espero que os guste. Si quieres apoyar a Krita, suscríbete y disfruta de los próximos videos. Quieres donar
Que tengas un día agradable y creativo.
«

El vídeo tiene subtítulos en inglés para la gente con discapacidad auditiva y está separado en partes ya que los tiempos están en la descripción de Youtube. No obstante, para el que solo quiera ver el vídeo y alucinar un poco lo pongo abajo.

¿Qué es Krita?

Para los que no lo sepan, Krita es el software de pintura digital e ilustración basado en las librerías de la plataforma KDE que antes estaba incluido en Calligra Suite.

10 trucos para Krita, vídeo de Ramón Miranda


A diferencia de otras aplicaciones gráficas, se diseño hace énfasis en la creación de imágenes desde cero, es decir, está especialmente orientado para los artistas gráficos como ilustradores, dibujantes de cómics, etc.
Krita es software libre distribuido bajo la licencia GNU GPL y fue lanzado por primera vez como parte de la versión 1.4.0 de KOffice, el 21 de junio de 2005. (Vía: Wikipedia)

Para ver el funcionamiento de esta aplicación nada mejor que ver un vídeo de Odysseas Stamoglou en la que nos muestra como dibujar una chica futurística con Krita.

a silhouette of a person's head and shoulders, used as a default avatar

#openSUSE Tumbleweed revisión de la semana 44 de 2020

Tumbleweed es una distribución “Rolling Release” de actualización contínua. Aquí puedes estar al tanto de las últimas novedades.

Tumbleweed

openSUSE Tumbleweed es la versión “rolling release” o de actualización continua de la distribución de GNU/Linux openSUSE.

Hagamos un repaso a las novedades que han llegado hasta los repositorios estas semanas.

El anuncio original lo puedes leer en el blog de Dominique Leuenberger, publicado bajo licencia CC-by-sa, en este enlace:

En esta semana 44, ha llegado a los repositorios la actualización del kernel Linux a su versión 5.9.1 y parece que no ha habido problemas.

En total, Tumbleweed ha tenido 5 nuevas snapshots (1023, 1024, 1025, 1026 y 1028) durante esta semana, lo que no está nada mal. Y entre otros paquetes, se han actualizado partes tan importantes como:

  • Freetype 2.10.4
  • sssd 2.4.0
  • Ghostscript 9.59.3
  • Mozilla Firefox 82.0
  • Mozilla Thunderbird 78.4.0
  • Cups 2.3.3
  • Linux kernel 5.9.1
  • GStreamer 1.18.0
  • Ruby 2.6 ha sido completamente eliminado
  • nasm 2.15.05
  • PostgreSQL 13
  • jsoncpp 1.9.4

Pero Tumbleweed no deja de rodar y ya se están preparando actualizaciones de paquetes como estos para próximas snapshots:

  • KDE Plasma 5.20.2
  • Perl 5.32.0
  • GLibc
  • LLVM 11
  • RPM 4.16
  • Ruby 3.0 (la publicación final está planificada para finales de diciembre)
  • GNOME 3.38.1
  • openssl 3.0

Si quieres estar a la última con software actualizado y probado utiliza openSUSE Tumbleweed la opción rolling release de la distribución de GNU/Linux openSUSE.

Mantente actualizado y ya sabes: Have a lot of fun!!

Enlaces de interés

Geeko_ascii

——————————–

the avatar of Nathan Wolf
a silhouette of a person's head and shoulders, used as a default avatar

openSUSE Tumbleweed – Review of the week 2020/44

Dear Tumbleweed users and hackers,

Week 44 brought, among many other things, an upgrade to Kernel 5.9.1. The feedback I had seen so far was good, so people can still do their work.

In total, Tumbleweed has released 5 snapshots (1023, 1024, 1025, 1026, and 1028) during this week. The most noteworthy changes include:

  • Freetype 2.10.4
  • sssd 2.4.0
  • Ghostscript 9.59.3 (there is again a patch lever in the version number; some scripts/apps trip over this)
  • Mozilla Firefox 82.0
  • Mozilla Thunderbird 78.4.0
  • Cups 2.3.3
  • Linux kernel 5.9.1
  • GStreamer 1.18.0
  • Ruby 2.6 has been completely eliminated
  • nasm 2.15.05
  • PostgreSQL 13
  • jsoncpp 1.9.4

Looking back at the stuff being integrated, that was indeed a big part of that list. Currently, we build these major changes in our staging projects (ar are aware of the changes upcoming soon)

  • KDE Plasma 5.20.2
  • Perl 5.32.0
  • GLibc will be configured with CET enabled (Intel Control-flow Enforcement Technology)
  • LLVM 11
  • RPM 4.16
  • Ruby 3.0 (final release is scheduled for the end of December)
  • GNOME 3.38.1: awaiting sec review for malcontent (parental control feature)
  • openssl 3.0 (long-term; no progress in the last few weeks)
the avatar of YaST Team

Digest of YaST Development Sprint 111

Another development sprint ended for the YaST Team this week. This time we have fewer news than usual about new features in YaST… and the reason for that may surprise you. Turns out a significant part of the YaST Team has been studying the internals of Cockpit in an attempt to use our systems management knowledge to help to improve the Cockpit support for (open)SUSE.

But that doesn’t mean we have fully stopped the development of YaST and other parts of the installation process. Apart from working in several not yet finished improvements that will be presented in our next blog post, we have:

While doing all that and fixing several bugs, we also found time to prepare and deliver our presentation in the openSUSE + LibreOffice Virtual Conference, with the self-explanatory title of “Top 25 New Features in (Auto)YaST”. We are not fully sure whether a recording of the talk will be uploaded by the organizers at some point, but we will keep you informed if that happens.

That’s all folks! See you again in (hopefully less than) two weeks.