{"id":237,"date":"2009-07-07T01:32:05","date_gmt":"2009-07-07T08:32:05","guid":{"rendered":"http:\/\/sp2hari.com\/?p=237"},"modified":"2020-06-20T08:31:15","modified_gmt":"2020-06-20T08:31:15","slug":"save-before-save-gedit-plugin","status":"publish","type":"post","link":"https:\/\/sp2hari.com\/index.php\/2009\/07\/07\/save-before-save-gedit-plugin\/","title":{"rendered":"Save Before Save &#8211; Gedit Plugin"},"content":{"rendered":"<p>A few days back, I got a mail from my friend, saying,<\/p>\n<p><em>Subject: Versioning in Windows<br \/>\nHi guys,<\/em><\/p>\n<p><em>Does any one know a software that can version files in windows?<br \/>\nAs simple as: There&#8217;s a certain folder of files I want to be &#8220;version&#8221; tracked, I specify the list of folders.<br \/>\nAfter this, every change I make is time-archived. So later, I can say, how did it look exactly at 3:47 am on Monday, and I get it back.<\/p>\n<p>Any one has seen any s\/w that can do this for me today?<br \/>\nPerhaps something like this, but more frequent: http:\/\/www.apple.com\/timecapsule\/backup.html<br \/>\nI remember having one like this within Google for Linux. I have a feeling they built this in the file system from scratch.<\/p>\n<p><\/em><em>Thanks,<br \/>\n<\/em><\/p>\n<p>I  replied to him about some windows software I found after some googling and also found out that there is a file system in Linux which can perform this. But changing the file system of a current system sounded &#8220;dangerous&#8221; to me. I didn&#8217;t explore much into it. I use gedit for almost all development in my machine and started wondering how hard or easy can it be to create a gedit plugin which can do this.<\/p>\n<p>That resulted in the following plugin.<\/p>\n<p><strong>Installation instructions. <\/strong><\/p>\n<p>1. Download the latest plugin file from <a href=\"http:\/\/sp2hari.com\/work\/saveb4save-1.0.0.zip\">here<\/a>.<br \/>\n2. Extract the files and copy the two files to ~\/.gnome2\/gedit\/plugins<br \/>\n3. Open gedit and enable the plugin.<br \/>\n4. For the first time, configure the path where you need the backups to be stored.<\/p>\n<p><strong>TODO<\/strong><br \/>\n1. This is a 2 hour hack. Gedit plugin&#8217;s coding convention standards (if there is anything) is not followed.<br \/>\n2. The time taken to save might increase if there are too many backup files. \/\/TODO for next version.<br \/>\n3. A neat GUI to show the diff and all the saved versions in the backup folder.<br \/>\n4. An option to save diffs or the full text.<br \/>\n5. Format of the filename can be provided as an option to the user.<\/p>\n<p>Hope you like the plugin. Please fill in your feedback as comments to this post.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A few days back, I got a mail from my friend, saying, Subject: Versioning in Windows Hi guys, Does any one know a software that can version files in windows? As simple as: There&#8217;s a certain folder of files I want to be &#8220;version&#8221; tracked, I specify the list of &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13],"tags":[],"class_list":["post-237","post","type-post","status-publish","format-standard","hentry","category-code"],"_links":{"self":[{"href":"https:\/\/sp2hari.com\/index.php\/wp-json\/wp\/v2\/posts\/237","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sp2hari.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sp2hari.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sp2hari.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sp2hari.com\/index.php\/wp-json\/wp\/v2\/comments?post=237"}],"version-history":[{"count":6,"href":"https:\/\/sp2hari.com\/index.php\/wp-json\/wp\/v2\/posts\/237\/revisions"}],"predecessor-version":[{"id":1361,"href":"https:\/\/sp2hari.com\/index.php\/wp-json\/wp\/v2\/posts\/237\/revisions\/1361"}],"wp:attachment":[{"href":"https:\/\/sp2hari.com\/index.php\/wp-json\/wp\/v2\/media?parent=237"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sp2hari.com\/index.php\/wp-json\/wp\/v2\/categories?post=237"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sp2hari.com\/index.php\/wp-json\/wp\/v2\/tags?post=237"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}