Bug 479961 - Pipe the selected entry (or entries) to an external command
Summary: Pipe the selected entry (or entries) to an external command
Status: REPORTED
Alias: None
Product: tellico
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified All
: NOR wishlist
Target Milestone: ---
Assignee: Robby Stephenson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-01-17 20:22 UTC by Piotr Doroszewski
Modified: 2024-03-14 14:59 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Piotr Doroszewski 2024-01-17 20:22:08 UTC
Hello.

First and foremost, thank you very much for creating and developing Tellico for all these years! It's a very useful piece of software.

What I miss in it is some way to easily cooperate with external scripts provided by the user. For example, I would like to have an option to quickly print a physical catalog card for an entry.

I think a simple and powerful solution would be to follow the Unix philosophy and add the ability to pipe the selected entry (or entries) to an external command as simple text encoded in a markup language (e.g., XML for that's what Tellico uses for storing the data, though I personally definitely dislike it). This way, users would be able to use whatever languages and tools they like to create the external handler.

The way I see it implemented is to have a list of external handlers in the configuration menu, just like the source list (albeit, the new one would probably be empty by default) and put the elements of this list into a submenu in the context menu shown when the RMB or the Menu key is pressed with some entry or entries selected.

Kind regards.
Comment 1 Robby Stephenson 2024-03-14 14:59:52 UTC
Git commit eb223f81f53a041ca36d2ed8a23caad29a892499 by Robby Stephenson.
Committed on 14/03/2024 at 14:59.
Pushed by rstephenson into branch 'master'.

Allow the DBUS interface to export to stdout

Using a file name of '--' will result in the text being piped to stdout.
With a running instance of Tellico, the dbus command would be:
  qdbus-qt5 org.kde.tellico /Tellico org.kde.tellico.exportXML --

M  +5    -1    doc/advanced.docbook
M  +22   -9    src/core/filehandler.cpp
M  +2    -0    src/core/filehandler.h
M  +5    -1    src/dbusinterface.cpp

https://invent.kde.org/office/tellico/-/commit/eb223f81f53a041ca36d2ed8a23caad29a892499