{"id":645,"date":"2012-01-18T19:20:47","date_gmt":"2012-01-18T18:20:47","guid":{"rendered":"http:\/\/blog.soton.ac.uk\/depositmo\/?p=645"},"modified":"2012-01-18T19:20:47","modified_gmt":"2012-01-18T18:20:47","slug":"watch-folder-deposit-tool","status":"publish","type":"post","link":"https:\/\/blog.soton.ac.uk\/depositmo\/2012\/01\/18\/watch-folder-deposit-tool\/","title":{"rendered":"Watch Folder deposit tool"},"content":{"rendered":"<p>Having previously looked at the Word Add-in deposit tool, this post illustrates the second of the deposit tools developed in the DepositMO project, the Watch Folder, which uses common file manager services.<\/p>\n<p>Computer systems provide users with file manager tools, such as Windows Explorer or Mac Finder. This organises lists of files, and folders containing files, stored on the computer. Mostly these are fairly static services. Users can save files to designated directories and folders, and can move and copy files to different locations using short-cut keys of drag-and-drop.<\/p>\n<p>We want to make use of this process of copy or drag-and-drop to initiate repository deposit. It works on the basis of a \u2018watch folder\u2019. Essentially this folder contains a script that monitors user actions in adding files or folders to the directory containing the watch folder. Figure 1 shows the active directory containing the watch folder, and also the script that runs when you click on the watch folder.<\/p>\n<p style=\"text-align: center\"><a href=\"http:\/\/blog.soton.ac.uk\/depositmo\/files\/2012\/01\/depMOfolder-watchfolder-crop.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-647\" src=\"http:\/\/blog.soton.ac.uk\/depositmo\/files\/2012\/01\/depMOfolder-watchfolder-crop-1024x597.png\" alt=\"\" width=\"553\" height=\"322\" srcset=\"https:\/\/blog.soton.ac.uk\/depositmo\/files\/2012\/01\/depMOfolder-watchfolder-crop-1024x597.png 1024w, https:\/\/blog.soton.ac.uk\/depositmo\/files\/2012\/01\/depMOfolder-watchfolder-crop-300x175.png 300w, https:\/\/blog.soton.ac.uk\/depositmo\/files\/2012\/01\/depMOfolder-watchfolder-crop.png 1283w\" sizes=\"auto, (max-width: 553px) 100vw, 553px\" \/><\/a><\/p>\n<p>Fig.1 Active directory containing the Watch Folder script<\/p>\n<p>When a new file is added to the directory containing the watch folder the script initiates a session with the selected repository and copies the file there as well. To complete this process the general script needs some information from the user, the same information used in the Word Add-in example:<\/p>\n<ul>\n<li>Direction, or url, for the repository<\/li>\n<li>User login for the repository<\/li>\n<\/ul>\n<p>This information is provided via a simple text form that is launched by clicking on the CONFIG file in the same directory (see Figure 2). This information only needs to be provided once per user per session with the script running, not for each new file deposit.<\/p>\n<p style=\"text-align: center\"><a href=\"http:\/\/blog.soton.ac.uk\/depositmo\/files\/2012\/01\/depMOfolder-configfile-crop.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-649\" src=\"http:\/\/blog.soton.ac.uk\/depositmo\/files\/2012\/01\/depMOfolder-configfile-crop-1024x656.png\" alt=\"\" width=\"553\" height=\"355\" srcset=\"https:\/\/blog.soton.ac.uk\/depositmo\/files\/2012\/01\/depMOfolder-configfile-crop-1024x656.png 1024w, https:\/\/blog.soton.ac.uk\/depositmo\/files\/2012\/01\/depMOfolder-configfile-crop-300x192.png 300w, https:\/\/blog.soton.ac.uk\/depositmo\/files\/2012\/01\/depMOfolder-configfile-crop.png 1110w\" sizes=\"auto, (max-width: 553px) 100vw, 553px\" \/><\/a><\/p>\n<p>Fig. 2 Opening the Watch Folder CONGIG file to specify repository direction and user&#8217;s repository login<\/p>\n<p>The watch folder \u2018watches\u2019 for changes to all folders in the directory. When a user adds a new file to a \u2018watched\u2019 folder, either a new or existing folder in the active directory,\u00a0within a few seconds the script automatically adds two new files (Figure 3): METADATA, and VIEW_ITEM.<\/p>\n<p style=\"text-align: center\"><a href=\"http:\/\/blog.soton.ac.uk\/depositmo\/files\/2012\/01\/depMOfolder-meta-view-crop.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-650\" src=\"http:\/\/blog.soton.ac.uk\/depositmo\/files\/2012\/01\/depMOfolder-meta-view-crop.png\" alt=\"\" width=\"500\" height=\"423\" srcset=\"https:\/\/blog.soton.ac.uk\/depositmo\/files\/2012\/01\/depMOfolder-meta-view-crop.png 833w, https:\/\/blog.soton.ac.uk\/depositmo\/files\/2012\/01\/depMOfolder-meta-view-crop-300x253.png 300w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/a><\/p>\n<p>Fig.3 Adding a new file to a &#8216;watched&#8217; folder generates a METADATA file and a VIEW_ITEM link file<\/p>\n<p>Clicking on METADATA shows an XML copy of the metadata record for the object (content of folder and files) stored in the repository. The user can edit and save the XML record to update the metadata in the repository.<\/p>\n<p>Clicking on VIEW_ITEM will link the user to the real repository record in a Web browser.<\/p>\n<p>In this scheme, a folder in the active directory containing the watch folder represents a record in the repository, and a file in that folder represents an object linked from that record. Thus, folders can be used to organise collections in the repository, for example, adding two images to a folder will link both images to the same repository record. Hence, creating a new folder will correspond to a new record in the repository; an existing folder to a current record.<\/p>\n<p>You can download the Watch Folder script (folder sync client) from our\u00a0<a href=\"http:\/\/www.eprints.org\/depositmo\/\" target=\"_self\">collected project resources<\/a>. Note, this is not a formally packaged application for easy installation, unless you are comfortable working with perl scripts. For the brave a short &#8216;getting started&#8217; guide can be found close to the download link for the script.<\/p>\n<p>In principle, this was designed to be a simple way to deposit any file in a repository using basic drag-and-drop and copy commands, and add\/update metadata, on the user desktop. Would it prove to be as simple in practice?<\/p>\n<p>The Watch Folder and Word-Add-in are the two user-facing tools developed in DepositMO, but to work effectively these tools need to communicate interactively with repository servers, or repository &#8216;endpoints&#8217; as they are known in the SWORD community. It is SWORDv2 that enables this communication between endpoints and user applications. The next three posts will consider SWORDv2 and how DepositMO has shaped and extended this standard for different repository softwares, DSpace and EPrints.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Having previously looked at the Word Add-in deposit tool, this post illustrates the second of the deposit tools developed in the DepositMO project, the Watch Folder, which uses common file manager services. Computer systems provide users with file manager tools, such as Windows Explorer or Mac Finder. This organises lists of files, and folders containing [&hellip;]<\/p>\n","protected":false},"author":25,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[439,332,334,143,438,15645],"class_list":["post-645","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-deposit-interface","tag-depositmo","tag-inf11","tag-jisc","tag-user-interface","tag-watch-folder"],"_links":{"self":[{"href":"https:\/\/blog.soton.ac.uk\/depositmo\/wp-json\/wp\/v2\/posts\/645","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.soton.ac.uk\/depositmo\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.soton.ac.uk\/depositmo\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.soton.ac.uk\/depositmo\/wp-json\/wp\/v2\/users\/25"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.soton.ac.uk\/depositmo\/wp-json\/wp\/v2\/comments?post=645"}],"version-history":[{"count":19,"href":"https:\/\/blog.soton.ac.uk\/depositmo\/wp-json\/wp\/v2\/posts\/645\/revisions"}],"predecessor-version":[{"id":804,"href":"https:\/\/blog.soton.ac.uk\/depositmo\/wp-json\/wp\/v2\/posts\/645\/revisions\/804"}],"wp:attachment":[{"href":"https:\/\/blog.soton.ac.uk\/depositmo\/wp-json\/wp\/v2\/media?parent=645"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.soton.ac.uk\/depositmo\/wp-json\/wp\/v2\/categories?post=645"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.soton.ac.uk\/depositmo\/wp-json\/wp\/v2\/tags?post=645"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}