-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstory
77 lines (61 loc) · 2.48 KB
/
story
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
**********************************************************************
*** Story ***
**********************************************************************
When a new volume is mounted a BackupMediaFilesJob is triggered. The Job:
(1) Determines if there is a volume with home media files on it
(2) If there is, the files are processed.
with camera photos or movies is mounted, a Job is triggered. the media files are compared against a file history of previously processed files. Any "new" (unprocessed files) are:
(1) renamed (renaming depends on camera and media type)
(2) backed up to two archive volumes using a specific folder hierarchy
(3) deleted from the volume (if backup successful and depending on source volume)
Notifications are sent out containing info like:
- Job status. Volume name. Number of files. Number of Errors (and erroring filenames).
**********************************************************************
*** Architecture ***
**********************************************************************
* JobBackupFromVolume
@ CurrentStatus (InProgress, Complete)
@ EndStatus (NoNewFiles, Success (x of x files copied), Errors (y of x files copied)
@ Know @ DeleteFilesAfterBackup (True/False)nSourceVolumes
@ Name (e.g. "CAM_SD")
@ FilenamePrefix (e.g. matt.iphone5s.)
- Run
- Lock()
- CheckForVolumesToProcess
- For Each VolumeToProcess
- Send notification - "job starting"
- Check for HistoryFileList and load if exists
- Create CurrentFileList
- For each file:
- Check if file is in HistoryAlready (i.e. already processed)
- If New, for each Archive:
- Copy file to temp folder
- Use sortphotos to rename and file
- Remove original File (depending on Volume)
Send Notification:
- Volume Name
- Job Summary:
- Files processed, New Files archived, Old Files removed, Error Files
- File List:
- Details
- Unlock()
* FileList
- load
- save
- generate from path (path, filter)
- append
@ Files
@ Hash
@ Name
@ Path
@ Size
@ Processed (True/False)
* Message
@ Subject
@ Body
- Send
* PushPalMessage
1. file plus details
for each archive:
2. file in a temp folder
3. renamed file in folder