diff options
Diffstat (limited to 'conversions/kde-tde')
-rwxr-xr-x | conversions/kde-tde/convert_existing_kde3_app_to_tde | 524 | ||||
-rwxr-xr-x | conversions/kde-tde/convert_kde3_icon_names_to_xdg_standards | 20 | ||||
-rwxr-xr-x | conversions/kde-tde/tde_action_conversion | 154 | ||||
-rwxr-xr-x | conversions/kde-tde/tde_device_conversion | 141 | ||||
-rwxr-xr-x | conversions/kde-tde/tde_mimetype_conversion | 169 |
5 files changed, 1008 insertions, 0 deletions
diff --git a/conversions/kde-tde/convert_existing_kde3_app_to_tde b/conversions/kde-tde/convert_existing_kde3_app_to_tde new file mode 100755 index 0000000..9223620 --- /dev/null +++ b/conversions/kde-tde/convert_existing_kde3_app_to_tde @@ -0,0 +1,524 @@ +#!/bin/bash +# +# Licensed under the GPL v2 + +THISSCRIPT=$(readlink -f $0) +if [[ ! -e "$THISSCRIPT" ]]; then + echo "Unable to find myself! Exiting..." + exit 1 +fi +SCRIPTPATH=`dirname $THISSCRIPT` + +find ./ -type f -not -iwholename '*.git*' -print0 | +xargs -r0 grep -ElI "([^a-zA-Z0-9]|^)(\ +(|-l|lib)kdecorations|\ +(|-l|lib)kdecore|\ +(|-l|lib)kdefakes|\ +(|-l|lib)kdefx|\ +(|-l|lib)kdegames|\ +(|-l|lib)kdeinit|\ +(|-l|lib)kdepim|\ +(|-l|lib)kdeprint|\ +(|-l|lib)kdesasl|\ +(|-l|lib)kdesu|\ +(|-l|lib)kdesvnpart|\ +(|-l|lib)kdeui|\ +KDECORATIONS|\ +KDECORE|\ +KDEFAKES|\ +KDEFX|\ +KDEGAMES|\ +KDEINIT|\ +KDEPIM|\ +KDEPRINT|\ +KDESASL|\ +KDESU|\ +KDESVNPART|\ +KDEUI|\ +KDNSSD|\ +KIMPROXY|\ +KIO([^a-zA-Z0-9]|\$)|\ +KPARTS|\ +KSPELL|\ +KSYCOCA|\ +KUNITTEST|\ +KUTILS|\ +(|-l|lib)kdeaccessibility|\ +(|-l|lib)kdeaddons|\ +(|-l|lib)kdeadmin|\ +(|-l|lib)kdeartwork|\ +(|-l|lib)kdebase|\ +(|-l|lib)kdebindings|\ +(|-l|lib)kdeedu|\ +(|-l|lib)kdegames|\ +(|-l|lib)kdegraphics|\ +kde-i18n|\ +(|-l|lib)kdelibs|\ +(|-l|lib)kdemultimedia|\ +(|-l|lib)kdenetwork|\ +(|-l|lib)kdepim|\ +(|-l|lib)kdesdk|\ +(|-l|lib)kdetoys|\ +(|-l|lib)kdeutils|\ +(|-l|lib)kdevelop|\ +(|-l|lib)kdewebdev|\ +desktop-effects-kde|\ +kde-guidance|\ +kde-style-lipstik|\ +kde-style-qtcurve|\ +kdesudo|\ +kdesvn|\ +kde-systemsettings|\ +kwin-style-crystal|\ +kwin|\ +KDE_VERSION|\ +kdeversion|\ +startkde|\ +pykde|\ +KDEHOME|\ +KDEDIR|\ +KDE_MULTIHEAD|\ +KDE_SESSION|\ +kdehome|\ +kdedir|\ +KDEROOTHOME|\ +kderoothome|\ +KDE_MAKE_VERSION|\ +kdm|\ +KDM|\ +ksocket|\ +KSOCKET|\ +kcache|\ +KCACHE|\ +KDETMP|\ +KDEVARTMP|\ +KDEWM|\ +include/kde([^\.]|\$)|\ +\$\{INCLUDE_INSTALL_DIR\}/kde([^\.]|\$)|\ +kde-config|\ +KDE_FORK_SLAVES|\ +KDE_HOME_READONLY|\ +KDE_NO_IPV6|\ +KDE_IS_PRELINKED|\ +KDE_UTF8_FILENAMES|\ +KDESYCOCA|\ +KApplication|\ +KCmdLineArgs|\ +KInstance|\ +KAboutData|\ +KCModule|\ +KConfig|\ +KServer|\ +KSocket|\ +KIO\.|\ +KIO:|\ +KIO;|\ +\<KIO\>|\ +KIO_|\ +KIOInput|\ +KIOJob|\ +KIOConfig|\ +KIOBuffer|\ +KBuffer|\ +kcmodule|\ +kconfig_compiler|\ +kunittestmodrunner|\ +kioexec|\ +kio_|\ +kmailservice|\ +ktelnetservice|\ +ksendbugmail|\ +(|-l|lib)kfile|\ +ktradertest|\ +kbuildsycoca|\ +kde-menu|\ +kmimelist|\ +kioslave|\ +kio/|\ +(|-l|lib)kio\>|\ +kstartupconfig|\ +kdostartupconfig|\ +klauncher|\ +kab2kabc|\ +kcmshell|\ +kconf|\ +khotnewstuff|\ +(|-l|lib)ksycoca|\ +(|-l|lib)kunittest|\ +(|-l|lib)kwallet|\ +kntlm|\ +(|-l|lib)kparts|\ +(|-l|lib)kutils|\ +(|-l|lib)kspell|\ +(|-l|lib)kmdi|\ +(|-l|lib)kresources|\ +kscript|\ +kmediaplayer|\ +(|-l|lib)kimproxy|\ +(|-l|lib)ktexteditor|\ +kcert|\ +krandr|\ +(|-l|lib)khtml|\ +kmulti|\ +kmid|\ +kscreensaver|\ +(|-l|lib)kdnssd|\ +krsync|\ +kiobuffer|\ +KHTML|\ +KShared|\ +KStandard|\ +KStartup|\ +KLocale|\ +KLock|\ +KTrader|\ +KLaunch|\ +KShort|\ +KStdAccel|\ +KAccel|\ +KAction|\ +KMain|\ +KTool|\ +KPopup|\ +KToggle|\ +KRadio|\ +KSelect|\ +KList|\ +KRecent|\ +KFont|\ +KPaste|\ +klaunch|\ +kshort|\ +kstdaccel|\ +kaccel|\ +kaction|\ +kmain|\ +ktool|\ +kpopup|\ +ktoggle|\ +kradio|\ +kselect|\ +klist|\ +krecent|\ +kfont|\ +kpaste|\ +kdisplay|\ +KStyle|\ +KIcon|\ +KZone|\ +KCrash|\ +KCmd|\ +KAbout|\ +KComp|\ +KGlobal|\ +(|the)KProcess|\ +KClipboard|\ +Kwallet|\ +KWallet|\ +KWALLET|\ +kcompletionbox|\ +kaboutapplication\.|\ +kaboutdata\.|\ +kaboutdialog\.|\ +kaboutkde\.|\ +kcmdlineargs\.|\ +kapplication\.|\ +kstyle\.|\ +drawKStylePrimitive|\ +kdiroperator\.|\ +klocale\.|\ +kmessagebox\.|\ +ktempfile\.|\ +kemailsettings\.|\ +kglobal\.|\ +kglobalsettings\.|\ +kmenubar\.|\ +kprotocolmanager\.|\ +kstartupinfo\.|\ +kabc|\ +(|-l|lib)kabc|\ +makekdewidgets|\ +MAKEKDEWIDGETS|\ +kdewidgets|\ +Categories=Qt;KDE|\ +X-KDE-|\ +kde\.org/tdehotnewstuff|\ +tdevelop[a-z_\-]*@[tk]develop\.org|\ +tdevelop\.org|\ +tdewebdev\.org|\ +\<tdelistr|\ +kde toolbar widget\ +)" | +tr "\n" "\0" | +xargs -r0 sed -ri \ + -e "s|([^a-zA-Z0-9]\|-l\|lib\|^)kdecorations|\1tdecorations|g" \ + -e "s|([^a-zA-Z0-9]\|-l\|lib\|^)kdecore|\1tdecore|g" \ + -e "s|([^a-zA-Z0-9]\|-l\|lib\|^)kdefakes|\1tdefakes|g" \ + -e "s|([^a-zA-Z0-9]\|-l\|lib\|^)kdefx|\1tdefx|g" \ + -e "s|([^a-zA-Z0-9]\|-l\|lib\|^)kdegames|\1tdegames|g" \ + -e "s|([^a-zA-Z0-9]\|-l\|lib\|^)kdeinit|\1tdeinit|g" \ + -e "s|([^a-zA-Z0-9]\|-l\|lib\|^)kdepim|\1tdepim|g" \ + -e "s|([^a-zA-Z0-9]\|-l\|lib\|^)kdeprint|\1tdeprint|g" \ + -e "s|([^a-zA-Z0-9]\|-l\|lib\|^)kdesasl|\1tdesasl|g" \ + -e "s|([^a-zA-Z0-9]\|-l\|lib\|^)kdesu|\1tdesu|g" \ + -e "s|([^a-zA-Z0-9]\|-l\|lib\|^)kdesvnpart|\1tdesvnpart|g" \ + -e "s|([^a-zA-Z0-9]\|-l\|lib\|^)kdeui|\1tdeui|g" \ + -e "s|([^a-zA-Z0-9]\|^)KDECORATIONS|\1TDECORATIONS|g" \ + -e "s|([^a-zA-Z0-9]\|^)KDECORE|\1TDECORE|g" \ + -e "s|([^a-zA-Z0-9]\|^)KDEFAKES|\1TDEFAKES|g" \ + -e "s|([^a-zA-Z0-9]\|^)KDEFX|\1TDEFX|g" \ + -e "s|([^a-zA-Z0-9]\|^)KDEGAMES|\1TDEGAMES|g" \ + -e "s|([^a-zA-Z0-9]\|^)KDEINIT|\1TDEINIT|g" \ + -e "s|([^a-zA-Z0-9]\|^)KDEPIM|\1TDEPIM|g" \ + -e "s|([^a-zA-Z0-9]\|^)KDEPRINT|\1TDEPRINT|g" \ + -e "s|([^a-zA-Z0-9]\|^)KDESASL|\1TDESASL|g" \ + -e "s|([^a-zA-Z0-9]\|^)KDESU|\1TDESU|g" \ + -e "s|([^a-zA-Z0-9]\|^)KDESVNPART|\1TDESVNPART|g" \ + -e "s|([^a-zA-Z0-9]\|^)KDEUI|\1TDEUI|g" \ + -e "s|([^a-zA-Z0-9]\|^)KDNSSD|\1TDEDNSSD|g" \ + -e "s|([^a-zA-Z0-9]\|^)KIMPROXY|\1TDEIMPROXY|g" \ + -e "s|([^a-zA-Z0-9]\|^)KIO([^a-zA-Z0-9]\|\$)|\1TDEIO\2|g" \ + -e "s|([^a-zA-Z0-9]\|^)KPARTS|\1TDEPARTS|g" \ + -e "s|([^a-zA-Z0-9]\|^)KSPELL|\1TDESPELL|g" \ + -e "s|([^a-zA-Z0-9]\|^)KSYCOCA|\1TDESYCOCA|g" \ + -e "s|([^a-zA-Z0-9]\|^)KUNITTEST|\1TDEUNITTEST|g" \ + -e "s|([^a-zA-Z0-9]\|^)KUTILS|\1TDEUTILS|g" \ + -e "s|([^a-zA-Z0-9]\|-l\|lib\|^)kdeaccessibility|\1tdeaccessibility|g" \ + -e "s|([^a-zA-Z0-9]\|-l\|lib\|^)kdeaddons|\1tdeaddons|g" \ + -e "s|([^a-zA-Z0-9]\|-l\|lib\|^)kdeadmin|\1tdeadmin|g" \ + -e "s|([^a-zA-Z0-9]\|-l\|lib\|^)kdeartwork|\1tdeartwork|g" \ + -e "s|([^a-zA-Z0-9]\|-l\|lib\|^)kdebase|\1tdebase|g" \ + -e "s|([^a-zA-Z0-9]\|-l\|lib\|^)kdebindings|\1tdebindings|g" \ + -e "s|([^a-zA-Z0-9]\|-l\|lib\|^)kdeedu|\1tdeedu|g" \ + -e "s|([^a-zA-Z0-9]\|-l\|lib\|^)kdegames|\1tdegames|g" \ + -e "s|([^a-zA-Z0-9]\|-l\|lib\|^)kdegraphics|\1tdegraphics|g" \ + -e "s|([^a-zA-Z0-9]\|^)kde-i18n|\1tde-i18n|g" \ + -e "s|([^a-zA-Z0-9]\|-l\|lib\|^)kdelibs|\1tdelibs|g" \ + -e "s|([^a-zA-Z0-9]\|-l\|lib\|^)kdemultimedia|\1tdemultimedia|g" \ + -e "s|([^a-zA-Z0-9]\|-l\|lib\|^)kdenetwork|\1tdenetwork|g" \ + -e "s|([^a-zA-Z0-9]\|-l\|lib\|^)kdepim|\1tdepim|g" \ + -e "s|([^a-zA-Z0-9]\|-l\|lib\|^)kdesdk|\1tdesdk|g" \ + -e "s|([^a-zA-Z0-9]\|-l\|lib\|^)kdetoys|\1tdetoys|g" \ + -e "s|([^a-zA-Z0-9]\|-l\|lib\|^)kdeutils|\1tdeutils|g" \ + -e "s|([^a-zA-Z0-9]\|-l\|lib\|^)kdevelop|\1tdevelop|g" \ + -e "s|([^a-zA-Z0-9]\|-l\|lib\|^)kdewebdev|\1tdewebdev|g" \ + -e "s|([^a-zA-Z0-9]\|^)desktop-effects-kde|\1desktop-effects-tde|g" \ + -e "s|([^a-zA-Z0-9]\|^)kde-guidance|\1tde-guidance|g" \ + -e "s|([^a-zA-Z0-9]\|^)kde-style-lipstik|\1tde-style-lipstik|g" \ + -e "s|([^a-zA-Z0-9]\|^)kde-style-qtcurve|\1tde-style-qtcurve|g" \ + -e "s|([^a-zA-Z0-9]\|^)kdesudo|\1tdesudo|g" \ + -e "s|([^a-zA-Z0-9]\|^)kdesvn|\1tdesvn|g" \ + -e "s|([^a-zA-Z0-9]\|^)kde-systemsettings|\1tde-systemsettings|g" \ + -e "s|([^a-zA-Z0-9]\|^)kwin-style-crystal|\1twin-style-crystal|g" \ + -e "s|([^a-zA-Z0-9]\|^)kwin|\1twin|g" \ + -e "s|([^a-zA-Z0-9]\|^)KDE_VERSION|\1TDE_VERSION|g" \ + -e "s|([^a-zA-Z0-9]\|^)kdeversion|\1tdeversion|g" \ + -e "s|([^a-zA-Z0-9]\|^)startkde|\1starttde|g" \ + -e "s|([^a-zA-Z0-9]\|^)pykde|\1pytde|g" \ + -e "s|([^a-zA-Z0-9]\|^)KDEHOME|\1TDEHOME|g" \ + -e "s|([^a-zA-Z0-9]\|^)KDEDIR|\1TDEDIR|g" \ + -e "s|([^a-zA-Z0-9]\|^)KDE_MULTIHEAD|\1TDE_MULTIHEAD|g" \ + -e "s|([^a-zA-Z0-9]\|^)KDE_SESSION|\1TDE_SESSION|g" \ + -e "s|([^a-zA-Z0-9]\|^)kdehome|\1tdehome|g" \ + -e "s|([^a-zA-Z0-9]\|^)kdedir|\1tdedir|g" \ + -e "s|([^a-zA-Z0-9]\|^)KDEROOTHOME|\1TDEROOTHOME|g" \ + -e "s|([^a-zA-Z0-9]\|^)kderoothome|\1tderoothome|g" \ + -e "s|([^a-zA-Z0-9]\|^)KDE_MAKE_VERSION|\1TDE_MAKE_VERSION|g" \ + -e "s|([^a-zA-Z0-9]\|^)kdm|\1tdm|g" \ + -e "s|([^a-zA-Z0-9]\|^)KDM|\1TDM|g" \ + -e "s|([^a-zA-Z0-9]\|^)ksocket|\1tdesocket|g" \ + -e "s|([^a-zA-Z0-9]\|^)KSOCKET|\1TDESOCKET|g" \ + -e "s|([^a-zA-Z0-9]\|^)kcache|\1tdecache|g" \ + -e "s|([^a-zA-Z0-9]\|^)KCACHE|\1TDECACHE|g" \ + -e "s|([^a-zA-Z0-9]\|^)KDETMP|\1TDETMP|g" \ + -e "s|([^a-zA-Z0-9]\|^)KDEVARTMP|\1TDEVARTMP|g" \ + -e "s|([^a-zA-Z0-9]\|^)KDEWM|\1TDEWM|g" \ + -e "s|([^a-zA-Z0-9]\|^)include/kde([^\.]\|\$)|\1include/tde\2|g" \ + -e "s|([^a-zA-Z0-9]\|^)\$\{INCLUDE_INSTALL_DIR\}/kde([^\.]\|\$)|\1\${INCLUDE_INSTALL_DIR}/tde\2|g" \ + -e "s|([^a-zA-Z0-9]\|^)kde-config|\1tde-config|g" \ + -e "s|([^a-zA-Z0-9]\|^)KDE_FORK_SLAVES|\1TDE_FORK_SLAVES|g" \ + -e "s|([^a-zA-Z0-9]\|^)KDE_HOME_READONLY|\1TDE_HOME_READONLY|g" \ + -e "s|([^a-zA-Z0-9]\|^)KDE_NO_IPV6|\1TDE_NO_IPV6|g" \ + -e "s|([^a-zA-Z0-9]\|^)KDE_IS_PRELINKED|\1TDE_IS_PRELINKED|g" \ + -e "s|([^a-zA-Z0-9]\|^)KDE_UTF8_FILENAMES|\1TDE_UTF8_FILENAMES|g" \ + -e "s|([^a-zA-Z0-9]\|^)KDESYCOCA|\1TDESYCOCA|g" \ + \ + -e "s|([^a-zA-Z0-9]\|^)KApplication|\1TDEApplication|g" \ + -e "s|([^a-zA-Z0-9]\|^)KCmdLineArgs|\1TDECmdLineArgs|g" \ + -e "s|([^a-zA-Z0-9]\|^)KInstance|\1TDEInstance|g" \ + -e "s|([^a-zA-Z0-9]\|^)KAboutData|\1TDEAboutData|g" \ + \ + -e "s|([^a-zA-Z0-9]\|^)KCModule|\1TDECModule|g" \ + -e "s|([^a-zA-Z0-9]\|^)KConfig|\1TDEConfig|g" \ + -e "s|([^a-zA-Z0-9]\|^)KServer|\1TDEServer|g" \ + -e "s|([^a-zA-Z0-9]\|^)KSocket|\1TDESocket|g" \ + -e "s|([^a-zA-Z0-9]\|^)KIO\.|\1TDEIO.|g" \ + -e "s|([^a-zA-Z0-9]\|^)KIO:|\1TDEIO:|g" \ + -e "s|([^a-zA-Z0-9]\|^)KIO;|\1TDEIO;|g" \ + -e "s|([^a-zA-Z0-9]\|^)\<KIO\>|\1TDEIO|g" \ + -e "s|([^a-zA-Z0-9]\|^)KIO_|\1TDEIO_|g" \ + -e "s|([^a-zA-Z0-9]\|^)KIOInput|\1TDEIOInput|g" \ + -e "s|([^a-zA-Z0-9]\|^)KIOJob|\1TDEIOJob|g" \ + -e "s|([^a-zA-Z0-9]\|^)KIOConfig|\1TDEIOConfig|g" \ + -e "s|([^a-zA-Z0-9]\|^)KIOBuffer|\1TDEIOBuffer|g" \ + -e "s|([^a-zA-Z0-9]\|^)KBuffer|\1TDEBuffer|g" \ + -e "s|([^a-zA-Z0-9]\|^)kcmodule|\1tdecmodule|g" \ + \ + -e "s|([^a-zA-Z0-9]\|^)kconfig_compiler|\1tdeconfig_compiler|g" \ + -e "s|([^a-zA-Z0-9]\|^)kunittestmodrunner|\1tdeunittestmodrunner|g" \ + -e "s|([^a-zA-Z0-9]\|^)kioexec|\1tdeioexec|g" \ + -e "s|([^a-zA-Z0-9]\|^)kio_|\1tdeio_|g" \ + -e "s|([^a-zA-Z0-9]\|^)kmailservice|\1tdemailservice|g" \ + -e "s|([^a-zA-Z0-9]\|^)ktelnetservice|\1tdetelnetservice|g" \ + -e "s|([^a-zA-Z0-9]\|^)ksendbugmail|\1tdesendbugmail|g" \ + -e "s|([^a-zA-Z0-9]\|-l\|lib\|^)kfile|\1tdefile|g" \ + -e "s|([^a-zA-Z0-9]\|^)ktradertest|\1tdetradertest|g" \ + -e "s|([^a-zA-Z0-9]\|^)kbuildsycoca|\1tdebuildsycoca|g" \ + -e "s|([^a-zA-Z0-9]\|^)kde-menu|\1tde-menu|g" \ + -e "s|([^a-zA-Z0-9]\|^)kmimelist|\1tdemimelist|g" \ + -e "s|([^a-zA-Z0-9]\|^)kioslave|\1tdeioslave|g" \ + -e "s|([^a-zA-Z0-9]\|^)kio/|\1tdeio/|g" \ + -e "s|([^a-zA-Z0-9]\|-l\|lib\|^)kio\>|\1tdeio|g" \ + -e "s|([^a-zA-Z0-9]\|^)kstartupconfig|\1tdestartupconfig|g" \ + -e "s|([^a-zA-Z0-9]\|^)kdostartupconfig|\1tdedostartupconfig|g" \ + -e "s|([^a-zA-Z0-9]\|^)klauncher|\1tdelauncher|g" \ + -e "s|([^a-zA-Z0-9]\|^)kab2kabc|\1tdeab2tdeabc|g" \ + -e "s|([^a-zA-Z0-9]\|^)kcmshell|\1tdecmshell|g" \ + -e "s|([^a-zA-Z0-9]\|^)kconf|\1tdeconf|g" \ + -e "s|([^a-zA-Z0-9]\|^)khotnewstuff|\1tdehotnewstuff|g" \ + \ + -e "s|([^a-zA-Z0-9]\|-l\|lib\|^)ksycoca|\1tdesycoca|g" \ + -e "s|([^a-zA-Z0-9]\|-l\|lib\|^)kunittest|\1tdeunittest|g" \ + -e "s|([^a-zA-Z0-9]\|-l\|lib\|^)kwallet|\1tdewallet|g" \ + -e "s|([^a-zA-Z0-9]\|^)kntlm|\1tdentlm|g" \ + -e "s|([^a-zA-Z0-9]\|-l\|lib\|^)kparts|\1tdeparts|g" \ + -e "s|([^a-zA-Z0-9]\|-l\|lib\|^)kutils|\1tdeutils|g" \ + -e "s|([^a-zA-Z0-9]\|-l\|lib\|^)kspell|\1tdespell|g" \ + -e "s|([^a-zA-Z0-9]\|-l\|lib\|^)kmdi|\1tdemdi|g" \ + -e "s|([^a-zA-Z0-9]\|-l\|lib\|^)kresources|\1tderesources|g" \ + -e "s|([^a-zA-Z0-9]\|^)kscript|\1tdescript|g" \ + -e "s|([^a-zA-Z0-9]\|^)kmediaplayer|\1tdemediaplayer|g" \ + -e "s|([^a-zA-Z0-9]\|-l\|lib\|^)kimproxy|\1tdeimproxy|g" \ + -e "s|([^a-zA-Z0-9]\|-l\|lib\|^)ktexteditor|\1tdetexteditor|g" \ + -e "s|([^a-zA-Z0-9]\|^)kcert|\1tdecert|g" \ + -e "s|([^a-zA-Z0-9]\|^)krandr|\1tderandr|g" \ + -e "s|([^a-zA-Z0-9]\|-l\|lib\|^)khtml|\1tdehtml|g" \ + -e "s|([^a-zA-Z0-9]\|^)kmulti|\1tdemulti|g" \ + -e "s|([^a-zA-Z0-9]\|^)kmid|\1tdemid|g" \ + -e "s|([^a-zA-Z0-9]\|^)kscreensaver|\1tdescreensaver|g" \ + -e "s|([^a-zA-Z0-9]\|-l\|lib\|^)kdnssd|\1tdednssd|g" \ + -e "s|([^a-zA-Z0-9]\|^)krsync|\1tdersync|g" \ + \ + -e "s|([^a-zA-Z0-9]\|^)kiobuffer|\1tdeiobuffer|g" \ + -e "s|([^a-zA-Z0-9]\|^)KHTML|\1TDEHTML|g" \ + -e "s|([^a-zA-Z0-9]\|^)KShared|\1TDEShared|g" \ + -e "s|([^a-zA-Z0-9]\|^)KStandard|\1TDEStandard|g" \ + -e "s|([^a-zA-Z0-9]\|^)KStartup|\1TDEStartup|g" \ + -e "s|([^a-zA-Z0-9]\|^)KLocale|\1TDELocale|g" \ + -e "s|([^a-zA-Z0-9]\|^)KLock|\1TDELock|g" \ + -e "s|([^a-zA-Z0-9]\|^)KTrader|\1TDETrader|g" \ + -e "s|([^a-zA-Z0-9]\|^)KLaunch|\1TDELaunch|g" \ + -e "s|([^a-zA-Z0-9]\|^)KShort|\1TDEShort|g" \ + -e "s|([^a-zA-Z0-9]\|^)KStdAccel|\1TDEStdAccel|g" \ + -e "s|([^a-zA-Z0-9]\|^)KAccel|\1TDEAccel|g" \ + -e "s|([^a-zA-Z0-9]\|^)KAction|\1TDEAction|g" \ + -e "s|([^a-zA-Z0-9]\|^)KMain|\1TDEMain|g" \ + -e "s|([^a-zA-Z0-9]\|^)KTool|\1TDETool|g" \ + -e "s|([^a-zA-Z0-9]\|^)KPopup|\1TDEPopup|g" \ + -e "s|([^a-zA-Z0-9]\|^)KToggle|\1TDEToggle|g" \ + -e "s|([^a-zA-Z0-9]\|^)KRadio|\1TDERadio|g" \ + -e "s|([^a-zA-Z0-9]\|^)KSelect|\1TDESelect|g" \ + -e "s|([^a-zA-Z0-9]\|^)KList|\1TDEList|g" \ + -e "s|([^a-zA-Z0-9]\|^)KRecent|\1TDERecent|g" \ + -e "s|([^a-zA-Z0-9]\|^)KFont|\1TDEFont|g" \ + -e "s|([^a-zA-Z0-9]\|^)KPaste|\1TDEPaste|g" \ + -e "s|([^a-zA-Z0-9]\|^)klaunch|\1tdelaunch|g" \ + -e "s|([^a-zA-Z0-9]\|^)kshort|\1tdeshort|g" \ + -e "s|([^a-zA-Z0-9]\|^)kstdaccel|\1tdestdaccel|g" \ + -e "s|([^a-zA-Z0-9]\|^)kaccel|\1tdeaccel|g" \ + -e "s|([^a-zA-Z0-9]\|^)kaction|\1tdeaction|g" \ + -e "s|([^a-zA-Z0-9]\|^)kmain|\1tdemain|g" \ + -e "s|([^a-zA-Z0-9]\|^)ktool|\1tdetool|g" \ + -e "s|([^a-zA-Z0-9]\|^)kpopup|\1tdepopup|g" \ + -e "s|([^a-zA-Z0-9]\|^)ktoggle|\1tdetoggle|g" \ + -e "s|([^a-zA-Z0-9]\|^)kradio|\1tderadio|g" \ + -e "s|([^a-zA-Z0-9]\|^)kselect|\1tdeselect|g" \ + -e "s|([^a-zA-Z0-9]\|^)klist|\1tdelist|g" \ + -e "s|([^a-zA-Z0-9]\|^)krecent|\1tderecent|g" \ + -e "s|([^a-zA-Z0-9]\|^)kfont|\1tdefont|g" \ + -e "s|([^a-zA-Z0-9]\|^)kpaste|\1tdepaste|g" \ + -e "s|([^a-zA-Z0-9]\|^)kdisplay|\1tdedisplay|g" \ + \ + -e "s|([^a-zA-Z0-9]\|^)KStyle|\1TDEStyle|g" \ + -e "s|([^a-zA-Z0-9]\|^)KIcon|\1TDEIcon|g" \ + -e "s|([^a-zA-Z0-9]\|^)KZone|\1TDEZone|g" \ + -e "s|([^a-zA-Z0-9]\|^)KCrash|\1TDECrash|g" \ + -e "s|([^a-zA-Z0-9]\|^)KCmd|\1TDECmd|g" \ + -e "s|([^a-zA-Z0-9]\|^)KAbout|\1TDEAbout|g" \ + -e "s|([^a-zA-Z0-9]\|^)KComp|\1TDEComp|g" \ + -e "s|([^a-zA-Z0-9]\|^)KGlobal|\1TDEGlobal|g" \ + -e "s|([^a-zA-Z0-9]\|the\|^)KProcess|\1TDEProcess|g" \ + -e "s|([^a-zA-Z0-9]\|^)KClipboard|\1TDEClipboard|g" \ + -e "s|([^a-zA-Z0-9]\|^)Kwallet|\1TDEwallet|g" \ + -e "s|([^a-zA-Z0-9]\|^)KWallet|\1TDEWallet|g" \ + -e "s|([^a-zA-Z0-9]\|^)KWALLET|\1TDEWALLET|g" \ + -e "s|([^a-zA-Z0-9]\|^)KDEsu|\1TDEsu|g" \ + \ + -e "s|([^a-zA-Z0-9]\|^)kcompletionbox|\1tdecompletionbox|g" \ + \ + -e "s|([^a-zA-Z0-9]\|^)kaboutapplication\.|\1tdeaboutapplication.|g" \ + -e "s|([^a-zA-Z0-9]\|^)kaboutdata\.|\1tdeaboutdata.|g" \ + -e "s|([^a-zA-Z0-9]\|^)kaboutdialog\.|\1tdeaboutdialog.|g" \ + -e "s|([^a-zA-Z0-9]\|^)kaboutkde\.|\1tdeabouttde.|g" \ + -e "s|([^a-zA-Z0-9]\|^)kcmdlineargs\.|\1tdecmdlineargs.|g" \ + -e "s|([^a-zA-Z0-9]\|^)kapplication\.|\1tdeapplication.|g" \ + -e "s|([^a-zA-Z0-9]\|^)kstyle\.|\1tdestyle.|g" \ + -e "s|([^a-zA-Z0-9]\|^)drawKStylePrimitive|\1drawTDEStylePrimitive|g" \ + \ + -e "s|([^a-zA-Z0-9]\|^)kdiroperator\.|\1tdediroperator.|g" \ + -e "s|([^a-zA-Z0-9]\|^)klocale\.|\1tdelocale.|g" \ + -e "s|([^a-zA-Z0-9]\|^)kmessagebox\.|\1tdemessagebox.|g" \ + -e "s|([^a-zA-Z0-9]\|^)ktempfile\.|\1tdetempfile.|g" \ + -e "s|([^a-zA-Z0-9]\|^)kemailsettings\.|\1tdeemailsettings.|g" \ + -e "s|([^a-zA-Z0-9]\|^)kglobal\.|\1tdeglobal.|g" \ + -e "s|([^a-zA-Z0-9]\|^)kglobalsettings\.|\1tdeglobalsettings.|g" \ + -e "s|([^a-zA-Z0-9]\|^)kmenubar\.|\1tdemenubar.|g" \ + -e "s|([^a-zA-Z0-9]\|^)kprotocolmanager\.|\1tdeprotocolmanager.|g" \ + -e "s|([^a-zA-Z0-9]\|^)kstartupinfo\.|\1tdestartupinfo.|g" \ + -e "s|([^a-zA-Z0-9]\|-l\|lib\|^)kabc|\1tdeabc|g" \ + -e "s|([^a-zA-Z0-9]\|^)makekdewidgets|\1maketdewidgets|g" \ + -e "s|([^a-zA-Z0-9]\|^)MAKEKDEWIDGETS|\1MAKETDEWIDGETS|g" \ + -e "s|([^a-zA-Z0-9]\|^)kdewidgets|\1tdewidgets|g" \ + -e "s|([^a-zA-Z0-9]\|^)Categories=Qt;KDE|\1Categories=Qt;TDE|g" \ + -e "s|([^a-zA-Z0-9]\|^)X-KDE-|\1X-TDE-|g" \ + \ + \ + -e "s|kde\.org/tdehotnewstuff|kde.org/khotnewstuff|g" \ + -e "s|tdevelop\.org|kdevelop.org|g" \ + -e "s|tdewebdev\.org|kdewebdev.org|g" \ + -e "s|t(develop[a-z_\-]*@[tk]develop\.org)|k\1|g" \ + -e "s|\<tdelistr|klistr|g" \ + -e "s|kde toolbar widget|tde toolbar widget|g" + +# Convert desktop files +find ./ -type f -iname "*.desktop" -not -iwholename '*.git*' -print0 | \ +xargs -r0 sed -i \ + -e '/^Keyword/ { s,\,,;,g }' \ + -e 's/^ServiceTypes=/X-TDE-ServiceTypes=/g' \ + -e 's/^ServiceTypes\[\(.*\)\]=/X-TDE-ServiceTypes\[\1\]=/g' \ + -e 's/^ExcludeServiceTypes=/X-TDE-ExcludeServiceTypes=/g' \ + -e 's/^ExcludeServiceTypes\[\(.*\)\]=/X-TDE-ExcludeServiceTypes\[\1\]=/g' \ + -e 's/^DocPath=/X-DocPath=/g' \ + -e 's/^DocPath\[\(.*\)\]=/X-DocPath\[\1\]=/g' \ + -e 's/^InitialPreference=/X-TDE-InitialPreference=/g' \ + -e 's/^InitialPreference\[\(.*\)\]=/X-TDE-InitialPreference\[\1\]=/g' + +# Rename files +find . -name "kio_*" | while read f; do mv "${f}" "${f/kio_/tdeio_}"; done +find . -name "kio-*" | while read f; do mv "${f}" "${f/kio-/tdeio-}"; done +find . -name "kio.*" | while read f; do mv "${f}" "${f/kio./tdeio.}"; done +find . -name "*.kdevelop" | while read f; do mv "${f}" "${f/.kdevelop/.tdevelop}"; done +find . -name "kdewidgets*" | while read f; do mv "${f}" "${f/kdewidgets/tdewidgets}"; done + +# Update icon names (optional) +$SCRIPTPATH/convert_kde3_icon_names_to_xdg_standards diff --git a/conversions/kde-tde/convert_kde3_icon_names_to_xdg_standards b/conversions/kde-tde/convert_kde3_icon_names_to_xdg_standards new file mode 100755 index 0000000..86000cd --- /dev/null +++ b/conversions/kde-tde/convert_kde3_icon_names_to_xdg_standards @@ -0,0 +1,20 @@ +#!/bin/bash +# +# (c) 2014-2015 Timothy Pearson +# All Rights Reserved +# +# WARNING +# This script is not complete! +# Hand editing will likely be required after running to ensure all icon names have been updated +# See http://trinity.etherpad.trinitydesktop.org/60 for a mapping of old KDE3 names to modern XDG names + +THISSCRIPT=$(readlink -f $0) +if [[ ! -e "$THISSCRIPT" ]]; then + echo "Unable to find myself! Exiting..." + exit 1 +fi +SCRIPTPATH=`dirname $THISSCRIPT` + +$SCRIPTPATH/tde_mimetype_conversion +$SCRIPTPATH/tde_action_conversion +$SCRIPTPATH/tde_device_conversion
\ No newline at end of file diff --git a/conversions/kde-tde/tde_action_conversion b/conversions/kde-tde/tde_action_conversion new file mode 100755 index 0000000..d1c510d --- /dev/null +++ b/conversions/kde-tde/tde_action_conversion @@ -0,0 +1,154 @@ +#!/bin/bash +# +# (c) 2014 Timothy Pearson +# All Rights Reserved +# +# WARNING +# This script is not complete! +# Hand editing will likely be required after running to ensure all icon names have been updated +# See http://trinity.etherpad.trinitydesktop.org/60 for a mapping of old KDE3 names to modern XDG names + +WORKDIR=$PWD + +function rename_files { + echo '#!/bin/bash' > /tmp/rename_action_files + echo '' >> /tmp/rename_action_files + echo 'cd $1' >> /tmp/rename_action_files + echo '' >> /tmp/rename_action_files + echo 'BASEDIR=${PWD##*/}' >> /tmp/rename_action_files + echo "ORIGNAME='$1'" >> /tmp/rename_action_files + echo "NEWNAME='$2'" >> /tmp/rename_action_files + echo '' >> /tmp/rename_action_files + echo 'if [[ "$BASEDIR" == ".git" ]]; then' >> /tmp/rename_action_files + echo ' echo "Ignoring .git directory"' >> /tmp/rename_action_files + echo ' exit 0' >> /tmp/rename_action_files + echo 'fi' >> /tmp/rename_action_files + echo '' >> /tmp/rename_action_files + echo 'ls -d * | sed "s/\(.*\)action-$ORIGNAME\.png\(.*\)$/git mv \"&\" \"\1action-$NEWNAME\.png\2\"/" | grep mv | sh' >> /tmp/rename_action_files + echo 'ls -d * | sed "s/$ORIGNAME\.png\(.*\)$/git mv \"&\" \"$NEWNAME\.png\1\"/" | grep mv | sh' >> /tmp/rename_action_files + chmod 755 /tmp/rename_action_files + + find ./ -type d -exec /tmp/rename_action_files {} \; &> /dev/null + + rm /tmp/rename_action_files +} + +function convert_files { + [ -d ~/tde-git/tde/main ] && \ + cd ~/tde-git/tde/main + + echo "===================================================" + echo "Converting $1..." + + find ./ -type f -iname "*.c*" -not -iwholename '*.git*' -print0 | \ + xargs -r0 grep -ZIl "\(Icon\(Set\|\)( \?\)\"$1\"" | \ + xargs -r0 sed -i "s/\(Icon\(Set\|\)( \?\)\"$1\"/\1\"$2\"/g" + + find ./ -type f -iname "*.ui*" -not -iwholename '*.git*' -print0 | \ + xargs -r0 grep -ZIl "<iconset>\"$1\"" | \ + xargs -r0 sed -i "s/<iconset>\"$1\"/<iconset>\"$2\"/g" + + find ./ -type f -iregex ".*\.\(directory\|desktop\|protocol\)" -not -iwholename '*.git*' -print0 | \ + xargs -r0 grep -ZIl "Icon=$1" | \ + xargs -r0 sed -i "s/Icon=$1/Icon=$2/g" + + find ./ -type f -iname "*.rc" -not -iwholename '*.git*' -print0 | \ + xargs -r0 grep -ZIl "icon=\"$1\"" | \ + xargs -r0 sed -i "s/icon=\"$1\"/icon=\"$2\"/g" + + echo "===================================================" + echo "Renaming $1..." + [ -d $WORKDIR/tdelibs/pics ] && \ + cd $WORKDIR/tdelibs/pics && \ + rename_files $1 $2 + [ -d $WORKDIR/tdeartwork/IconThemes ] && \ + cd $WORKDIR/tdeartwork/IconThemes && \ + rename_files $1 $2 + [ -d $WORKDIR/tdeaccessibility/IconThemes ] && \ + cd $WORKDIR/tdeaccessibility/IconThemes && \ + rename_files $1 $2 + cd $WORKDIR + echo "===================================================" + + echo "Still found in files:" + echo "===================================================" + find . -not -iwholename '*.git*' | xargs grep "\"$1\"" -sl + echo "===================================================" + echo "" +} + +convert_files "previous" "go-previous" +convert_files "next" "go-next" +convert_files "start" "go-first" +convert_files "finish" "go-last" +convert_files "stop" "process-stop" +convert_files "lock" "system-lock-screen" +convert_files "exit" "system-log-out" +convert_files "run" "system-run" +convert_files "up" "go-up" +convert_files "down" "go-down" +convert_files "top" "go-top" +convert_files "bottom" "go-bottom" +convert_files "undo" "edit-undo" +convert_files "redo" "edit-redo" +convert_files "find" "edit-find" +convert_files "revert" "document-revert" +convert_files "filenew" "document-new" +convert_files "fileopen" "document-open" +convert_files "fileprint" "document-print" +convert_files "filequickprint" "document-print-preview" +convert_files "filesave" "document-save" +convert_files "filesaveas" "document-save-as" +convert_files "fileclose" "window-close" +convert_files "editclear" "edit-clear" +convert_files "editcopy" "edit-copy" +convert_files "editcut" "edit-cut" +convert_files "editdelete" "edit-delete" +convert_files "editpaste" "edit-paste" +convert_files "folder_new" "folder-new" +convert_files "gohome" "go-home" +convert_files "mail_forward" "mail-forward" +convert_files "mail_new" "mail-message-new" +convert_files "mail_replyall" "mail-reply-all" +convert_files "mail_reply" "mail-reply-sender" +convert_files "mail_send" "mail-send" +convert_files "player_pause" "media-playback-pause" +convert_files "player_play" "media-playback-start" +convert_files "player_stop" "media-playback-stop" +convert_files "player_rew" "media-seek-backward" +convert_files "player_fwd" "media-seek-forward" +convert_files "player_start" "media-skip-backward" +convert_files "player_end" "media-skip-forward" +convert_files "rotate_ccw" "object-rotate-left" +convert_files "rotate_cw" "object-rotate-right" +convert_files "window_fullscreen" "view-fullscreen" +convert_files "window_nofullscreen" "view-restore" +convert_files "window_new" "window-new" +convert_files "viewmagfit" "zoom-fit-best" +convert_files "viewmag+" "zoom-in" +convert_files "viewmag1" "zoom-original" +convert_files "viewmag-" "zoom-out" +convert_files "unindent" "format-indent-less" +convert_files "indent" "format-indent-more" +convert_files "centrejust" "format-justify-center" +convert_files "leftjust" "format-justify-left" +convert_files "rightjust" "format-justify-right" +convert_files "text_left" "format-text-direction-ltr" +convert_files "text_right" "format-text-direction-rtl" +convert_files "text_bold" "format-text-bold" +convert_files "text_italic" "format-text-italic" +convert_files "text_under" "format-text-underline" +convert_files "text_strike" "format-text-strikethrough" +convert_files "spellcheck" "tools-check-spelling" +convert_files "package_development" "applications-development" +convert_files "package_games" "applications-games" +convert_files "package_graphics" "applications-graphics" +convert_files "package_network" "applications-internet" +convert_files "package_multimedia" "applications-multimedia" +convert_files "package_wordprocessing" "applications-office" +convert_files "edu_science" "applications-science" +convert_files "package_utilities" "applications-utilities" +convert_files "input_devices_settings" "preferences-desktop-peripherals" +convert_files "kcmsystem" "preferences-system" +convert_files "personal" "preferences-desktop-personal" +convert_files "looknfeel" "preferences-desktop" diff --git a/conversions/kde-tde/tde_device_conversion b/conversions/kde-tde/tde_device_conversion new file mode 100755 index 0000000..4004af6 --- /dev/null +++ b/conversions/kde-tde/tde_device_conversion @@ -0,0 +1,141 @@ +#!/bin/bash +# +# (c) 2015 Timothy Pearson +# All Rights Reserved +# +# WARNING +# This script is not complete! +# Hand editing will likely be required after running to ensure all icon names have been updated +# See http://trinity.etherpad.trinitydesktop.org/60 for a mapping of old KDE3 names to modern XDG names + +WORKDIR=$PWD + +function rename_files { + echo '#!/bin/bash' > /tmp/rename_device_files + echo '' >> /tmp/rename_device_files + echo 'cd $1' >> /tmp/rename_device_files + echo '' >> /tmp/rename_device_files + echo 'BASEDIR=${PWD##*/}' >> /tmp/rename_device_files + echo "ORIGNAME='$1'" >> /tmp/rename_device_files + echo "NEWNAME='$2'" >> /tmp/rename_device_files + echo '' >> /tmp/rename_device_files + echo 'if [[ "$BASEDIR" == ".git" ]]; then' >> /tmp/rename_device_files + echo ' echo "Ignoring .git directory"' >> /tmp/rename_device_files + echo ' exit 0' >> /tmp/rename_device_files + echo 'fi' >> /tmp/rename_device_files + echo '' >> /tmp/rename_device_files + echo 'ls -d * | sed "s/\(.*\)device-$ORIGNAME\.png\(.*\)$/git mv \"&\" \"\1device-$NEWNAME\.png\2\"/" | grep mv | sh' >> /tmp/rename_device_files + echo 'ls -d * | sed "s/$ORIGNAME\.png\(.*\)$/git mv \"&\" \"$NEWNAME\.png\1\"/" | grep mv | sh' >> /tmp/rename_device_files + chmod 755 /tmp/rename_device_files + + find ./ -type d -exec /tmp/rename_device_files {} \; &> /dev/null + + rm /tmp/rename_device_files +} + +function convert_files { + [ -d ~/tde-git/tde/main ] && \ + cd ~/tde-git/tde/main + + echo "===================================================" + echo "Converting $1..." + + find ./ -type f -iname "*.c*" -not -iwholename '*.git*' -print0 | \ + xargs -r0 grep -ZIl "\(Icon\(Set\|\)( \?\)\"$1\"" | \ + xargs -r0 sed -i "s/\(Icon\(Set\|\)( \?\)\"$1\"/\1\"$2\"/g" + + find ./ -type f -iname "*.ui*" -not -iwholename '*.git*' -print0 | \ + xargs -r0 grep -ZIl "<iconset>\"$1\"" | \ + xargs -r0 sed -i "s/<iconset>\"$1\"/<iconset>\"$2\"/g" + + find ./ -type f -iregex ".*\.\(directory\|desktop\|protocol\)" -not -iwholename '*.git*' -print0 | \ + xargs -r0 grep -ZIl "Icon=$1" | \ + xargs -r0 sed -i "s/Icon=$1/Icon=$2/g" + + find ./ -type f -iname "*.rc" -not -iwholename '*.git*' -print0 | \ + xargs -r0 grep -ZIl "icon=\"$1\"" | \ + xargs -r0 sed -i "s/icon=\"$1\"/icon=\"$2\"/g" + + echo "===================================================" + echo "Renaming $1..." + [ -d $WORKDIR/tdelibs/pics ] && \ + cd $WORKDIR/tdelibs/pics && \ + rename_files $1 $2 + [ -d $WORKDIR/tdeartwork/IconThemes ] && \ + cd $WORKDIR/tdeartwork/IconThemes && \ + rename_files $1 $2 + [ -d $WORKDIR/tdeaccessibility/IconThemes ] && \ + cd $WORKDIR/tdeaccessibility/IconThemes && \ + rename_files $1 $2 + cd $WORKDIR + echo "===================================================" + + echo "Still found in files:" + echo "===================================================" + find . -not -iwholename '*.git*' | xargs grep "\"$1\"" -sl + echo "===================================================" + echo "" +} + +convert_files "system" "computer" +convert_files "hdd_unmount_encrypt" "drive-harddisk-encrypted" +convert_files "hdd_unmount_decrypt" "drive-harddisk-decrypted" +convert_files "hdd_mount_decrypt" "drive-harddisk-decrypted-mounted" +convert_files "hdd_unmount" "drive-harddisk" +convert_files "hdd_mount" "drive-harddisk-mounted" +convert_files "keyboard" "input-keyboard" +convert_files "mouse" "input-mouse" +convert_files "tablet" "input-tablet" +convert_files "sd_mmc_unmount_encrypt" "media-flash-sd_mmc-encrypted" +convert_files "sd_mmc_unmount_decrypt" "media-flash-sd_mmc-decrypted" +convert_files "sd_mmc_mount_decrypt" "media-flash-sd_mmc-decrypted-mounted" +convert_files "sd_mmc_unmount" "media-flash-sd_mmc" +convert_files "sd_mmc_mount" "media-flash-sd_mmc-mounted" +convert_files "usbpendrive_unmount_encrypt" "media-flash-usb-encrypted" +convert_files "usbpendrive_unmount_decrypt" "media-flash-usb-decrypted" +convert_files "usbpendrive_mount_decrypt" "media-flash-usb-decrypted-mounted" +convert_files "usbpendrive_unmount" "media-flash-usb" +convert_files "usbpendrive_mount" "media-flash-usb-mounted" +convert_files "smart_media_unmount_encrypt" "media-flash-smart_media-encrypted" +convert_files "smart_media_unmount_decrypt" "media-flash-smart_media-decrypted" +convert_files "smart_media_mount_decrypt" "media-flash-smart_media-decrypted-mounted" +convert_files "smart_media_unmount" "media-flash-smart_media" +convert_files "smart_media_mount" "media-flash-smart_media-mounted" +convert_files "memory_stick_unmount_encrypt" "media-flash-memory_stick-encrypted" +convert_files "memory_stick_unmount_decrypt" "media-flash-memory_stick-decrypted" +convert_files "memory_stick_mount_decrypt" "media-flash-memory_stick-decrypted-mounted" +convert_files "memory_stick_unmount" "media-flash-memory_stick" +convert_files "memory_stick_mount" "media-flash-memory_stick-mounted" +convert_files "compact_flash_unmount_encrypt" "media-flash-compact_flash-encrypted" +convert_files "compact_flash_unmount_decrypt" "media-flash-compact_flash-decrypted" +convert_files "compact_flash_mount_decrypt" "media-flash-compact_flash-decrypted-mounted" +convert_files "compact_flash_unmount" "media-flash-compact_flash" +convert_files "compact_flash_mount" "media-flash-compact_flash-mounted" +convert_files "3floppy_unmount" "media-floppy-3_5" +convert_files "3floppy_mount" "media-floppy-3_5-mounted" +convert_files "5floppy_unmount" "media-floppy-5_14" +convert_files "5floppy_mount" "media-floppy-5_14-mounted" +convert_files "zip_unmount" "media-floppy-zip" +convert_files "zip_mount" "media-floppy-zip-mounted" +convert_files "cdrom_unmount_encrypt" "media-optical-cdrom-encrypted" +convert_files "cdrom_unmount_decrypt" "media-optical-cdrom-decrypted" +convert_files "cdrom_mount_decrypt" "media-optical-cdrom-decrypted-mounted" +convert_files "cdrom_unmount" "media-optical-cdrom" +convert_files "cdrom_mount" "media-optical-cdrom-mounted" +convert_files "cdwriter_unmount_encrypt" "media-optical-cdwriter-encrypted" +convert_files "cdwriter_unmount_decrypt" "media-optical-cdwriter-decrypted" +convert_files "cdwriter_mount_decrypt" "media-optical-cdwriter-decrypted-mounted" +convert_files "cdwriter_unmount" "media-optical-cdwriter" +convert_files "cdwriter_mount" "media-optical-cdwriter-mounted" +convert_files "dvd_unmount_encrypt" "media-optical-dvd-encrypted" +convert_files "dvd_unmount_decrypt" "media-optical-dvd-decrypted" +convert_files "dvd_mount_decrypt" "media-optical-dvd-decrypted-mounted" +convert_files "dvd_unmount" "media-optical-dvd" +convert_files "dvd_mount" "media-optical-dvd-mounted" +convert_files "cdaudio_unmount" "media-optical-cdaudio" +convert_files "cdaudio_mount" "media-optical-cdaudio-mounted" +convert_files "tape_unmount" "media-tape" +convert_files "tape_mount" "media-tape-mounted" +convert_files "ipod_unmount" "multimedia-player" +convert_files "ipod_mount" "multimedia-player-mounted" +convert_files "printer1" "printer" diff --git a/conversions/kde-tde/tde_mimetype_conversion b/conversions/kde-tde/tde_mimetype_conversion new file mode 100755 index 0000000..815b815 --- /dev/null +++ b/conversions/kde-tde/tde_mimetype_conversion @@ -0,0 +1,169 @@ +#!/bin/bash +# +# (c) 2014 Timothy Pearson +# All Rights Reserved +# +# WARNING +# This script is not complete! +# Hand editing will likely be required after running to ensure all icon names have been updated +# See http://trinity.etherpad.trinitydesktop.org/60 for a mapping of old KDE3 names to modern XDG names + +WORKDIR=$PWD + +function rename_files { + echo '#!/bin/bash' > /tmp/rename_mime_files + echo '' >> /tmp/rename_mime_files + echo 'cd $1' >> /tmp/rename_mime_files + echo '' >> /tmp/rename_mime_files + echo 'BASEDIR=${PWD##*/}' >> /tmp/rename_mime_files + echo "ORIGNAME='$1'" >> /tmp/rename_mime_files + echo "NEWNAME='$2'" >> /tmp/rename_mime_files + echo '' >> /tmp/rename_mime_files + echo 'if [[ "$BASEDIR" == ".git" ]]; then' >> /tmp/rename_mime_files + echo ' echo "Ignoring .git directory"' >> /tmp/rename_mime_files + echo ' exit 0' >> /tmp/rename_mime_files + echo 'fi' >> /tmp/rename_mime_files + echo '' >> /tmp/rename_mime_files + echo 'ls -d * | sed "s/\(.*\)mime-$ORIGNAME\.png\(.*\)$/git mv \"&\" \"\1mime-$NEWNAME\.png\2\"/" | grep mv | sh' >> /tmp/rename_mime_files + echo 'ls -d * | sed "s/$ORIGNAME\.png\(.*\)$/git mv \"&\" \"$NEWNAME\.png\1\"/" | grep mv | sh' >> /tmp/rename_mime_files + chmod 755 /tmp/rename_mime_files + + find ./ -type d -exec /tmp/rename_mime_files {} \; &> /dev/null + + rm /tmp/rename_mime_files +} + +function convert_files { + [ -d ~/tde-git/tde/main ] && \ + cd ~/tde-git/tde/main + + echo "===================================================" + echo "Converting $1..." + + find ./ -type f -iname "*.c*" -not -iwholename '*.git*' -print0 | \ + xargs -r0 grep -ZIl "\(Icon\(Set\|\)( \?\)\"$1\"" | \ + xargs -r0 sed -i "s/\(Icon\(Set\|\)( \?\)\"$1\"/\1\"$2\"/g" + + find ./ -type f -iname "*.ui*" -not -iwholename '*.git*' -print0 | \ + xargs -r0 grep -ZIl "<iconset>\"$1\"" | \ + xargs -r0 sed -i "s/<iconset>\"$1\"/<iconset>\"$2\"/g" + + find ./ -type f -iregex ".*\.\(directory\|desktop\|protocol\)" -not -iwholename '*.git*' -print0 | \ + xargs -r0 grep -ZIl "Icon=$1" | \ + xargs -r0 sed -i "s/Icon=$1/Icon=$2/g" + + find ./ -type f -iname "*.rc" -not -iwholename '*.git*' -print0 | \ + xargs -r0 grep -ZIl "icon=\"$1\"" | \ + xargs -r0 sed -i "s/icon=\"$1\"/icon=\"$2\"/g" + + echo "===================================================" + echo "Renaming $1..." + [ -d $WORKDIR/tdelibs/pics ] && \ + cd $WORKDIR/tdelibs/pics && \ + rename_files $1 $2 + [ -d $WORKDIR/tdeartwork/IconThemes ] && \ + cd $WORKDIR/tdeartwork/IconThemes && \ + rename_files $1 $2 + [ -d $WORKDIR/tdeaccessibility/IconThemes ] && \ + cd $WORKDIR/tdeaccessibility/IconThemes && \ + rename_files $1 $2 + cd $WORKDIR + echo "===================================================" + + echo "Still found in files:" + echo "===================================================" + find . -not -iwholename '*.git*' | xargs grep "\"$1\"" -sl + echo "===================================================" + echo "" +} + +convert_files "sound" "audio-x-generic" +convert_files "font" "font-x-generic" +convert_files "image" "image-x-generic" +convert_files "html" "text-html" +convert_files "document" "text-x-generic" +convert_files "document2" "text-x-generic-template" +convert_files "shellscript" "text-x-script" +convert_files "video" "video-x-generic" +convert_files "vcard" "x-office-address-book" +convert_files "vcalendar" "x-office-calendar" +convert_files "kword_kwd" "x-office-document" +convert_files "applix" "application-x-applix-word" +convert_files "ascii" "text-vnd\.tde\.ascii" +convert_files "binary" "application-octet-stream" +convert_files "bt" "application-x-bittorrent" +convert_files "cdimage" "application-x-cd-image" +convert_files "cdr" "application-x-cdr" +convert_files "cdtrack" "application-x-cda" +convert_files "colorscm" "application-x-kcsrc" +convert_files "core" "application-x-core" +convert_files "database" "application-vnd\.oasis\.opendocument\.database" +convert_files "deb" "application-x-deb" +convert_files "drawing" "application-vnd\.oasis\.opendocument\.graphics" +convert_files "dvi" "application-x-lyx" +convert_files "empty" "application-x-zerosize" +convert_files "exec" "application-x-executable" +convert_files "exec_wine" "application-x-mswinurl" +convert_files "file_locked" "application-vnd\.tde\.file\.locked" +convert_files "file_temporary" "application-vnd\.tde\.file\.temporary" +convert_files "font_bitmap" "application-x-font-snf" +convert_files "font_truetype" "application-x-font-ttf" +convert_files "font_type1" "application-x-font-type1" +convert_files "gettext" "application-x-gettext" +convert_files "gf" "application-x-tex-gf" +convert_files "info" "application-vnd\.tde\.info" +convert_files "karbon_karbon" "application-x-karbon" +convert_files "kchart_chrt" "application-x-kchart" +convert_files "kexi_kexi" "application-x-kexi" +convert_files "kformula_kfo" "application-x-kformula" +convert_files "kivio_flw" "application-x-kivio" +convert_files "kpresenter_kpr" "application-x-kpresenter" +convert_files "krita_kra" "application-x-krita" +convert_files "kspread_ksp" "application-x-kspread" +convert_files "kugar_kud" "application-x-kugar" +convert_files "log" "text-x-log" +convert_files "make" "text-x-makefile" +convert_files "man" "application-x-troff-man" +convert_files "metafont" "application-x-metafont" +convert_files "midi" "audio-midi" +convert_files "misc" "application-vnd\.tde\.misc" +convert_files "netscape_doc" "application-x-netscape" +convert_files "pdf" "application-pdf" +convert_files "pk" "application-x-tex-pk" +convert_files "postscript" "application-postscript" +convert_files "presentation" "application-vnd\.oasis\.opendocument\.presentation" +convert_files "quicktime" "video-x-quicktime" +convert_files "readme" "text-x-readme" +convert_files "recycled" "application-x-trash" +convert_files "resource" "application-vnd\.tde\.resource" +convert_files "rpm" "application-x-rpm" +convert_files "rtf" "text-rtf" +convert_files "soffice" "application-x-soffice" +convert_files "source_c" "text-x-csrc" +convert_files "source_cpp" "text-x-c++src" +convert_files "source_f" "text-x-fortran" +convert_files "source_h" "text-x-hsrc" +convert_files "source_java" "text-x-java" +convert_files "source_j" "text-x-jsrc" +convert_files "source_l" "text-x-lsrc" +convert_files "source_moc" "text-x-mocsrc" +convert_files "source_o" "text-x-osrc" +convert_files "source_php" "text-x-php" +convert_files "source_pl" "text-x-perl" +convert_files "source" "text-x-src" +convert_files "source_p" "text-x-psrc" +convert_files "source_py" "text-x-python" +convert_files "source_s" "text-x-asm" +convert_files "source_y" "text-x-ysrc" +convert_files "spreadsheet" "application-vnd\.oasis\.opendocument\.spreadsheet" +convert_files "tar" "application-x-tar" +convert_files "tdemultiple" "application-vnd\.tde\.tdemultiple" +convert_files "template_source" "application-vnd\.tde\.template_source" +convert_files "tex" "text-x-tex" +convert_files "tgz" "application-x-tarz" +convert_files "txt2" "application-vnd\.tde\.text\.alt" +convert_files "txt" "text-plain" +convert_files "vectorgfx" "image-svg+xml" +convert_files "widget_doc" "application-x-designer" +convert_files "wordprocessing" "application-vnd\.oasis\.opendocument\.text" +convert_files "zip" "application-vnd\.tde\.overlay\.zip" |