Skip to content

Commit

Permalink
New README to match the updated script
Browse files Browse the repository at this point in the history
  • Loading branch information
SableRaf authored May 4, 2023
1 parent cdf7fbd commit c274754
Showing 1 changed file with 41 additions and 10 deletions.
51 changes: 41 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,54 @@ It will read the JavaDoc comments, create a series of `.json` files, and save th

- [`processing/processing-website`](https://github.com/processing/processing-website)

You will need a local copy of at least one of `processing/processing4`, `processing/processing-sound` or `processing/processing-video` alongside the `processing/processing-website` repo. The repositories need to be alongside each other in the same folder.

## How to use

First, make sure that you have the proper setup before running the script:

- Clone down whichever repository listed above that you need to have updated on the website. You will need at least one of `processing/processing4`, `processing/processing-sound` or `processing/processing-video` alongside the `processing/processing-website` repo. The repositories need to be alongside each other in the same folder.
- Make sure you have Java JDK 11 installed and the `JAVA_HOME` environment variable set to point to the installation. The name of the JDK file may vary depending on your exact version (e.g. `export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-11.0.8.jdk/Contents/Home/`).
- Make sure you have [Apache Ant](https://ant.apache.org/manual/install.html) installed in version 1.8 or above.
### Get set up

Now you are ready to run the doclet
1. If this is your first time, clone fresh versions of the following repositories alongside each other in the same folder:
- [`processing/processing4`](https://github.com/processing/processing4)
- [`processing/processing-sound`](https://github.com/processing/processing-sound)
- [`processing/processing-video`](https://github.com/processing/processing-video)
- [`processing/processing-website`](https://github.com/processing/processing-website)

If you already have those repositories cloned locally, just make sure that the latest commit of the `main` branch is checked out on all of them.

1. First `cd` into the `processing-doclet/ReferenceGenerator` folder
2. Run `ant compile`
3. Run `./processingrefBuild.sh` if you are updating all the repositories or `./processingrefBuild.sh processing`, `./processingrefBuild.sh sound` or `./processingrefBuild.sh video` if you are updating a single repository.
4. After the new JSON files are created, move into `processing-website` and run `npx prettier --write content/references` to format the JSON
2. Make sure you have openjdk 17 installed and set the `JAVA_HOME` environment variable to point to the JDK installation. For example: `/Users/yourName/Library/Java/JavaVirtualMachines/corretto-17.0.4.1/Contents/Home`

If you just want to test the Doclet without the `processing-website` repo, you can create the following folder structure in the root folder and see the files:
Running `java -version` should return the following:

```
processing-website/content/references/translations/en/
openjdk version "17.0.4.1" 2022-08-12 LTS
OpenJDK Runtime Environment Corretto-17.0.4.9.1 (build 17.0.4.1+9-LTS)
OpenJDK 64-Bit Server VM Corretto-17.0.4.9.1 (build 17.0.4.1+9-LTS, mixed mode, sharing)
```

_Note that the name of the JDK file may vary slightly depending on your exact version._

3. Install the latest version of [Apache Ant](https://ant.apache.org/manual/install.html) (1.10.13 or above).

4. Build the code for [`processing/processing4`](https://github.com/processing/processing4) and [`processing/processing-sound`](https://github.com/processing/processing-sound) by following the instructions on their respective repositories and running the necessary Ant commands.

### Run the doclet script

Now you are ready to run the doclet:

1. `cd` into the `processing-doclet/ReferenceGenerator` folder.
2. Run `ant compile`.
3. Run `./processingrefBuild.sh` if you are updating all the repositories or `./processingrefBuild.sh processing`, `./processingrefBuild.sh sound` or `./processingrefBuild.sh video` if you are updating a single repository.
4. After the new JSON files are created, move into `processing-website` and run `npx prettier --write content/references` to format the JSON files.

### Update the website

Follow the instructions over on the [`processing/processing-website`](https://github.com/processing/processing-website) repository to make a pull request for the newly updated reference files.

## Testing the script
If you just want to test the Doclet without the `processing-website` repo, you can create the following folder structure in the root folder

`processing-website/content/references/translations/en/`

Then run the doclet script normally and it will generate the JSON files in the folder above.

0 comments on commit c274754

Please sign in to comment.