Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- each object contains information for copying and renaming a set of files. The attributes determine the source directory, as well as the number of destinations and their names.
- The source and destination paths can be split into two parts, 'upper' and 'lower'.
- for the sources:
- there are two possible 'upper' paths and two possible 'lower' paths, resulting in 4 possible source paths:
- upper1 + lower1
- upper1 + lower2
- upper2 + lower1
- upper2 + lower2
- for the destinations:
- there are anywhere from 1 to 10 poaaible 'upper' paths per object, based on the pack value, and two possible 'lower' paths, which are the same as the source 'lower' paths except for one change that is constant across all destinations.
- the 'upper' destination paths for each object can be further broken down into the 'pack' and the 'item'. The 'pack' is the first portion of the 'upper' path, and the 'item' is a single directory added to the end of it.
- the 'pack' portion is determined by the 'pack' object field, and other fields depending on that value. They are as follows.
- 2: the 'pack' is 'minimal'. The items are 'name - slot' for each slot in the slots array. This results in 5 'upper' paths, each with 2 'lower' paths:
- minimal + item1 + lower1
- minimal + item1 + lower2
- minimal + item2 + lower1
- etc.
- 1: the 'pack' is 'partial'. The items are 'name-slot' for each slot in the slots array. There are always less than 5 slots for these objects, resulting in 1 to 4 'upper' paths, again each with 2 'lower' paths:
- partial + item1 + lower1
- partial + item1 + lower2
- partial + item2 + lower1
- etc.
- 0: The most complex option. This can actually result in up to two of 8 values, depending on the 'rank' and 'base_swaps' fields of the object.
- each 'rank' value corresponds to a string, which is a part of both possible 'pack' paths.
- All objects with pack 0 will have 'rank - extended' as a pack name, with 'name - slot' items for each slot in the slots array (total 5), plus 2 'lower' paths per item, for 10 total:
- rank - extended + item1 + lower1
- rank - extended + item1 + lower2
- rank - extended + item2 + lower1
- etc.
- if the 'base_swaps' array is not empty, the object ALSO has 'rank - recommended' as a pack, with the items determined by the values in the array, up to 4 possible options, and 2 'lower' paths each, for up to 8 destination paths:
- rank - recommended + item1 + lower1
- rank - recommended + item1 + lower2
- rank - recommended + item2 + lower1
- etc.
- the other fields are not used for the path-creation process, which is where the most complexity is.
Add Comment
Please, Sign In to add comment