Skip to content

Commit

Permalink
remove duplicate links (facebookresearch#314)
Browse files Browse the repository at this point in the history
Summary: Pull Request resolved: facebookresearch#314

Test Plan:
Imported from GitHub, without a `Test Plan:` line.
After {F1068259199} Before {F1068259243}

Reviewed By: crasanders

Differential Revision: D48212585

Pulled By: Eric-Cortez

fbshipit-source-id: 3d2fcc198108e43aad9cbc91fd0955d58f0dda74
  • Loading branch information
Eric-Cortez authored and facebook-github-bot committed Aug 15, 2023
1 parent bdac5f6 commit 1a59744
Show file tree
Hide file tree
Showing 11 changed files with 95 additions and 14 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
demos/ParticleEffectDemo_Mac.zip filter=lfs diff=lfs merge=lfs -text
demos/ParticleEffectDemo_Win.zip filter=lfs diff=lfs merge=lfs -text
demos/ThrowOptimizerDemo_Win.zip filter=lfs diff=lfs merge=lfs -text
demos/YannyLaurelDemo_Win.zip filter=lfs diff=lfs merge=lfs -text
3 changes: 3 additions & 0 deletions demos/ParticleEffectDemo_Win.zip
Git LFS file not shown
59 changes: 56 additions & 3 deletions demos/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ This directory contains the source files for AEPsych's Docusaurus website demos.

See the website's [README](../website/README.md) for additional information on how to build and start the website locally.

### Adding New Demos
# Adding New Demos

To add a new demo to your project, follow these steps:

Expand Down Expand Up @@ -31,7 +31,9 @@ Replace VIDEO_URL_HERE with the URL of the video asset. You can host the video o
2) Wait for the video to finish loading.
3) Once the video is fully loaded, it will provide an asset URL. You don't need to hit the "submit" button.

### Adding .zip file assets
**Note**: Video must be less than 100MB.

## Adding .zip file assets
1) Add the necessary zip files for both Mac and Windows versions of the demo. Place the zip files in the `demos/` directory to ensure they are accessible for the demo parsing function. Follow the naming convention `<name>_Win.zip` and `<name>_Mac.zip`.

Your file structure should look like this:
Expand All @@ -42,6 +44,56 @@ demos-|
|- ParticleEffectDemo_Mac.zip
|- ParticleEffectDemo_Win.zip
```
**Note**: If the size of the demo file is larger than 25MB, it is recommended to push the file to Git Large File Storage (LFS).

By following this structured approach, you create an organized repository that facilitates efficient access to the demo files.

Employing Git LFS to track large files is essential for maintaining a lightweight repository and preventing large binary files from inflating the version control history.

**Docs**: [Git LFS Documentation](https://git-lfs.com/)

### Git LFS Workflow:

To seamlessly integrate the zip files while utilizing Git LFS, adhere to the following workflow:

1. **Open Terminal and Navigate to Repository**:
Open your terminal and navigate to the root directory of your AEPsych repository.

2. **Initialize Git LFS**:
Use the following command to initialize Git LFS in your repository:
```sh
git lfs install
```
### Configure `.gitattributes`:

Add the file name to the `.gitattributes` file located in the root directory. Utilize the following syntax to specify that the file should be tracked using Git LFS:

```sh
demos/ParticleEffectDemo.md filter=lfs diff=lfs merge=lfs -text
```

### Check Staging Status:
View the status of items staged for commit using:
```sh
git lfs status
```
### Track the File:
Employ the following command to begin tracking the demo file using Git LFS:
```sh
git lfs track demos/ParticleEffectDemo.md
```
### List Tracked Files:
To observe all files being tracked by Git LFS, run:
```sh
git lfs ls-files
```
### Stage and Commit Changes to git:
```sh
git add .
git commit -m "Add large files using Git LFS"
```
## Update the website Navigation

2) Update the `demo.json` file located in `website/demo.json`. This file contains the configuration for all demos in the `demos/` directory. The title here is used to render the title of the demo on the demoSidebar component.

Add a new demo object to represent the newly added demo:
Expand All @@ -54,7 +106,8 @@ Add a new demo object to represent the newly added demo:

Ensure that the "id" matches the name of the Markdown file (without the file extension) and corresponds to the names of the zip files.

#### Modifying Demo Text

### Modifying Demo Text
To add or modify the text associated with a specific demo, follow these steps:

Locate the Markdown file corresponding to the demo you wish to modify, e.g., `demos/markdown/ParticleEffectDemo.md`.
Expand Down
3 changes: 3 additions & 0 deletions demos/YannyLaurelDemo_Win.zip
Git LFS file not shown
4 changes: 0 additions & 4 deletions demos/markdown/ParticleEffectDemo.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,3 @@ Start your local AEPsych server
Open the extracted archive directory, double click the ‘aepsych_unity.exe’ application

**Download**

[ParticleEffectDemo_Win.zip](https://github.com/facebookresearch/aepsych/files/12034005/ParticleEffectDemo_Win.zip)

[ParticleEffectDemo_Mac.zip](https://github.com/facebookresearch/aepsych/blob/main/demos/ParticleEffectDemo_Mac.zip)
2 changes: 0 additions & 2 deletions demos/markdown/ThrowOptimizerDemo.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,3 @@ Windows OS, Oculus Quest/Quest 2 connected via link cable, and a local AEPsych s
6. Don your headset and follow the on-screen instructions

**Download**

[ThrowOptimizerDemo_Win.zip](https://github.com/facebookresearch/aepsych/raw/main/demos/ThrowOptimizerDemo_Win.zip)
2 changes: 0 additions & 2 deletions demos/markdown/YannyLaurelDemo.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,3 @@ Windows and a local installation of the AEPsych server.


**Download**

[YannyLaurelDemo_Win.zip](https://github.com/facebookresearch/aepsych/files/12033979/YannyLaurelDemo_Win.zip)
13 changes: 12 additions & 1 deletion website/_demos/ParticleEffectDemo.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,18 @@ <h2 id="Particle-Effect-Demo">Particle Effect Demo<a class="anchor-link" href="#
Right click the .zip archive, and “Extract All” to somewhere on your computer
Start your local AEPsych server
Open the extracted archive directory, double click the ‘aepsych_unity.exe’ application</p>
<h3>Download</h3>
<div class="tutorialButtonWrapper buttonWrapper">
<a class="tutorialButton button" href="https://github.com/facebookresearch/aepsych/files/12034005/ParticleEffectDemo_Win.zip" download target="_blank">
<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="file-download" class="svg-inline--fa fa-file-download fa-w-12" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><path fill="currentColor" d="M224 136V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V160H248c-13.2 0-24-10.8-24-24zm76.45 211.36l-96.42 95.7c-6.65 6.61-17.39 6.61-24.04 0l-96.42-95.7C73.42 337.29 80.54 320 94.82 320H160v-80c0-8.84 7.16-16 16-16h32c8.84 0 16 7.16 16 16v80h65.18c14.28 0 21.4 17.29 11.27 27.36zM377 105L279.1 7c-4.5-4.5-10.6-7-17-7H256v128h128v-6.1c0-6.3-2.5-12.4-7-16.9z"></path></svg>
Download Win Demo
</a>
<a class="tutorialButton button" href="https://github.com/facebookresearch/aepsych/blob/main/demos/ParticleEffectDemo_Mac.zip" download target="_blank">
<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="file-download" class="svg-inline--fa fa-file-download fa-w-12" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><path fill="currentColor" d="M224 136V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V160H248c-13.2 0-24-10.8-24-24zm76.45 211.36l-96.42 95.7c-6.65 6.61-17.39 6.61-24.04 0l-96.42-95.7C73.42 337.29 80.54 320 94.82 320H160v-80c0-8.84 7.16-16 16-16h32c8.84 0 16 7.16 16 16v80h65.18c14.28 0 21.4 17.29 11.27 27.36zM377 105L279.1 7c-4.5-4.5-10.6-7-17-7H256v128h128v-6.1c0-6.3-2.5-12.4-7-16.9z"></path></svg>
Download Mac Demo
</a>
</div>
</div>
</div>
</div>
</div>
</div>
9 changes: 8 additions & 1 deletion website/_demos/ThrowOptimizerDemo.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,14 @@ <h2 id="VR-Throw-Optimizer-Demo">VR Throw Optimizer Demo<a class="anchor-link" h
<li>Open the extracted archive directory, double click the ‘Throw Optimizer.exe’ application</li>
<li>Don your headset and follow the on-screen instructions</li>
</ol>
<h3>Download</h3>
<div class="tutorialButtonWrapper buttonWrapper">
<a class="tutorialButton button" href="https://github.com/facebookresearch/aepsych/raw/main/demos/ThrowOptimizerDemo_Win.zip" download target="_blank">
<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="file-download" class="svg-inline--fa fa-file-download fa-w-12" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><path fill="currentColor" d="M224 136V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V160H248c-13.2 0-24-10.8-24-24zm76.45 211.36l-96.42 95.7c-6.65 6.61-17.39 6.61-24.04 0l-96.42-95.7C73.42 337.29 80.54 320 94.82 320H160v-80c0-8.84 7.16-16 16-16h32c8.84 0 16 7.16 16 16v80h65.18c14.28 0 21.4 17.29 11.27 27.36zM377 105L279.1 7c-4.5-4.5-10.6-7-17-7H256v128h128v-6.1c0-6.3-2.5-12.4-7-16.9z"></path></svg>
Download Win Demo
</a>
</div>
</div>
</div>
</div>
</div>
</div>
9 changes: 8 additions & 1 deletion website/_demos/YannyLaurelDemo.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,14 @@
<li>Start your local AEPsych server</li>
<li>Open the extracted archive directory, double click the ‘aepsych_unity.exe’ application</li>
</ol>
<h3>Download</h3>
<div class="tutorialButtonWrapper buttonWrapper">
<a class="tutorialButton button" href="https://github.com/facebookresearch/aepsych/files/12033979/YannyLaurelDemo_Win.zip" download target="_blank">
<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="file-download" class="svg-inline--fa fa-file-download fa-w-12" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><path fill="currentColor" d="M224 136V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V160H248c-13.2 0-24-10.8-24-24zm76.45 211.36l-96.42 95.7c-6.65 6.61-17.39 6.61-24.04 0l-96.42-95.7C73.42 337.29 80.54 320 94.82 320H160v-80c0-8.84 7.16-16 16-16h32c8.84 0 16 7.16 16 16v80h65.18c14.28 0 21.4 17.29 11.27 27.36zM377 105L279.1 7c-4.5-4.5-10.6-7-17-7H256v128h128v-6.1c0-6.3-2.5-12.4-7-16.9z"></path></svg>
Download Win Demo
</a>
</div>
</div>
</div>
</div>
</div>
</div>
3 changes: 3 additions & 0 deletions website/package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"name": "aepsych",
"version": "1.0.0",
"license": "CC BY-NC 4.0",
"scripts": {
"examples": "docusaurus-examples",
"start": "docusaurus-start",
Expand Down

0 comments on commit 1a59744

Please sign in to comment.