rpattabi / scripts Goto Github PK
View Code? Open in Web Editor NEWBunch of utility scripts useful for various purposes
License: GNU General Public License v2.0
Bunch of utility scripts useful for various purposes
License: GNU General Public License v2.0
On linux, IMG_01.JPG and img_01.jpg are different files. But it is not the case with windows. (pun unintended)
So all the processing should be in case insensitive way, to make these scripts cross platform.
It takes a while especially when detecting duplicates.
Currently import script only checks if the same file with the name exists at the target. Instead, it could better do md5 or SHA checksums on the content of the file to decide whether duplicate of the file exists at the target location prior to importing.
This makes this script fails in windows. Avoid system commands though ``.
Just common sense
When the name collision occurs, import-media.rb
renames the file, adding _1 while copying it to the target (If a file exists in the target with the same name, but with different content)
But, it adds _1 after the extension. ex: IMG39492.JPG_1
_1 etc should be added before the extension. IMG39492_1.JPG
This is because of the idiosyncrasies of windows as opposed to linux. Linux allows a file to be moved even when in use; while windows does not allow that.
import script currently moves. I want an option to copy instead. The commandline option may be like the following:
ruby import-media.rb [-cp|-mv] /source/path/ /target/path/
-cp | --copy
-mv | --move
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.