Added sortimage function.

This commit is contained in:
2018-08-12 19:55:03 +02:00
parent c8bd28c5ff
commit c350af00e7
2 changed files with 43 additions and 5 deletions
+7 -4
View File
@@ -31,6 +31,8 @@ values."
;; List of configuration layers to load. ;; List of configuration layers to load.
dotspacemacs-configuration-layers dotspacemacs-configuration-layers
'( '(
markdown
markdown
swift swift
python python
;; ---------------------------------------------------------------- ;; ----------------------------------------------------------------
@@ -316,7 +318,8 @@ package is loaded, you should place your code here."
(global-set-key "\C-cc" 'org-capture) (global-set-key "\C-cc" 'org-capture)
(global-set-key "\C-cb" 'org-iswitchb) (global-set-key "\C-cb" 'org-iswitchb)
(custom-set-variables (custom-set-variables
'(org-agenda-files (quote ("~/Documents/docs-private/orgmode/org-mode.org"))) '(org-agenda-files (list "~/Documents/docs-private/orgmode/org-mode.org"
"~/Documents/docs-sm/organisation/projekte/projects.org")))
'(org-enable-priority-commands t) '(org-enable-priority-commands t)
'(org-highest-priority ?A) '(org-highest-priority ?A)
'(org-lowest-priority ?Z) '(org-lowest-priority ?Z)
@@ -324,8 +327,8 @@ package is loaded, you should place your code here."
) )
(setq org-agenda-log-mode-items '(closed)) (setq org-agenda-log-mode-items '(closed))
(setq org-agenda-custom-commands (setq org-agenda-custom-commands
'(("b" "Purchases list" tags-todo "BUY")) '(("b" "Purchases List" tags-todo "BUY")
) ("h" "Home Todo List" tags "HOME"))
) )
) )
@@ -350,7 +353,7 @@ package is loaded, you should place your code here."
'(org-lowest-priority 90) '(org-lowest-priority 90)
'(package-selected-packages '(package-selected-packages
(quote (quote
(swift3-mode swift-mode org-projectile org-category-capture org-present org-pomodoro alert log4e gntp org-mime org-download htmlize gnuplot yapfify pyvenv pytest pyenv-mode py-isort pip-requirements live-py-mode hy-mode dash-functional helm-pydoc cython-mode anaconda-mode pythonic ws-butler winum which-key volatile-highlights vi-tilde-fringe uuidgen use-package toc-org spaceline powerline restart-emacs request rainbow-delimiters popwin persp-mode pcre2el paradox spinner org-plus-contrib org-bullets open-junk-file neotree move-text macrostep lorem-ipsum linum-relative link-hint indent-guide hydra hungry-delete hl-todo highlight-parentheses highlight-numbers parent-mode highlight-indentation helm-themes helm-swoop helm-projectile helm-mode-manager helm-make projectile pkg-info epl helm-flx helm-descbinds helm-ag google-translate golden-ratio flx-ido flx fill-column-indicator fancy-battery eyebrowse expand-region evil-visualstar evil-visual-mark-mode evil-unimpaired evil-tutor evil-surround evil-search-highlight-persist evil-numbers evil-nerd-commenter evil-mc evil-matchit evil-lisp-state smartparens evil-indent-plus evil-iedit-state iedit evil-exchange evil-escape evil-ediff evil-args evil-anzu anzu evil goto-chg undo-tree eval-sexp-fu highlight elisp-slime-nav dumb-jump f dash s diminish define-word column-enforce-mode clean-aindent-mode bind-map bind-key auto-highlight-symbol auto-compile packed aggressive-indent adaptive-wrap ace-window ace-link ace-jump-helm-line helm avy helm-core popup async)))) (mmm-mode markdown-toc markdown-mode gh-md swift3-mode swift-mode org-projectile org-category-capture org-present org-pomodoro alert log4e gntp org-mime org-download htmlize gnuplot yapfify pyvenv pytest pyenv-mode py-isort pip-requirements live-py-mode hy-mode dash-functional helm-pydoc cython-mode anaconda-mode pythonic ws-butler winum which-key volatile-highlights vi-tilde-fringe uuidgen use-package toc-org spaceline powerline restart-emacs request rainbow-delimiters popwin persp-mode pcre2el paradox spinner org-plus-contrib org-bullets open-junk-file neotree move-text macrostep lorem-ipsum linum-relative link-hint indent-guide hydra hungry-delete hl-todo highlight-parentheses highlight-numbers parent-mode highlight-indentation helm-themes helm-swoop helm-projectile helm-mode-manager helm-make projectile pkg-info epl helm-flx helm-descbinds helm-ag google-translate golden-ratio flx-ido flx fill-column-indicator fancy-battery eyebrowse expand-region evil-visualstar evil-visual-mark-mode evil-unimpaired evil-tutor evil-surround evil-search-highlight-persist evil-numbers evil-nerd-commenter evil-mc evil-matchit evil-lisp-state smartparens evil-indent-plus evil-iedit-state iedit evil-exchange evil-escape evil-ediff evil-args evil-anzu anzu evil goto-chg undo-tree eval-sexp-fu highlight elisp-slime-nav dumb-jump f dash s diminish define-word column-enforce-mode clean-aindent-mode bind-map bind-key auto-highlight-symbol auto-compile packed aggressive-indent adaptive-wrap ace-window ace-link ace-jump-helm-line helm avy helm-core popup async))))
(custom-set-faces (custom-set-faces
;; custom-set-faces was added by Custom. ;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful. ;; If you edit it by hand, you could mess it up, so be careful.
+36 -1
View File
@@ -46,9 +46,37 @@ fi
source $DOTCONFDIR/dotconf.sh source $DOTCONFDIR/dotconf.sh
### Shell function definition
# Alias configuration function sortimages () {
case $1 in
-d)
shift
for file in $@; do
DST=`identify -format "%[Exif:DateTimeOriginal]" $file | head -1 | awk '{print $1":"$2}' | awk -F':' '{print $1$2$3"-"$4$5$6}' | awk -F'.' '{print $1 }' | awk -F'::' '{print $1}'`
DST=`echo $DST.jpg`
echo mv $file $DST;
mv $file $DST;
chmod 640 $DST;
done
;;
*)
echo "Rename files"
echo "Usage: sortimages <options> <file-selection> <suffix>"
echo " <file-selection> : for example *.JPG"
echo " <suffix> : rename to "'$date'"-'$time'-suffix.jpg"
echo " <options> : -d rename the files"
echo -n
for file in $@; do
DST=`identify -format "%[Exif:DateTimeOriginal]" ${file} | head -1 | awk '{print $1":"$2}' | awk -F':' '{print $1$2$3"-"$4$5$6}' | awk -F'.' '{print $1 }' | awk -F'::' '{print $1}'`
DST=${DST}'.jpg'
echo mv ${file} ${DST};
done
;;
esac
}
### Alias configuration
if [[ $(uname) = "Linux" ]]; then if [[ $(uname) = "Linux" ]]; then
alias em='emacs -nw' alias em='emacs -nw'
@@ -67,3 +95,10 @@ if [[ $(uname) = "Darwin" ]]; then
alias grep='grep --color=always' alias grep='grep --color=always'
alias l='ls -lh' alias l='ls -lh'
fi fi
### Conda setup on MacOS
if [[ $(uname) = "Darwin" ]]; then
source /Users/mschoengens/Library/Anaconda/etc/profile.d/conda.sh
fi