Create New Template Service Menu

Dolphin Service Menus

Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net

0
Score 50.0%
Description:

A context menu item for KDE and Konqueror that automates adding Create New... menu entries from existing files. It adds a "Create Template" item to the Actions submenu of the context menu. It consists of a service menu .desktop file and a shell script.

KDE Create New Template Service Menu

This service menu removes the hassle of hand-coding Create New... menu entries. It is accessed by right-clicking regular file icons on the desktop or in Konqueror, pointing to Actions, and selecting Create Template.

It consists of a service menu .desktop file and a Bash shell script. The Create Template service menu runs a shell script that brings up two dialogs--one for choosing an icon to associate with the Create New... menu entry, and the other for entering the menu item text itself. It uses this information to write a Create New... menu item .desktop file. The shell script bases the name of the .desktop file on the name of the document file clicked on from the desktop and places a copy of the file in the .sources subdirectory of ~/.kde/share/templates.

The service menu should be placed in ~/.kde/share/apps/konqueror/servicemenus and the shell script in ~/bin.

I suggest that users first install the Simple Service Menu Installer available from http://www.kde-apps.org/content/download.php?content=23760&id=1. That service menu provides the same service for installable service menus that mine does for document templates and will greatly simplify the process of installing this service menu. After downloading that service menu just right-click on it, point to Actions, point to Install Service, and click one of the options available on the submenu. Then to install my service menu, just follow the same proceedure and place the shell script in your personal ~/bin directory.

From that point on you will have a nice, simple method of adding both installable service menus and templates to the KDE context menu.

This project is released under the terms of the GNU GPL v.2.0.

Enjoy!

If you have any suggestions or improvements, please send them to my sourceforge address. Thanks.

Scott Bicknell
[email protected]
Last changelog:

12 years ago

Version 0.2.1:

1. Changed menu icons to more appropriate ones.

Version 0.2:
This version of mktemplate offers two improvements:

1. Templates can be created either in your user account or system-wide
2. File names with spaces are handled gracefully

dwlamb

5 years ago

I like the concept of this add-on but wonder is it still functional? I am using Kubuntu 12.04 and followed the steps for installing the helper add-on and then your add-on. I received a message that the service had been created but when I right-clicked in Dolphin or Konqueror to try it out, no entry was found in the Actions sub-menu.
Might it show up after a system reboot?

Report

uldics

10 years ago

I was trying to do this by hand, as it is not so frequently i would use such script. I find it useful, but, hehe, dont need it myself. So, i found lots of tutorials and descriptions of how to make specific "Actions" entries, but wanted "Create new". This page made me think a bit (at last!) and I got it to work.

1. I made a folder (it didnt exist before) - /home/myusername/.kde/share/templates
2. I saved my template files - this time with Open Office writer and calc in this folder
3. the "Create new" menu had two new entries at same moment, without any restarts, but they didnt work
4. so i renamed them to "ODF text document.odt.desktop" and "ODF spreadsheet.ods.desktop" and now it works!

I'm sure this works with anything single file project. But I'm tempted to experiment further - what about making folders for some "manyfilesinoneproject". There are some video editing (like make new DVD) or 3D editing programs, which have lots of files for each job.

Report

C

penguiniator

12 years ago

http://www.kde-look.org/content/show.php?content=11435

This is the service menu installer I meant to refer to above.

Report

BorgQueen

12 years ago

Another suggestion I thought of is have it auto add the ext. For example .png for png files. Enter the name of the template and go.

Report

BorgQueen

12 years ago

This is great. Thank you very much.
I do have a suggestion. Create some base templates to include with it. I'll try to create some for multimedia, scribus, OOo, and a few more over the next few weeks. If you'd like to help or want something specific (or anyone would just like to help to create a library of templates), you can find me at #arklinux, on freenode.net.

Thanks again!

Report

12 years ago

Version 0.2.1:

1. Changed menu icons to more appropriate ones.

Version 0.2:
This version of mktemplate offers two improvements:

1. Templates can be created either in your user account or system-wide
2. File names with spaces are handled gracefully

12345678910
product-maker Base: 4 x 5.0 Ratings
File (click to download) Version Description Downloads Date Filesize DL OCS-Install MD5SUM
*Needs ocs-url or ocs-store to install things
Pling
0 Affiliates
Details
license
version
0.2.1
updated Mar 05 2007
added Feb 18 2007
downloads 24h
0
pageviews 24h 2
System Tags addon