This is a simple project that allows one to easily build a JSON map of the tiles and their associated roles in the CampusM App Builder (inside App Manager). It also pulls in the metadata tag for each tile, whose value is used to indicate whether the tile is available on mobile, desktop, or both. If it's both, the tag contains both mobile
and desktop
.
- Copy the Javascript from role-mapper.js.
- Open the CampusM App Builder
- Open the dev tools in your browser.
- Open the Console tab in your dev tools.
- Paste the copied JS into the console.
- Run it.
- When it finishes executing, copy the created map to your clipboard with
copy(roles_map);
- Paste the copied JSON object into a JSON file in this project, or wherever you want the map to be stored.
- Sample output from the script is stored in roles_map.json.
- You can then also convert this data into CSV format with the following:
python json-to-csv.py --json-file <json file, e.g. roles_map.json>
This will output the data in CSV format to a CSV file with the same name as the JSON file, except with a .csv
extension instead of .json
.