Commit 9dcc6910 authored by Ahmad Samir's avatar Ahmad Samir
Browse files

ExternalToolsPlugin: split defaultexternaltoolsrc into one file per tool

parent 5cf2b5c2
#! /bin/sh
$EXTRACTRC *.rc *.ui >> rc.cpp
grep -n -e '^ *name=' defaultexternaltoolsrc | sed 's!^\(.*\):.*name= *\(.*\) *$!// i18n: file: \1\ni18nc("External tool name", "\2");!' | sed 's/ \+")/")/' >>rc.cpp || exit 13
grep -n -e '^ *category=' defaultexternaltoolsrc | sed 's!^\(.*\):.*category= *\(.*\) *$!// i18n: file: \1\ni18nc("External tool category", "\2");!' | sed 's/ \+")/")/' >>rc.cpp || exit 13
for i in externaltools-config/*; do
grep -n -e '^ *name=' $i | sed 's!^\(.*\):.*name= *\(.*\) *$!// i18n: file: \1\ni18nc("External tool name", "\2");!' | sed 's/ \+")/")/' >>rc.cpp || exit 13
grep -n -e '^ *category=' $i | sed 's!^\(.*\):.*category= *\(.*\) *$!// i18n: file: \1\ni18nc("External tool category", "\2");!' | sed 's/ \+")/")/' >>rc.cpp || exit 13
;done
$XGETTEXT *.cpp -o $podir/kateexternaltoolsplugin.pot
[Global]
tools=18
version=1
[Tool 0]
actionName=externaltool_gitcola
arguments=-r %{Document:Path}
category=Git
cmdname=git-cola
executable=git-cola
icon=git-cola
name=git-cola
output=Ignore
reload=false
save=None
[Tool 1]
actionName=externaltool_gitk
category=Git
cmdname=gitk
executable=gitk
icon=git-gui
name=gitk
output=Ignore
reload=false
save=None
workingDir=%{Document:Path}
[Tool 2]
actionName=externaltool_gitblame
arguments=gui blame --line=%{Document:Cursor:Line} %{Document:FileName}
category=Git
cmdname=git-blame
executable=git
name=git blame
output=Ignore
reload=false
save=CurrentDocument
workingDir=%{Document:Path}
[Tool 3]
actionName=externaltool_RunShellScript
arguments=-e sh -c "cd %{Document:Path} && pwd && chmod -vc a+x %{Document:FileName} && ./%{Document:FileName} ; echo Press any key to continue. && read -n 1"
category=Tools
cmdname=run-script
executable=konsole
icon=system-run
name=Run Shell Script
output=Ignore
reload=false
save=CurrentDocument
workingDir=%{Document:Path}
[Tool 4]
actionName=externaltool_GoogleSelectedText
arguments="https://www.google.com/search?q=%{PercentEncoded:%{Document:Selection:Text}}"
category=Tools
cmdname=google
executable=xdg-open
icon=globe
name=Google Selected Text
output=Ignore
reload=false
save=None
[Tool 5]
actionName=externaltool_InsertUUID
arguments=%{UUID}
category=Tools
cmdname=uuid
executable=echo
name=Insert UUID
output=InsertAtCursor
reload=false
save=None
[Tool 6]
actionName=externaltool_ClangFormatFullFile
arguments=-i %{Document:FileName}
category=Tools
cmdname=clang-format-file
executable=clang-format
name=Clang Format Full File
output=Ignore
reload=true
save=CurrentDocument
workingDir=%{Document:Path}
[Tool 7]
actionName=externaltool_ClangFormatSelectedText
arguments=-assume-filename=%{Document:FileName}
category=Tools
cmdname=clang-format-selection
executable=clang-format
input=\s%{Document:Selection:Text}
name=Clang Format Selected Text
output=ReplaceSelectedText
reload=false
save=None
workingDir=%{Document:Path}
[Tool 8]
actionName=externaltool_JSONFormatFullFile
arguments="." "%{Document:FileName}"
category=Tools
cmdname=json-format-file
executable=jq
icon=application-json
name=JSON Format Full File
output=ReplaceCurrentDocument
reload=false
save=CurrentDocument
workingDir=%{Document:Path}
[Tool 9]
actionName=externaltool_XMLFormatFullFile
arguments=--format %{Document:FileName}
category=Tools
cmdname=xml-format-file
executable=xmllint
icon=application-xml
name=XML Format Full File
output=ReplaceCurrentDocument
reload=false
save=CurrentDocument
workingDir=%{Document:Path}
[Tool 10]
actionName=externaltool_RustFmt
arguments=--emit stdout %{Document:FileName}
category=Tools
cmdname=rustfmt-full-file
executable=rustfmt
icon=text-x-rust
mimetypes=text/x-rust
name=Rust Fmt Full File
output=ReplaceCurrentDocument
reload=false
save=CurrentDocument
workingDir=%{Document:Path}
[Tool 11]
actionName=externaltool_Prettier
arguments=%{Document:FileName}
category=Tools
cmdname=prettier-format-full-file
executable=prettier
name=Prettier Format Current File
output=ReplaceCurrentDocument
reload=false
save=CurrentDocument
workingDir=%{Document:Path}
[Tool 12]
actionName=externaltool_QtQuick2Previewqmlscene
arguments=%{Document:FileName}
category=Qt
cmdname=qml-preview
executable=qmlscene
mimetypes=text/x-qml
name=Qt Quick 2 Preview (qmlscene)
output=Ignore
reload=false
save=CurrentDocument
workingDir=%{Document:Path}
[Tool 13]
actionName=externaltool_GoFmt
arguments=%{Document:FileName}
category=Go
cmdname=gofmt-full-file
executable=gofmt
icon=text/x-go
mimetypes=text/x-go
name=Go Fmt Full File
output=ReplaceCurrentDocument
reload=false
save=CurrentDocument
workingDir=%{Document:Path}
[Tool 14]
actionName=externaltool_GoImports
arguments=%{Document:FileName}
category=Go
cmdname=goimports-full-file
executable=goimports
icon=text-x-go
mimetypes=text/x-go
name=GoImports Full File
output=ReplaceCurrentDocument
reload=false
save=CurrentDocument
workingDir=%{Document:Path}
[Tool 15]
actionName=externaltool_C++CompileRun
arguments=-c 'g++ %{Document:FilePath} -o %{Document:FileBaseName} && ./%{Document:FileBaseName}'
category=Tools
executable=sh
icon=text-x-c++src
name=Compile and Run cpp
output=DisplayInPane
reload=false
save=CurrentDocument
workingDir=%{Document:Path}
[Tool 16]
actionName=externaltool_KDEAPI
arguments="https://api.kde.org/search.html?query=%{Document:Selection:Text}"
category=Tools
cmdname=
executable=xdg-open
icon=kde
input=
mimetypes=
name=Search KDE API
output=Ignore
reload=false
save=None
workingDir=%{Document:Path}
[Tool 17]
actionName=externaltool_QtAPI
arguments="https://doc.qt.io/qt-5/search-results.html?q=%{Document:Selection:Text}"
category=Tools
cmdname=
executable=xdg-open
icon=qtcreator
input=
mimetypes=
name=Search Qt API
output=Ignore
reload=false
save=None
workingDir=%{Document:Path}
[General]
actionName=externaltool_ClangFormatFullFile
arguments=-i %{Document:FileName}
category=Tools
cmdname=clang-format-file
executable=clang-format
name=Clang Format Full File
output=Ignore
reload=true
save=CurrentDocument
workingDir=%{Document:Path}
[General]
actionName=externaltool_ClangFormatSelectedText
arguments=-assume-filename=%{Document:FileName}
category=Tools
cmdname=clang-format-selection
executable=clang-format
input=\s%{Document:Selection:Text}
name=Clang Format Selected Text
output=ReplaceSelectedText
reload=false
save=None
workingDir=%{Document:Path}
[General]
actionName=externaltool_C++CompileRun
arguments=-c 'g++ %{Document:FilePath} -o %{Document:FileBaseName} && ./%{Document:FileBaseName}'
category=Tools
executable=sh
icon=text-x-c++src
name=Compile and Run cpp
output=DisplayInPane
reload=false
save=CurrentDocument
workingDir=%{Document:Path}
[General]
actionName=externaltool_gitcola
arguments=-r %{Document:Path}
category=Git
cmdname=git-cola
executable=git-cola
icon=git-cola
name=git-cola
output=Ignore
reload=false
save=None
[General]
actionName=externaltool_gitblame
arguments=gui blame --line=%{Document:Cursor:Line} %{Document:FileName}
category=Git
cmdname=git-blame
executable=git
name=git blame
output=Ignore
reload=false
save=CurrentDocument
workingDir=%{Document:Path}
[General]
actionName=externaltool_gitk
category=Git
cmdname=gitk
executable=gitk
icon=git-gui
name=gitk
output=Ignore
reload=false
save=None
workingDir=%{Document:Path}
[General]
actionName=externaltool_GoFmt
arguments=%{Document:FileName}
category=Go
cmdname=gofmt-full-file
executable=gofmt
icon=text/x-go
mimetypes=text/x-go
name=Go Fmt Full File
output=ReplaceCurrentDocument
reload=false
save=CurrentDocument
workingDir=%{Document:Path}
[General]
actionName=externaltool_GoImports
arguments=%{Document:FileName}
category=Go
cmdname=goimports-full-file
executable=goimports
icon=text-x-go
mimetypes=text/x-go
name=GoImports Full File
output=ReplaceCurrentDocument
reload=false
save=CurrentDocument
workingDir=%{Document:Path}
[General]
actionName=externaltool_GoogleSelectedText
arguments="https://www.google.com/search?q=%{PercentEncoded:%{Document:Selection:Text}}"
category=Tools
cmdname=google
executable=xdg-open
icon=globe
name=Google Selected Text
output=Ignore
reload=false
save=None
[General]
actionName=externaltool_InsertUUID
arguments=%{UUID}
category=Tools
cmdname=uuid
executable=echo
name=Insert UUID
output=InsertAtCursor
reload=false
save=None
[General]
actionName=externaltool_JSONFormatFullFile
arguments="." "%{Document:FileName}"
category=Tools
cmdname=json-format-file
executable=jq
icon=application-json
name=JSON Format Full File
output=ReplaceCurrentDocument
reload=false
save=CurrentDocument
workingDir=%{Document:Path}
[General]
actionName=externaltool_Prettier
arguments=%{Document:FileName}
category=Tools
cmdname=prettier-format-full-file
executable=prettier
name=Prettier Format Current File
output=ReplaceCurrentDocument
reload=false
save=CurrentDocument
workingDir=%{Document:Path}
[General]
actionName=externaltool_QtQuick2Previewqmlscene
arguments=%{Document:FileName}
category=Qt
cmdname=qml-preview
executable=qmlscene
mimetypes=text/x-qml
name=Qt Quick 2 Preview (qmlscene)
output=Ignore
reload=false
save=CurrentDocument
workingDir=%{Document:Path}
[General]
actionName=externaltool_RunShellScript
arguments=-e sh -c "cd %{Document:Path} && pwd && chmod -vc a+x %{Document:FileName} && ./%{Document:FileName} ; echo Press any key to continue. && read -n 1"
category=Tools
cmdname=run-script
executable=konsole
icon=system-run
name=Run Shell Script
output=Ignore
reload=false
save=CurrentDocument
workingDir=%{Document:Path}
[General]
actionName=externaltool_RustFmt
arguments=--emit stdout %{Document:FileName}
category=Tools
cmdname=rustfmt-full-file
executable=rustfmt
icon=text-x-rust
mimetypes=text/x-rust
name=Rust Fmt Full File
output=ReplaceCurrentDocument
reload=false
save=CurrentDocument
workingDir=%{Document:Path}
[General]
actionName=externaltool_KDEAPI
arguments="https://api.kde.org/search.html?query=%{Document:Selection:Text}"
category=Tools
cmdname=
executable=xdg-open
icon=kde
input=
mimetypes=
name=Search KDE API
output=Ignore
reload=false
save=None
workingDir=%{Document:Path}
[General]
actionName=externaltool_QtAPI
arguments="https://doc.qt.io/qt-5/search-results.html?q=%{Document:Selection:Text}"
category=Tools
cmdname=
executable=xdg-open
icon=qtcreator
input=
mimetypes=
name=Search Qt API
output=Ignore
reload=false
save=None
workingDir=%{Document:Path}
[General]
actionName=externaltool_XMLFormatFullFile
arguments=--format %{Document:FileName}
category=Tools
cmdname=xml-format-file
executable=xmllint
icon=application-xml
name=XML Format Full File
output=ReplaceCurrentDocument
reload=false
save=CurrentDocument
workingDir=%{Document:Path}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment