|
| 1 | +## Description |
| 2 | +This read me will guide you on how to create a COCO file using the utility script for Google Drive and DropBox |
| 3 | + |
1 | 4 | ## Google Drive
|
| 5 | +You can find the utility script for Google Drive here: [generate_coco_from_drive.js](./generate_coco_from_drive.js) |
2 | 6 |
|
3 | 7 | ### Prerequisites
|
4 | 8 | - You must have a Google account
|
|
13 | 17 | - Paste the utility script
|
14 | 18 | - Replace any existing default code the code from this utility file
|
15 | 19 | - Replace Placeholder Values
|
16 |
| - - Replace 'your_coco_export.json' with your output filename |
17 |
| - - Replace 'your_public_folder_id' with the ID of your Google Drive folder |
18 |
| - |
| 20 | + - Replace `your_coco_export.json` with your output filename |
| 21 | + - Replace `your_public_folder_id` with the ID of your Google Drive folder |
19 | 22 | > The folder ID is the alphanumeric string that appears after "/folders/" in the URL.\
|
20 |
| -> Eg: https://drive.google.com/drive/folders/1prcCevijN5mubTllB2kr5ki1gjh_IO4u?usp=sharing |
21 |
| -
|
22 |
| -### Run the script |
23 |
| - |
24 |
| -- Save the project to Drive using the floppy disk 💾icon |
25 |
| -- Press Run |
26 |
| -- Accept the authorization prompts the first time you run the script |
27 |
| - |
28 |
| -### View COCO JSON Output |
29 |
| -- Go to View > Logs |
30 |
| -- Copy the Google Drive URL where the coco file is created and generated |
31 |
| -- Download the json file |
| 23 | +> Eg: drive.google.com/drive/folders/**1prcCevijN5mubTllB2kr5ki1gjh_IO4u**?usp=sharing |
| 24 | +- Run the script |
| 25 | + - Save the project to Drive using the floppy disk 💾 icon |
| 26 | + - Press Run |
| 27 | + - Accept the authorization prompts the first time you run the script |
| 28 | +- View COCO JSON Output |
| 29 | + - Go to View > Logs |
| 30 | + - Copy the Google Drive URL where the coco file is created and generated |
| 31 | + - Download the json file |
32 | 32 |
|
33 | 33 | ## DropBox
|
| 34 | +You can find the utility script for DropBox here: [generate_coco_from_dropbox.py](./generate_coco_from_dropbox.py) |
34 | 35 |
|
35 | 36 | ### Prerequisites
|
36 |
| - |
37 | 37 | - Create account: https://www.dropbox.com/register
|
38 | 38 | - Create new App: https://www.dropbox.com/developers/apps
|
39 | 39 | - Choose an API: Scoped access
|
40 | 40 | - Choose the type of access you need: Full Dropbox
|
41 |
| - - Name your app: Mapswipe COCO |
| 41 | + - Name your app: `your-app-name` |
42 | 42 | - Update `Permission type`
|
43 | 43 | - Go to the app settings
|
44 | 44 | - Click **Scoped App**
|
45 |
| - - Select |
| 45 | + - Tick the following |
46 | 46 | - files.metadata.read
|
47 | 47 | - files.content.write
|
48 | 48 | - files.content.read
|
|
53 | 53 | - Go to the app settings
|
54 | 54 | - Click **Generated access token**
|
55 | 55 | - Install uv on your system: https://docs.astral.sh/uv/getting-started/installation/
|
56 |
| -- Download the [generate_coco_from_dropbox.py](user_scripts/generate_coco_from_dropbox.py) script |
| 56 | +- Download the [generate_coco_from_dropbox.py](./generate_coco_from_dropbox.py) script |
57 | 57 |
|
58 |
| -### Run the script |
| 58 | +### Creation Steps |
| 59 | +- Run the script |
59 | 60 | ```bash
|
60 |
| -# Help |
61 |
| -uv run generate_coco_dropbox.py --help |
62 |
| - |
63 |
| -# Sample |
64 |
| -uv run generate_coco_dropbox.py "DROPBOX_ACCESS_TOKEN" "FOLDER_PATH_IN_DROPBOX" "DESTINATION_EXPORT_FILE_NAME_IN_DROPBOX" |
65 |
| - |
66 |
| -# Example |
67 |
| -uv run generate_coco_dropbox.py sl.yourAccessTokenHere “/COCO TEST” “coco_export.json” |
| 61 | + # Help |
| 62 | + uv run generate_coco_dropbox.py --help |
| 63 | + |
| 64 | + # Sample |
| 65 | + uv run generate_coco_dropbox.py "DROPBOX_ACCESS_TOKEN" "FOLDER_PATH_IN_DROPBOX" "DESTINATION_EXPORT_FILE_NAME_IN_DROPBOX" |
| 66 | + |
| 67 | + # Example |
| 68 | + uv run generate_coco_dropbox.py sl.yourAccessTokenHere “/COCO TEST” “coco_export.json” |
68 | 69 | ```
|
| 70 | +- Download the coco_export.json from the your DropBox folder |
69 | 71 |
|
70 |
| -Download the coco_export.json from the dropbox |
|
0 commit comments