diff --git a/CHANGELOG.md b/CHANGELOG.md index b158d0f..d35e9c0 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,11 +10,25 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p - Refactor application. +## [0.8.0] - 2021-09-02 + +### Added + +- Develop additional `Finder extension` which allows to create a `hard links` for selected folders and files via contextual menu. + +### Changed + +- Change build os version to 10.10. + +### Fixed + +- Fix soft link replace with function. + ## [0.7.0] - 2021-08-22 ### Added -- Added new classes `Path` for working with path's and creating relative path from specified directory. +- Add new classes `Path` for working with path's and creating relative path from specified directory. - Add unit-tests cases for the `Path` class. ### Changed @@ -25,13 +39,13 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p ### Changed -- Changed the activity property of some menu items according to the rule: +- Change the activity property of some menu items according to the rule: - if no object was copied, then the menu items "Paste link to here" an "Move it here and replace with a link" are not active. - if at least one object was not copied, then the menu items "Paste link to here" an "Move it here and replace with a link" are inactive. ### Added -- Added cleaning clipboard after inserting links. +- Add cleaning clipboard after inserting links. ## [0.5.0] - 2021-08-02 diff --git a/README.md b/README.md index e09474a..6d58702 100644 --- a/README.md +++ b/README.md @@ -2,11 +2,11 @@ The Quick Symlink is a `Finder extension` which provides a `contextual menu item` for the symbolic links creation on macOS. -[![status](https://img.shields.io/badge/status-active-active?style=flat-square)](BADGES_GUIDE.md#status) [![version](https://img.shields.io/badge/version-0.6.0-informational?style=flat-square)](BADGES_GUIDE.md#version) [![oss lifecycle](https://img.shields.io/badge/oss_lifecycle-active-important?style=flat-square)](BADGES_GUIDE.md#oss-lifecycle) [![maintenance](https://img.shields.io/badge/maintenance-yes-informational?style=flat-square)](BADGES_GUIDE.md#maintenance) [![last release](https://img.shields.io/badge/last_release-August_22,_2021-informational?style=flat-square)](BADGES_GUIDE.md#release-date) [![last commit](https://img.shields.io/badge/last_commit-August_22,_2021-informational?style=flat-square)](BADGES_GUIDE.md#commit-date) +[![status](https://img.shields.io/badge/status-active-active?style=flat-square)](BADGES_GUIDE.md#status) [![version](https://img.shields.io/badge/version-0.8.0-informational?style=flat-square)](BADGES_GUIDE.md#version) [![oss lifecycle](https://img.shields.io/badge/oss_lifecycle-active-important?style=flat-square)](BADGES_GUIDE.md#oss-lifecycle) [![maintenance](https://img.shields.io/badge/maintenance-yes-informational?style=flat-square)](BADGES_GUIDE.md#maintenance) [![last release](https://img.shields.io/badge/last_release-September_02,_2021-informational?style=flat-square)](BADGES_GUIDE.md#release-date) [![last commit](https://img.shields.io/badge/last_commit-September_02,_2021-informational?style=flat-square)](BADGES_GUIDE.md#commit-date) [![license](https://img.shields.io/badge/license-MIT-informational?style=flat-square)](LICENSE) [![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg?style=flat-square)](CODE_OF_CONDUCT.md) -[![platform](https://img.shields.io/badge/platform-OS_X_10.11+-important?style=flat-square)](https://en.wikipedia.org/wiki/Computing_platform) +[![platform](https://img.shields.io/badge/platform-OS_X_10.10+-important?style=flat-square)](https://en.wikipedia.org/wiki/Computing_platform) --- @@ -55,10 +55,14 @@ This GIF demonstrates how the `Quick Symlink` allows quite simple to copy files ## 🎚 Features - Create a symbolic links in a several clicks via the context menu instead of the terminal promt: - - Select files or folders and create symlink for them. - - Copy files or folders and paste symlink somewhere. + - Select files or folders and create symlinks for them. + - Copy files or folders and paste symlinks somewhere. - Copy files or folders, paste them somewhere, and replace them with symlinks. +- Create a hard links in a several clicks via the context menu instead of the terminal promt: + - Select files or folders and create hard links for them. + - Copy files or folders and paste hard links somewhere. + ### To Do - For more information on an upcoming development, please read the [todo](TODO.md) list. @@ -75,12 +79,12 @@ These instructions allow to get a copy of this project and run it on a local mac Before using it, make sure that follows software are installed on the local machine: -- **[OS X 10.11+](https://www.apple.com/ru/macos/what-is/)** - the operating system under which the extention is executing. +- **[OS X 10.10+](https://www.apple.com/ru/macos/what-is/)** - the operating system under which the extention is executing. If any of the listed programs is not installed, then it can be installed by instruction as described below. -1. #### OS X 10.11+ - - Install macOS 10.11+ by [this](https://support.apple.com/ht201372) instruction. +1. #### OS X 10.10+ + - Install macOS 10.10+ by [this](https://support.apple.com/ht201372) instruction. ### Installing @@ -105,7 +109,9 @@ In order to install it is quite simple to: open quick-symlink.app ``` -4. Open up `System Preferences > Extensions` and enable the extension `quick-symlink`. +4. Open up `System Preferences > Extensions` and enable the follows extensions: + 4.1. `quick-symlink-extension` - for the symlink actions. + 4.2. `hard-link-actions-extension` - for the hard link actions. **Otherwise, it's possible to install and remove the extention using the actual extension bundled into the app.** @@ -113,12 +119,14 @@ In order to install it is quite simple to: ```bash pluginkit -a quick-symlink.app/Contents/PlugIns/quick-symlink-extension.appex/ +pluginkit -a quick-symlink.app/Contents/PlugIns/hard-link-action-extension.appex/ ``` 2. To remove it, run this: ```bash pluginkit -r quick-symlink.app/Contents/PlugIns/quick-symlink-extension.appex/ +pluginkit -r quick-symlink.app/Contents/PlugIns/hard-link-action-extension.appex/ ``` ### Downloading @@ -144,27 +152,44 @@ This tool allows to: Create symlinks in the current directory 1. Select folders or files for which a symbolic link is needed.
2. Call the contextual menu by the right-clicking on selected.
-3. Select menu item `Quick Symlink --> Create symlink for`.
+3. Select menu item `Symlink actions --> Create symlink for`.
Create symlinks in another directory 1. Select folders or files for which a symbolic link is needed.
2. Call the contextual menu by the right-clicking on selected.
-3. Select menu item `Quick Symlink --> Copy path from here`.
+3. Select menu item `Symlink actions --> Copy path from here`.
4. Go to a destination folder.
5. Call the contextual menu by right-clicking on the filder.
-6. Select menu item `Quick Symlink --> Paste to here`.
+6. Select menu item `Symlink actions --> Paste to here`.
Replace objects with symbolic links 1. Select folders or files for which a symbolic link is needed.
2. Call the contextual menu by the right-clicking on selected.
-3. Select menu item `Quick Symlink --> Copy to clipboard`.
+3. Select menu item `Symlink actions --> Copy to clipboard`.
+4. Go to a destination folder.
+5. Call the contextual menu by right-clicking on the filder.
+6. Select menu item `Symlink actions --> Move it here and replace with a link`.
+
+ +
+ Create hard links in the current directory +1. Select folders or files for which a symbolic link is needed.
+2. Call the contextual menu by the right-clicking on selected.
+3. Select menu item `Hard link actions --> Create symlink for`.
+
+ +
+ Create symlinks in another directory +1. Select folders or files for which a symbolic link is needed.
+2. Call the contextual menu by the right-clicking on selected.
+3. Select menu item `Hard link actions --> Copy path from here`.
4. Go to a destination folder.
5. Call the contextual menu by right-clicking on the filder.
-6. Select menu item `Quick Symlink --> Move it here and replace with a link`.
+6. Select menu item `Hard link actions --> Paste to here`.
## 🛠 Built With diff --git a/TODO.md b/TODO.md index a3ffbc5..914d65f 100755 --- a/TODO.md +++ b/TODO.md @@ -7,7 +7,7 @@ - [x] Add the new menu item for creating symlink in a parent directory (parent for target objects). - [x] Optional feature - use relative path instead absolute path in symlink target URL (if target and link located in one volume) - [ ] Refactor code in `commons/*` part and add unit-tests -- [ ] Develop additional `Finder extension` which allows to create a `hard links` for selected folders and files via contextual menu +- [x] Develop additional `Finder extension` which allows to create a `hard links` for selected folders and files via contextual menu - [ ] Develop the action panel for created symbolic links and hard lonks (in the app window): - [ ] a) (if broken) process to browse finder for 'Find/fix missing target' - [ ] b) Modify existing paths and symbolic link features diff --git a/hard-link-action-extension/FinderSync.swift b/hard-link-action-extension/FinderSync.swift index aede09e..6320399 100644 --- a/hard-link-action-extension/FinderSync.swift +++ b/hard-link-action-extension/FinderSync.swift @@ -15,7 +15,6 @@ class FinderSync: FIFinderSync { let copyPathAction = CopyPathAction.init(); let pasteLinkAction = PasteLinkAction.init(fileLinkManager: HardLinkManager.init()); - let replaceWithLinkAction = ReplaceWithLinkAction.init(fileLinkManager: HardLinkManager.init()); let createSymlink = CreateLinkAction.init(fileLinkManager: HardLinkManager.init()); override init() { @@ -93,16 +92,8 @@ class FinderSync: FIFinderSync { ); quickSymlinkMenu.addItem(pastleSymlinkFromClipboardMenuItem); - let replaceFileWithSymlinkFromClipboardMenuItem = NSMenuItem.init( - title: NSLocalizedString("REPLACE_WITH_LINK_ACTION_NAME", comment: ""), - action: #selector(replaceFileWithSymlinkFromClipboard(_:)), - keyEquivalent: "" - ); - quickSymlinkMenu.addItem(replaceFileWithSymlinkFromClipboardMenuItem); - if (NSPasteboard.init(name: NSPasteboard.Name.init(rawValue: "qs")).string(forType: NSPasteboard.PasteboardType.string) ?? "").isEmpty { pastleSymlinkFromClipboardMenuItem.isEnabled = false; - replaceFileWithSymlinkFromClipboardMenuItem.isEnabled = false; } if menuKind.rawValue == 3 { @@ -125,10 +116,6 @@ class FinderSync: FIFinderSync { self.copyPathAction.execute(); } - @IBAction func replaceFileWithSymlinkFromClipboard(_ sender: AnyObject?) { - self.replaceWithLinkAction.execute(); - } - @IBAction func pastleSymlinkFromClipboard(_ sender: AnyObject?) { self.pasteLinkAction.execute(); }