jon 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rspec +0 -0
- data/.rubocop.yml +0 -0
- data/Gemfile +0 -0
- data/Gemfile.lock +1 -1
- data/README.md +76 -0
- data/Rakefile +0 -0
- data/jon.gemspec +0 -0
- data/lib/images/catalogage/catalog.rb +0 -0
- data/lib/images/catalogage/etape/analyse.rb +0 -0
- data/lib/images/catalogage/etape/application.rb +0 -0
- data/lib/images/catalogage/etape/nom_attribuer.rb +0 -0
- data/lib/images/catalogage/etape/verificateur.rb +0 -0
- data/lib/images/catalogage/fichier.rb +0 -0
- data/lib/images/classification/classification.rb +1 -1
- data/lib/images/exif/exif_manipulateur.rb +0 -0
- data/lib/images/exif/mini_exiftool_manipulateur.rb +0 -0
- data/lib/images/extraction/extracteur_par_date.rb +0 -0
- data/lib/images/helpers/directory_helpers.rb +0 -0
- data/lib/images/helpers/regex_helpers.rb +0 -0
- data/lib/images/nommage/dedoublonneur.rb +0 -0
- data/lib/images/nommage/nom_attributeur.rb +0 -0
- data/lib/images/restauration/etape/analyse.rb +0 -0
- data/lib/images/restauration/etape/application.rb +0 -0
- data/lib/images/restauration/etape/traitement_dossier_extirpable.rb +0 -0
- data/lib/images/restauration/etape/traitement_dossier_non_extirpable.rb +0 -0
- data/lib/images/restauration/fichier.rb +0 -0
- data/lib/images/restauration/restore.rb +0 -0
- data/lib/jon/version.rb +1 -1
- data/sig/jon.rbs +0 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ded42d9bcda3f4e950101e4d9aae358d960e7ede0e1f9e31c0dd4481acd08b7a
|
4
|
+
data.tar.gz: 5a078031a278f7d598f247f6332d50998b8e6c52a092475b876805b49421c473
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ed541ff377f703f799165d519244a83158bbe2dc5f38febaf28ccf7240fba8287388ee7a79ccd79b6b9fb34e4b8f22ae81296b99b4d20fef604fe8b93d9adafa
|
7
|
+
data.tar.gz: 046de96b0779bd8199aaca463818fe67e80e9e1c62eeae86cb0935078b5d7cd740b3b27c21bbcff0fdca2581cb969afa6232e51ea9b9d6a78f2b5e08e41d4684
|
data/.rspec
CHANGED
File without changes
|
data/.rubocop.yml
CHANGED
File without changes
|
data/Gemfile
CHANGED
File without changes
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,5 +1,81 @@
|
|
1
1
|
# Jon
|
2
2
|
|
3
|
+
Jon est une library permettant d'outiller un workflow de gestion d'une photothéque. Actuellement la library défini deux workflow :
|
4
|
+
|
5
|
+
* Restore : Permet de restaurer un dossier, renommage et appliquer les metadata de date manquante
|
6
|
+
* Catalog : Permet de cataloguer des photos en les renommant, définissant dans un dossier avec l'arborescence année/mois/extension (ex: 2021/01/JPG). Pour ensuite les copier vers un dossier de destination
|
7
|
+
|
8
|
+
## Usage
|
9
|
+
|
10
|
+
La restauration est un process parcourant tout les fichiers d'un dossier source
|
11
|
+
``` ruby
|
12
|
+
require "images/restauration/etape/analyse"
|
13
|
+
require "images/restauration/etape/application"
|
14
|
+
require "images/restauration/etape/traitement_dossier_extirpable"
|
15
|
+
require "images/restauration/etape/traitement_dossier_non_extirpable"
|
16
|
+
require "images/restauration/restore"
|
17
|
+
|
18
|
+
path_dossier = "/vault"
|
19
|
+
apply = true
|
20
|
+
|
21
|
+
Restauration::Restore.new(
|
22
|
+
Restauration::Etape::Analyse.new(ExtracteurParDate.new),
|
23
|
+
Restauration::Etape::TraitementDossierExtirpable.new(ExtracteurParDate.new),
|
24
|
+
Restauration::Etape::TraitementDossierNonExtirpable.new,
|
25
|
+
Restauration::Etape::Application.new(MiniExiftoolManipulateur.new)
|
26
|
+
).process(path_dossier, apply)
|
27
|
+
|
28
|
+
```
|
29
|
+
Le catalogage est un processus parcourants les fichiers d'un dossier source
|
30
|
+
``` ruby
|
31
|
+
require "images/catalogage/etape/analyse"
|
32
|
+
require "images/catalogage/etape/application"
|
33
|
+
require "images/catalogage/etape/nom_attribuer"
|
34
|
+
require "images/catalogage/etape/verificateur"
|
35
|
+
require "images/catalogage/catalog"
|
36
|
+
|
37
|
+
path_dossier = "/camera"
|
38
|
+
apply = true
|
39
|
+
destination = "/vault"
|
40
|
+
|
41
|
+
Catalogage::Catalog.new(
|
42
|
+
Catalogage::Etape::Analyse.new(ExtracteurParDate.new, MiniExiftoolManipulateur.new),
|
43
|
+
Catalogage::Etape::NomAttribuer.new,
|
44
|
+
Catalogage::Etape::Application.new(MiniExiftoolManipulateur.new),
|
45
|
+
Catalogage::Etape::Verificateur.new
|
46
|
+
).process(path_dossier, apply, destination)
|
47
|
+
|
48
|
+
```
|
49
|
+
|
50
|
+
L'extracteur permet d'extraire une date du nom de fichier [voir](lib/images/extraction/extracteur_par_date.rb) différent format de fichier son pris en compte
|
51
|
+
|
52
|
+
``` ruby
|
53
|
+
require "images/extraction/extracteur_par_date"
|
54
|
+
|
55
|
+
extracteur = ExtracteurParDate.new
|
56
|
+
|
57
|
+
nom = "20151231_155723_011"
|
58
|
+
|
59
|
+
extracteur.extraction_du(nom) # DateTime.new(2015, 12, 31, 15, 57, 23)
|
60
|
+
extracteur.extirpabilite(nom) # true
|
61
|
+
```
|
62
|
+
|
63
|
+
ExifManipulateur permet de manipuler les metadatas des fichiers
|
64
|
+
|
65
|
+
``` ruby
|
66
|
+
require "images/exif/mini_exiftool_manipulateur"
|
67
|
+
|
68
|
+
exif_manipulateur = MiniExiftoolManipulateur.new
|
69
|
+
|
70
|
+
fichier = File.new("./photo_2021_12_25-15_52_17.jpg")
|
71
|
+
datetimeoriginal = DateTime.new(2020, 2, 1, 1, 1, 1)
|
72
|
+
|
73
|
+
exif_manipulateur.set_datetimeoriginal(fichier, datetimeoriginal) # date_time_original : 2021:12:25 15:52:17
|
74
|
+
exif_manipulateur.get_datetimeoriginal(fichier) # DateTime.new(2021, 12, 25, 15, 52, 17)
|
75
|
+
exif_manipulateur.datetimeoriginal?(fichier) # true
|
76
|
+
|
77
|
+
```
|
78
|
+
|
3
79
|
## Installation
|
4
80
|
|
5
81
|
Exécuter :
|
data/Rakefile
CHANGED
File without changes
|
data/jon.gemspec
CHANGED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/lib/jon/version.rb
CHANGED
data/sig/jon.rbs
CHANGED
File without changes
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- JordanC0TT
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-04-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: debase
|
@@ -191,7 +191,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
191
191
|
- !ruby/object:Gem::Version
|
192
192
|
version: '0'
|
193
193
|
requirements: []
|
194
|
-
rubygems_version: 3.1.
|
194
|
+
rubygems_version: 3.1.6
|
195
195
|
signing_key:
|
196
196
|
specification_version: 4
|
197
197
|
summary: Catalogue des fichiers
|