From 2548f4331d7e67b61400761a0f17642a91a6e0de Mon Sep 17 00:00:00 2001 From: FreeSlave Date: Tue, 19 Apr 2016 00:29:13 +0300 Subject: [PATCH] Rename all examples --- README.md | 24 +++++++++---------- dub.json | 2 +- examples/{desktoputil => shoot}/.gitignore | 0 examples/{desktoputil => shoot}/dub.json | 5 ++-- .../dub.selections.json | 0 examples/{shootdesktop => shoot}/source/app.d | 0 examples/{shootdesktop => util}/.gitignore | 0 examples/{shootdesktop => util}/dub.json | 5 ++-- .../dub.selections.json | 0 examples/{desktoputil => util}/source/app.d | 0 10 files changed, 17 insertions(+), 19 deletions(-) rename examples/{desktoputil => shoot}/.gitignore (100%) rename examples/{desktoputil => shoot}/dub.json (69%) rename examples/{desktoputil => shoot}/dub.selections.json (100%) rename examples/{shootdesktop => shoot}/source/app.d (100%) rename examples/{shootdesktop => util}/.gitignore (100%) rename examples/{shootdesktop => util}/dub.json (68%) rename examples/{shootdesktop => util}/dub.selections.json (100%) rename examples/{desktoputil => util}/source/app.d (100%) diff --git a/README.md b/README.md index db0f62a..66de989 100644 --- a/README.md +++ b/README.md @@ -119,39 +119,39 @@ catch (IniLikeException e) { //Parsing error - file is not desktop file or has e ## Examples -### [Desktop util](examples/desktoputil/source/app.d) +### [Desktop util](examples/util/source/app.d) Utility that can parse, execute and rewrites .desktop files. This will start vlc with the first parameter set to $HOME/Music: - dub run :desktoputil -- exec /usr/share/applications/vlc.desktop $HOME/Music + dub run :util -- exec /usr/share/applications/vlc.desktop $HOME/Music This should start command line application in terminal emulator (will be detected automatically): - dub run :desktoputil -- exec /usr/share/applications/python2.7.desktop + dub run :util -- exec /usr/share/applications/python2.7.desktop Additional application actions are supported too: - dub run :desktoputil -- exec /usr/share/applications/steam.desktop --action=Settings + dub run :util -- exec /usr/share/applications/steam.desktop --action=Settings Open link with preferred application: - dub run :desktoputil -- link /usr/share/desktop-base/debian-homepage.desktop + dub run :util -- link /usr/share/desktop-base/debian-homepage.desktop Starts .desktop file defined executable or opens link: - dub run :desktoputil -- start /path/to/file.desktop + dub run :util -- start /path/to/file.desktop Parse and write .desktop file to new location (to testing purposes): - dub run :desktoputil -- write /usr/share/applications/vlc.desktop $HOME/Desktop/vlc.desktop + dub run :util -- write /usr/share/applications/vlc.desktop $HOME/Desktop/vlc.desktop Read basic information about desktop file: - dub run :desktoputil -- read /usr/share/applications/kde4/kate.desktop + dub run :util -- read /usr/share/applications/kde4/kate.desktop -### [Desktop test](examples/desktoptest/source/app.d) +### [Desktop test](examples/test/source/app.d) Parses all .desktop files in system's applications paths (usually /usr/local/share/applicatons and /usr/share/applications) and on the user's Desktop. Writes errors (if any) to stderr. @@ -172,9 +172,9 @@ Example using cmd on Windows (KDE installed): set KDE_SHARE="%SYSTEMDRIVE%\ProgramData\KDE\share" dub run :test -- %KDE_SHARE%\applications %KDE_SHARE%\templates %KDE_SHARE%\desktop-directories %KDE_SHARE%\autostart -### [Shoot desktop file](examples/shootdesktop/source/app.d) +### [Shoot desktop file](examples/shoot/source/app.d) Uses the alternative way of starting desktop file. Instead of constructing DesktopFile object it just starts the application or opens link after read enough information from file. - dub run :shootdesktop -- $HOME/Desktop/vlc.desktop - dub run :shootdesktop -- /usr/share/applications/python2.7.desktop + dub run :shoot -- $HOME/Desktop/vlc.desktop + dub run :shoot -- /usr/share/applications/python2.7.desktop diff --git a/dub.json b/dub.json index 1312556..6c752c2 100644 --- a/dub.json +++ b/dub.json @@ -12,5 +12,5 @@ "targetPath" : "lib", "targetType" : "library", - "subPackages" : ["./examples/test", "./examples/desktoputil", "./examples/shootdesktop"] + "subPackages" : ["./examples/test", "./examples/util", "./examples/shoot"] } diff --git a/examples/desktoputil/.gitignore b/examples/shoot/.gitignore similarity index 100% rename from examples/desktoputil/.gitignore rename to examples/shoot/.gitignore diff --git a/examples/desktoputil/dub.json b/examples/shoot/dub.json similarity index 69% rename from examples/desktoputil/dub.json rename to examples/shoot/dub.json index 5c0d231..9fd6d86 100644 --- a/examples/desktoputil/dub.json +++ b/examples/shoot/dub.json @@ -1,5 +1,5 @@ { - "name": "desktoputil", + "name": "shoot", "description": "A minimal D application.", "copyright": "Copyright © 2015, freeslave", "authors": ["freeslave"], @@ -7,6 +7,5 @@ "desktopfile" : "*" }, "targetPath" : "bin", - "targetType" : "executable", - "targetName" : "desktoputil", + "targetType" : "executable" } diff --git a/examples/desktoputil/dub.selections.json b/examples/shoot/dub.selections.json similarity index 100% rename from examples/desktoputil/dub.selections.json rename to examples/shoot/dub.selections.json diff --git a/examples/shootdesktop/source/app.d b/examples/shoot/source/app.d similarity index 100% rename from examples/shootdesktop/source/app.d rename to examples/shoot/source/app.d diff --git a/examples/shootdesktop/.gitignore b/examples/util/.gitignore similarity index 100% rename from examples/shootdesktop/.gitignore rename to examples/util/.gitignore diff --git a/examples/shootdesktop/dub.json b/examples/util/dub.json similarity index 68% rename from examples/shootdesktop/dub.json rename to examples/util/dub.json index 805f640..8b6ed8d 100644 --- a/examples/shootdesktop/dub.json +++ b/examples/util/dub.json @@ -1,5 +1,5 @@ { - "name": "shootdesktop", + "name": "util", "description": "A minimal D application.", "copyright": "Copyright © 2015, freeslave", "authors": ["freeslave"], @@ -7,6 +7,5 @@ "desktopfile" : "*" }, "targetPath" : "bin", - "targetType" : "executable", - "targetName" : "shootdesktop", + "targetType" : "executable" } diff --git a/examples/shootdesktop/dub.selections.json b/examples/util/dub.selections.json similarity index 100% rename from examples/shootdesktop/dub.selections.json rename to examples/util/dub.selections.json diff --git a/examples/desktoputil/source/app.d b/examples/util/source/app.d similarity index 100% rename from examples/desktoputil/source/app.d rename to examples/util/source/app.d