LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Blogs
User Name
Password

Notices


Old

xpath / Nokogiri: Find all nodes in a SVG path.

Posted 06-09-2022 at 02:41 PM by Michael Uplawski
Updated 06-18-2022 at 09:49 AM by Michael Uplawski (Code examples updated, comments are better, too.)

Work in Progress.
EDIT 18.6.2022: Today, I have learned three things:
  • What I want is called a “Bounding Box Calculator”.
  • I hate JavaScript a little more, now
  • My own solution, so far, is crap.


I need all nodes of all paths of a linked graphical object in an SVG file. As I work with handwritten text, those objects are combinations of several paths, sometimes grouped.

The following xpath findes the node definitions from the attribute “d” of the first path...
Senior Member
Views 55 Comments 1 Michael Uplawski is offline
Old

spellcheck in qutebrowser

Posted 12-28-2021 at 02:43 AM by Michael Uplawski
Updated 12-28-2021 at 02:45 AM by Michael Uplawski

If you want to set a spellcheck dictionary for the running session, type
Code:
:set spellcheck.languages ['en-US'] 
:set spellcheck.languages ['en-US', 'de-DE']
:set spellcheck.languages ['en-US', 'de-DE', 'fr-FR']
for only one or several languages at once.

To persist these settings, open config.py and add something like:
Code:
# Spellcheck
config.set('spellcheck.languages', ["en-US", "fr-FR", "de-DE"])
Found...
Senior Member
Views 681 Comments 1 Michael Uplawski is offline
Old

Works – Is Cool – Don't worry: WebP Image format for the Web

Posted 12-05-2021 at 05:31 PM by Michael Uplawski
Updated 02-07-2022 at 11:24 AM by Michael Uplawski (cosmetics & faults)

31/1/2022 Addition: SVG – last paragraphs added


Just when I decided to give up JPEG for storing photos on my hard-disk and upon converting some folders with Nikon raw photos (*.nef) to JPEG2000, I stumble upon a variety of new image formats which all claim to be successors of the old JPEG. But although the “Joint Photographich Expert Group” is behind most of the effort, their work has – for the time being – not met much response in mainstream software. Only JPEG-XL could be...
Senior Member
Views 1019 Comments 0 Michael Uplawski is offline
Old

[vim] avoid accidental maro recording (@q)

Posted 11-06-2021 at 06:02 AM by Michael Uplawski
Updated 11-13-2021 at 12:42 AM by Michael Uplawski

in ~/.vimrc I note
Code:
nnoremap Q q
nnoremap q <Nop>
and no longer end up in macro-recording mode, when I forget the colon before 'q'.

Copied & pasted from Stack Overflow (see there).
Senior Member
Views 91 Comments 0 Michael Uplawski is offline
Old

Unbuffered shell-input

Posted 10-16-2021 at 01:46 AM by Michael Uplawski
Updated 11-13-2021 at 12:43 AM by Michael Uplawski (Wrong title, much misunderstanding and ill-chosen search criteria.)

There are solutions on the Web.

Having read some of these, I prefer a Ruby-Oneliner “readNB” which returns the 1 character that the user has had a chance to enter on the keyboard, before readNB returns.

---------------------- In the meantime -------------------------
GazL has – in the very first comment on this blog, below – presented a better solution with the shell built-in command read: read accepts some parameters and a call like
Code:
read -r -s -N1 [VARIABLE]
...
Senior Member
Views 1265 Comments 4 Michael Uplawski is offline

  



All times are GMT -5. The time now is 05:44 PM.

Main Menu
Advertisement
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration