{"id":1991,"date":"2014-07-10T18:52:42","date_gmt":"2014-07-10T14:52:42","guid":{"rendered":"http:\/\/sandalov.org\/blog\/?p=1991"},"modified":"2014-07-11T15:57:10","modified_gmt":"2014-07-11T11:57:10","slug":"%d1%80%d0%b0%d0%b7%d0%bc%d0%b5%d1%89%d0%b5%d0%bd%d0%b8%d0%b5-%d1%84%d0%be%d1%82%d0%be%d0%b3%d1%80%d0%b0%d1%84%d0%b8%d0%b9-%d0%bf%d0%be-%d0%b4%d0%b0%d1%82%d0%b5-%d1%81%d1%8a%d1%91%d0%bc%d0%ba%d0%b8","status":"publish","type":"post","link":"https:\/\/sandalov.org\/blog\/1991\/","title":{"rendered":"\u0420\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u0444\u043e\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0439 \u043f\u043e \u0434\u0430\u0442\u0435 \u0441\u044a\u0451\u043c\u043a\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Imagemagick \u0438 Bash"},"content":{"rendered":"<div class=\"2d836d85a73757df15d0de19d7bef594\" data-index=\"1\" style=\"float: none; margin:10px 0 10px 0; text-align:center;\">\n<script type=\"text\/javascript\"><!--\r\ngoogle_ad_client = \"ca-pub-2287684400845931\";\r\n\/* valerymorozov *\/\r\ngoogle_ad_slot = \"5606708872\";\r\ngoogle_ad_width = 728;\r\ngoogle_ad_height = 90;\r\n\/\/-->\r\n<\/script>\r\n<script type=\"text\/javascript\"\r\nsrc=\"http:\/\/pagead2.googlesyndication.com\/pagead\/show_ads.js\">\r\n<\/script>\n<\/div>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n#!\/bin\/bash\r\n# Goes through all jpeg files in current directory, grabs date from each\r\n# and sorts them into subdirectories according to the date\r\n# Creates subdirectories corresponding to the dates as necessary.\r\n# Moves mov files by file creation date.\r\n\r\n# sudo apt-get install imagemagick\r\nfor fil in *.JPG\r\ndo\r\n    datepath=&quot;$(identify -verbose $fil | grep DateTimeOri | awk '{print $2 }' | sed s%:%%g)&quot;\r\n    if ! test -e &quot;$datepath&quot;; then\r\n        mkdir -pv &quot;$datepath&quot;\r\n    fi\r\n\r\n    mv -v $fil $datepath\r\ndone\r\n\r\nfor mov in *.MOV\r\ndo\r\n    datepath=&quot;$(stat $mov | grep Modify | awk '{print $2}' | sed s%-%%g)&quot;\r\n    if ! test -e &quot;$datepath&quot;; then\r\n        mkdir -pv &quot;$datepath&quot;\r\n    fi\r\n\r\n    mv -v $mov $datepath\r\ndone\r\n<\/pre>\n<p>Credits: <a href=\"http:\/\/www.linuxjournal.com\/content\/tech-tip-automaticaly-organize-your-photos-date\" target=\"_blank\">linuxjournal<\/a><\/p>\n<div class=\"2d836d85a73757df15d0de19d7bef594\" data-index=\"1\" style=\"float: none; margin:10px 0 10px 0; text-align:center;\">\n<script type=\"text\/javascript\"><!--\r\ngoogle_ad_client = \"ca-pub-2287684400845931\";\r\n\/* valerymorozov *\/\r\ngoogle_ad_slot = \"5606708872\";\r\ngoogle_ad_width = 728;\r\ngoogle_ad_height = 90;\r\n\/\/-->\r\n<\/script>\r\n<script type=\"text\/javascript\"\r\nsrc=\"http:\/\/pagead2.googlesyndication.com\/pagead\/show_ads.js\">\r\n<\/script>\n<\/div>\n\n<div style=\"font-size: 0px; height: 0px; line-height: 0px; margin: 0; padding: 0; clear: both;\"><\/div>","protected":false},"excerpt":{"rendered":"<p>#!\/bin\/bash # Goes through all jpeg files in current directory, grabs date from each # and sorts them into subdirectories according to the date # Creates subdirectories corresponding to the dates as necessary. # Moves mov files by file creation date. # sudo apt-get install imagemagick for fil in *.JPG &hellip; <a class=\"continue-reading-link\" href=\"https:\/\/sandalov.org\/blog\/1991\/\"> Continue reading <span class=\"meta-nav\">&rarr; <\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1],"tags":[64,196],"class_list":["post-1991","post","type-post","status-publish","format-standard","hentry","category-unsorted","tag-bash","tag-imagemagick"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/sandalov.org\/blog\/wp-json\/wp\/v2\/posts\/1991","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sandalov.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sandalov.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sandalov.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sandalov.org\/blog\/wp-json\/wp\/v2\/comments?post=1991"}],"version-history":[{"count":5,"href":"https:\/\/sandalov.org\/blog\/wp-json\/wp\/v2\/posts\/1991\/revisions"}],"predecessor-version":[{"id":1996,"href":"https:\/\/sandalov.org\/blog\/wp-json\/wp\/v2\/posts\/1991\/revisions\/1996"}],"wp:attachment":[{"href":"https:\/\/sandalov.org\/blog\/wp-json\/wp\/v2\/media?parent=1991"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sandalov.org\/blog\/wp-json\/wp\/v2\/categories?post=1991"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sandalov.org\/blog\/wp-json\/wp\/v2\/tags?post=1991"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}