Giter Site home page Giter Site logo

gmm96 / kde-5-template-manager Goto Github PK

View Code? Open in Web Editor NEW
13.0 2.0 5.0 11.64 MB

KDE 5 Dolphin Service Menu for creating a template from an existing file or directory.

Home Page: https://store.kde.org/p/1454391/

License: GNU General Public License v3.0

Shell 100.00%
dolphin-service desktop dolphin-service-menus kde-plasma-5 kde-desktop kde-plasma kdialog linux linux-desktop template

kde-5-template-manager's Introduction

KDE 5 Template Manager

KDE 5 Dolphin Service Menu for managing templates.

KDE logo       Plasma 5       Plasma 5       Templates

Templates are such a good feature for productivity. They are used to define a unique non-executable file format intended specifically for a particular application and help us to create that file / directory automatically. They are supported by Desktop Environments and File Managers used in most of the Linux distributions.

KDE 5 Plasma and Dolphin also support them, but you have to create a *.desktop file manually to create the template, which has a difficult syntax to remember. The goal of this project is to create a Dolphin Service Menu for building templates automatically just by selecting the desired file / directory, letting the user to choose the different template parameters (name, comments, icon). It also provides functionality to edit any of these parameters or to remove previously created templates by this tool anywhen you want, including the moment when uninstalling the plugin.

You can template any file or directory thanks to this plugin, and it is available in several languages: English, Spanish, French, Italian, German, Portuguese, Russian, Dutch, Czech, Polish, Estonian, Romanian, Finish, Swedish, Norwegian, Turkish, Danish, Ukrainian, Hungarian, Icelandic and Greek languages. Most of them has been translated using Google Translator, so some mistakes may appear in texts. If user language is not in the list, English language will be selected by default.

If you want to help me to add support for more languages, you are free to create a Pull Request modifying file TemplateManagerLocalization.sh with the new translations, or you can contact me by telegram: @supremoh.

Installation

Firstly, install Kdialog, as it is the only dependency this plugin has.

Download the package, extract it and run the following command to install this Dolphin Service.

./install.sh

If you don't like it, you can uninstall it by running:

./uninstall.sh

Usage

It is quite easy to use this plugin. To create a template, just select the file(s) / directory(ies) you want to use as template, do right-click and choose the option Manage template(s) -> Create template from this file/directory. Then enter the info asked by the dialogs that will appear and everything should be ok. Parameters name and icon are required, but comment is optional. When the template is created, you can use it by doing right-click, select Create new menu and choose the template you want to use. The template will keep the same permissions that the original file has. This is quite useful if you want to template scripts or executables.

You may need to edit a template, so you can use this tool. No need to select any file, just do right-click and select Manage template(s) -> Edit existing template.... Then, you should select the template you want to edit, and a windows will prompt with all the actions you are able to perform:

  • Edit name, comment or icon.
  • Open current template with default application.
  • Update with new template (including option to back up last template).
  • Discard new template.
  • Open new template with default application.
  • Save and exit.

You are free to edit anything you want, you just need to select Save and exit at the end to keep the changes in disk. If you don't want to save the changes, just click on Cancel to discard them.

You can also delete templates created with this tool. You just have to do right-click and select Manage template(s) -> Remove existing template(s).... Then, a windows will prompt with all the templates, where you can select as many as you want to remove. Finally, confirm, and they will be deleted.

It is not recommended removing previous templates you kept in your disk before you first installed this plugin using the template eraser tool, as some bugs may appear and deletion may not work.

Screenshots

Template creation

Template Creator - Dolphin Service Menu

Template Creator - Name input

Template Creator - Comment input

Template Creator - Icon input

Template Creator - Template successfully created

Template Creator - Dolphin 'Create New' menu

Template edition

Template Editor - Dolphin Service Menu

Template Editor - Template selection

Template Editor - Edit name selected

Template Editor - Name edition

Template Editor - Update template selected

Template Editor - New template type selection

Template Editor - Directory selection

Template Editor - Backup confirmation

Template Editor - Saving backup

Template Editor - Save and exit selected

Template Editor - Template successfully edited

Template Editor - Dolphin 'Create New' menu

Template deletion

Template Eraser - Dolphin Service Menu

Template Eraser - Template selection

Template Eraser - Delete confirmation

Template Eraser - Template successfully deleted

kde-5-template-manager's People

Contributors

ashark avatar gmm96 avatar vistaus avatar zahrun avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

kde-5-template-manager's Issues

Installs, but doesn't work at all

Operating System: EndeavourOS (Arch)
KDE Plasma Version: 5.24.0
KDE Frameworks Version: 5.90.0
Qt Version: 5.15.2
Kernel Version: 5.16.8-arch1-1 (64-bit)

I had "template-management_dolphin-service-menu-master" that didn't work. I looked for uninstall.sh there was everything but no uninstall.sh

I installed "KDE-5-Template-Manager-v5" hoping it would fix it = still not working and had additional menu entries.
uninstalled "KDE-5-Template-Manager-v5" using it's uninstall.sh, and deleted all related files from ~/.bin (in PATH) ~/.local/share /kservices5/ServiceMenus, and it looked like I got rid of all traces; the menu and menu service settings dialog entries were all cleared. I don't know if i need to remove anything else, nor where else to look, and there's no info here about what all the install script does.

I Rebooted just to make sure, and Reinstalled KDE-5-Template-Manager-v5, but it still does not work at all.

Steps:
Right click on file > Manage Template(s) > Create template from this file = Nothing happens at all! )<:

Also:
The menu entry for directories is under: Actions > Manage Template(s) > Create template from this directory.

That's inconsistent, the menu entries for files and directories should be in the same place in the menu.

Fix icons used in project

Currently in TermplateManager.desktop the icon for main file is favorite. Probably should instead use the project's one TemplateManagerIcon.png. I guess it should be placed at some standard location (do not yet explored which exactly) by install.sh and then use its name in Icon= field.
Specifying absolute path to png works (in Dolphin the icon of the .desktop file itself changes), but using $HOME variable there does not work. So I am not sure for now how to implement it.
This icon is referenced also in install.sh and in uninstall.sh.

Some other icons are missing in my system. For example, xapp-favorite-symbolic in cuttlefish shows nothing. It is referenced in TemplateManager.desktop and in TemplateManagerTools.sh.

wrong folders, but working?

For me the install.sh seems to do nothing.

When placing the Dolphin context menu entries to ~.local/share/kservices5/ServiceMenus they work normally.

The created Templates are placed in the home directory though, even though they show up in the "create new" context menu of Dolphin when placed in ~/.local/share/templates.

I dont think these directories are different between KDE Distros, they are in the user folder and should be no problem to be used normally (maybe not on multi-user systems but these Templates should be user specific anyways)

So I dont really know what the general directories in the script are for, they seem to not work and not be needed.

I am on Fedora Kinoite with OSTree filesystem, but the homedir works normally.

Installed but does not show in Services

Hi,
I am trying to use this manager to make templates, but I am not succeeding.
Steps:

  • I checked if KDialog is installed --> it is
  • I went to "Configure Dolphin" and then to "Context Menu" and then to "Download services"
  • I searched for KDE template manager and installed it

but here I am stuck, even after a restart, KDE 5 template manager does not show up in the Context Menu, or in the Context menu Settings. When I go again to "Download New Services", it shows as being "Installed".

Help appreciated!!

Using Dolpin 23.08.4
Operating System: TUXEDO OS 2
KDE Plasma Version: 5.27.10
KDE Frameworks Version: 5.113.0
Qt Version: 5.15.11
Kernel Version: 6.5.0-10013-tuxedo (64-bit)
Graphics Platform: X11

Templates edit action

It seems that it is in development.
Some items are not displayed properly. For example, blank spaces instead of naming actions such as editing icon.
Also, when installing via Dolphin (get new thing button), there is no such action.
Looks like it is not yet published in https://www.pling.com/p/1454391/

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.