Re: OT: html code to open a document in kwrite?

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Carruth, Rusty
Date:  
To: Main PLUG discussion list
Subject: Re: OT: html code to open a document in kwrite?
The original requestor states that:

>> I do this now from the command line:
>>
>> $ kwrite filename <E>
>>
>> But I would like to be able to do it by simply
>> clicking on an entry in a simple html menu.


My question is - why bother with HTML? There are many ways to create menus on your desktop (or in a program you run from your desktop) that could do this. The boring and manual way would be to create shell scripts that are like:

'#!/bin/bash
Kwrite <full_path_to_file>

Name them 'edit_<filename>', make them executable, and put them on your desktop. Double click on one, and it should fire up your editor on your file.

(The less manual way would be to create a list of files you want to edit and then have a script to create the above shell scripts on your desktop...)

Or, write a <pick your favourite scripting language> script to take a list of files from a file (or search a directory structure for files, whatever) and then create a graphical menu with buttons for you to click on to run your editor.

And that's just off the top of my head. Implementation (and thinking of other methods) are left as an exercise for the reader ;-)

(Don't you just love my company's stupid "Security Checkpoint" junk? Bah, humbug.)

Rusty

-----Original Message-----
From: PLUG-discuss [mailto:plug-discuss-bounces@lists.phxlinux.org] On Behalf Of
Sent: Friday, May 31, 2019 11:39 AM
To: Main PLUG discussion list
Subject: (External) Re: OT: html code to open a document in kwrite?

SMART Modular Security Checkpoint: External email. Please make sure you trust this source before clicking links or opening attachments.

As Stephen said: no.
With the short answer out of the way, and excluding the complicated overhead
to setup such an environment just for that, your question begs another
question:
What are you trying to accomplishing?
I looks to me more like you are asking the wrong (and probably confused)
question than having an esotheric problem. :)
ET


Stephen Partington writes:

> HTML? no. Javascript? possible. Most of the web is really designed to not
> allow this. There are some powerful JS writers, LibreOffice in the web and
> more.
>
> On Fri, May 31, 2019 at 10:16 AM Joe Lowder <> wrote:
>
>> Is it possible to write (the simplest possible)
>> html code that will open a text file from a simple
>> menu entry using the 'kwrite' editor ... that will
>> allow me to write and edit in a pre-named text file
>> and save the changes?
>>
>> I do this now from the command line:
>>
>> $ kwrite filename <E>
>>
>> But I would like to be able to do it by simply
>> clicking on an entry in a simple html menu.
>>
>> These attempts do not work:
>> <li><a href=file:/home/joe/notes>open notes text file</a>
>> <li><a href="exec kwrite notes">open notes with kwrite</a>
>> <li><a href="exec /usr/bin/kwrite notes">open notes with exec</a>
>>
>>
>>
>> ---------------------------------------------------
>> PLUG-discuss mailing list -
>> To subscribe, unsubscribe, or to change your mail settings:
>> https://lists.phxlinux.org/mailman/listinfo/plug-discuss
>
>
>
> --
> A mouse trap, placed on top of your alarm clock, will prevent you from
> rolling over and going back to sleep after you hit the snooze button.
>
> Stephen

---------------------------------------------------
PLUG-discuss mailing list -
To subscribe, unsubscribe, or to change your mail settings:
https://lists.phxlinux.org/mailman/listinfo/plug-discuss
---------------------------------------------------
PLUG-discuss mailing list -
To subscribe, unsubscribe, or to change your mail settings:
https://lists.phxlinux.org/mailman/listinfo/plug-discuss