|
| 1 | +# Random List Picker |
| 2 | + |
| 3 | +React Native Android application for picking random names from lists. |
| 4 | + |
| 5 | +## Functionality |
| 6 | + |
| 7 | +The app let's you construct lists, which can include names and other lists. Random picking can be done from any list. Randomization settings can be specified on a list by list basis. If a list includes another list and the other list gets picked by randomization, the random picking is also done on the picked list using that list's settings, unless otherwise specified. |
| 8 | + |
| 9 | +Other included features are: |
| 10 | + |
| 11 | +- Weight lists and items |
| 12 | +- Include/exclude lists and items from randomization |
| 13 | +- Edit lists and items by long pressing |
| 14 | +- Import (JSON/TXT) and export (JSON) lists and items |
| 15 | +- Export (JSON/TXT) randomization results |
| 16 | +- Look at previous randomization results |
| 17 | + |
| 18 | +## Randomization settings |
| 19 | + |
| 20 | +The randomization can be customized using the following settings: |
| 21 | + |
| 22 | +### Number of items to pick |
| 23 | + |
| 24 | + How many items and/or lists are picked from the list. |
| 25 | + |
| 26 | +### Number of items is a recursive limit |
| 27 | + |
| 28 | + Specifies, if the previous limit should apply to sublists also. |
| 29 | + |
| 30 | +### Pick unique names |
| 31 | + |
| 32 | + Prevents picking multiple identical names. Doesn't differentiate between lists and items. |
| 33 | + |
| 34 | +### Pick unique recursively |
| 35 | + |
| 36 | + Specifies, if the previous setting should apply to sublists also. Applies only when pick unique items is also set. |
| 37 | + |
| 38 | +### Combine sublists |
| 39 | + |
| 40 | + When randomizing, items and lists in lists one level down are considered to be part of the current list. |
| 41 | + |
| 42 | +### Combine sublists recursively |
| 43 | + |
| 44 | + When randomizing, items in all sublists are considered to be part of the current list. Applies only when combine sublists is also set. |
| 45 | + |
| 46 | +### Ignore empty lists |
| 47 | + |
| 48 | + Empty lists won't be picked. List with only unactive |
| 49 | +items counts as empty. |
| 50 | + |
| 51 | +### Ignore empty lists recursively |
| 52 | + |
| 53 | + Specifies, if the previous setting should apply to sublists also. Applies only when ignore empty lists is also set. |
| 54 | + |
| 55 | +### Ignore weights |
| 56 | + |
| 57 | + Doesn't apply weighting. |
| 58 | + |
| 59 | +### Ignore weights recursively |
| 60 | + |
| 61 | + Specifies, if the previous setting should apply to sublists also. Applies only when ignore weights is also set. |
| 62 | + |
| 63 | +### Deactivate picked items |
| 64 | + |
| 65 | + Deactivates items (not lists) that get random picked. |
| 66 | + |
| 67 | +## Importing and exporting |
| 68 | + |
| 69 | +Imported text files are assumed to include names separated by line breaks. All names from a text file are added as items. |
| 70 | + |
| 71 | +Imported JSON objects have to include a "name" key. If a JSON object also has an "items" key, it will be added as a list. Otherwise the JSON object will be added as an item. An example of a valid JSON with all supported keys included is available below: |
| 72 | + |
| 73 | +``` |
| 74 | +[{ |
| 75 | + "name": "Name of list", |
| 76 | + "active": true, |
| 77 | + "weight": 1, |
| 78 | + "numToPick": 10, |
| 79 | + "numToPickRecursive": false, |
| 80 | + "pickUnique": false, |
| 81 | + "pickUniqueRecursive": false, |
| 82 | + "combineLists": false, |
| 83 | + "combineListsRecursive": false, |
| 84 | + "deactivateAfterRandomization": false, |
| 85 | + "ignoreEmptyLists": true, |
| 86 | + "ignoreEmptyListsRecursive": false, |
| 87 | + "ignoreWeights": false, |
| 88 | + "ignoreWeightsRecursive": false, |
| 89 | + "items": [{ |
| 90 | + "name": "Name of sublist", |
| 91 | + "active": true, |
| 92 | + "weight": 1, |
| 93 | + "numToPick": 10, |
| 94 | + "numToPickRecursive": false, |
| 95 | + "pickUnique": false, |
| 96 | + "pickUniqueRecursive": false, |
| 97 | + "combineLists": false, |
| 98 | + "combineListsRecursive": false, |
| 99 | + "deactivateAfterRandomization": false, |
| 100 | + "ignoreEmptyLists": true, |
| 101 | + "ignoreEmptyListsRecursive": true, |
| 102 | + "ignoreWeights": false, |
| 103 | + "ignoreWeightsRecursive": false, |
| 104 | + "items": [{ |
| 105 | + "name": "Name of sublist item 1", |
| 106 | + "active": true, |
| 107 | + "weight": 1 |
| 108 | + }, { |
| 109 | + "name": "Name of sublist item 2", |
| 110 | + "active": true, |
| 111 | + "weight": 1 |
| 112 | + }] |
| 113 | + }, |
| 114 | + { |
| 115 | + "name": "Name of list item", |
| 116 | + "active": true, |
| 117 | + "weight": 1 |
| 118 | + }] |
| 119 | +}] |
| 120 | +``` |
| 121 | + |
| 122 | +## Development environment |
| 123 | + |
| 124 | +Requires React Native: <https://reactnative.dev/docs/environment-setup>. |
| 125 | + |
| 126 | +1. Clone this repository. |
| 127 | +2. In the cloned repository run `npm install`. |
| 128 | + |
| 129 | +Before building a release android app, configure the release key: <https://reactnative.dev/docs/signed-apk-android>. |
| 130 | + |
| 131 | +## Credits |
| 132 | + |
| 133 | +An [icon](https://www.flaticon.com/free-icon/dice_250752) made by [Retinaicons](https://www.flaticon.com/authors/retinaicons) from [Flaticon](https://www.flaticon.com/) is used in the app's icon. |
| 134 | + |
| 135 | +## License |
| 136 | + |
| 137 | +MIT. |
0 commit comments