sveetch / deovi Goto Github PK
View Code? Open in Web Editor NEWA set of utilities to collect and rename media files
Home Page: https://deovi.readthedocs.io/
License: MIT License
A set of utilities to collect and rename media files
Home Page: https://deovi.readthedocs.io/
License: MIT License
This is the description from the previous script, still mention the "--init" option which have been moved to the "job" command.
You can't mix job and init modes and so mix Job filepath and directory paths.
It have to be fixed.
Device collection dump should contain a meta informations part where to store device path and its partition total size.
For collector itself it is easy but for the dump we will need to move collected directories into an item like "directories" and django-deovi will need to be adapted.
Partition total size becomes really useful into django-deovi for file management since currently we need to write somewhere or mount device to know partition size to compare with usage size (from collected directories).
Actually the cover filepath starts from base directory where script have been launched, it results on a path that can not be properly restored from a dump loader (like in django-deovi).
As it is clear the cover container directory must be given in the same directory than its related dump file, the cover filepath stored in dump should be relative to the dump file so it can be properly restored from loader.
This is a very important option since on default, the "rename" command won't write anything and commit option is required to effectively rename files.
It must be fixed.
Just like directory has a manifest to include some meta information to collect, each collected media files should also be able to have meta information.
The directory checksum is computed from a full resume of directory and its mediafiles infos, any detail change will trigger a new checksum.
A sample of payload content used to compute checksum:
{
"absolute_dir": ".",
"children_files": [
{
"absolute_dir": "my_device",
"container": "Matroska",
"directory": "",
"extension": "mkv",
"mtime": "2023-03-03T15:28:31+00:00",
"name": "SampleVideo_1280x720_1mb.mkv",
"path": "my_device/SampleVideo_1280x720_1mb.mkv",
"relative_dir": ".",
"size": 1052413
}
],
"cover": [
"/home/foo/my_device/cover.png",
"my_device_5d6a37176464385b2acb/e22299c3-5abd-41cd-988a-71160f9a052a.png"
],
"cover_checksum": "2f959715ba2b43cef4c48e6dfd71d002007f2cf10e1f20029501a7ba41b4edc9d92da877682ebd8e657635902b56827311b20cf21682762e7871fd4afcab951f",
"mtime": "2023-03-03T15:28:31+00:00",
"name": "my_device",
"path": "my_device",
"relative_dir": ".",
"size": 4096,
"title": "Media sample root"
}
But currently the resume include the computed cover filename that include an UUID4. Since UUID is almost assured to be unique, any collect will have a new checksum because of UUID filename that won't be the same even if the cover file does not change.
So, the computed filename must not be included in the payload used to build directory checksum.
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.