workflow:image_type

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revisionBoth sides next revision
workflow:image_type [2017/10/08 01:57] Júne Parkworkflow:image_type [2018/07/07 07:59] – [Image data Workflow] Júne Park
Line 1: Line 1:
-===== Workflow for Image data ===== +===== Image data Workflow ===== 
  
 +<alert type="danger" icon="glyphicon glyphicon-user" dismiss="true">
 +**Work in Progress** \\This page is under construction. No background action required.
 +</alert>
 +
 +----
 ==== FILES ====  ==== FILES ==== 
  
Line 8: Line 13:
 ==== SOURCING ==== ==== SOURCING ====
  
-{{fa>download?2x&color=#542437}} Sourcing location +{{fa>download?2x&color=#53777A}} Sourcing location 
  
  
Line 14: Line 19:
 ==== PROCESSING ====  ==== PROCESSING ==== 
  
-{{fa>gear?2x&color=#542437&fa-spin}} Processing tasks+{{fa>gear?2x&color=#53777A&fa-spin}} Processing tasks 
 + 
 +  * Command-line convert utility: [[https://www.imagemagick.org/script/download.php|ImageMagick]] 
 + 
 +  * Rename files randomly 
 + 
 +<code bash>  
 +rename -n 's/(.{10}).*(\.jpg)$/$1$2/' *.jpg 
 +</code>  
 +<code bash> 
 +$ rename -n 's/(.{10}).*(\.jpg)$/$1$2/' *.jpg 
 +11512345714x611aaa.jpg -> 1151234571.jpg 
 +1201230111FbcAdee.jpg -> 1201230111.jpg 
 +1208605001abAcd.jpg -> 1208605001.jpg 
 +</code>  
 + 
 +The -n option only simulates the command, so that you can verify the changes. Run without it to actually make the changes. 
 + 
 +The regex ''(.{10}).*(\.jpg)'' consists:
  
  
 +''.{10}'' - any 10 characters, in a group (…), followed by ''.*'' - any number of any characters followed by ''\.jpg$'' 
 +the extension at the end ''($)'' of the filename, in the second group. The replacement ''$1$2'' is just the first group followed by the second.
  
 ----  ---- 
 ==== CONSUMING ====  ==== CONSUMING ==== 
  
-{{fa>arrow-circle-right?2x&color=#542437}} Consuming data +{{fa>arrow-circle-right?2x&color=#53777A}} Consuming data 
  
  
Line 27: Line 52:
 ==== ARCHIVING ====    ==== ARCHIVING ====   
  
-{{fa>cloud-upload?2x&color=#542437}} Archiving in **LOCAL** & **CLOUD** +{{fa>cloud-upload?2x&color=#53777A}} Archiving in **LOCAL** & **CLOUD** 
  
  
 ---- ----
  • workflow/image_type
  • Last modified: 2018/07/07 08:00
  • by Júne Park