diff --git a/doclet/README.md b/doclet/README.md index 64237704c..92c6a6eee 100644 --- a/doclet/README.md +++ b/doclet/README.md @@ -1,31 +1,33 @@ # Doclet -This is a custom Doclet that generates JSON files based on Javadoc comments in java files. These JSON files have all the information necessary for building the reference pages on [processing.org](https://processing.org). The Doclet will generate JSON reference files for all libraries that come with Processing as well as the external sound and video libraries. +This is a custom Doclet that generates JSON files based on Javadoc comments in `.java` files. These JSON files have all the information necessary for building the reference pages on [processing.org](https://processing.org). -## How to use - -The Doclet will run through the `.java` files in the `processing` repo and output `.json` files in the `processing-website` repo inside the `content/references/translations/en/` folder. In order for that to work, you must first have the following four repositories in the same root folder: +The Doclet will run through the `.java` file in the following repositories: - [`processing/processing4`](https://github.com/processing/processing4) (this repo) -- [`processing/processing-website`](https://github.com/processing/processing-website) (this currently lives in the designsystemsinternational GitHub account) - [`processing/processing-sound`](https://github.com/processing/processing-sound) - [`processing/processing-video`](https://github.com/processing/processing-video) -In order to run the Doclet, you need to have Java JDK 11 installed and set the `JAVA_HOME` environment variable to point to it. The name of the JDK file may vary depending on your exact version. +It will read the JavaDoc comments, create a series of `.json` files, and save them into the Processing website repository in the `content/references/translations/en/` folder: -``` -export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-11.0.8.jdk/Contents/Home/ -``` +- [`processing/processing-website`](https://github.com/processing/processing-website) -You also need to have [Apache Ant](https://ant.apache.org/manual/install.html) installed in version 1.8 or above. +## How to use -Now run the Doclet: +First, make sure that you have the proper setup before running the script: -1. First move into the `processing4/doclet/ReferenceGenerator` folder +- 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. + +Now you are ready to run the doclet + +1. First `cd` into the `processing4/doclet/ReferenceGenerator` folder 2. Run `ant compile` -3. Run `./processingrefBuild.sh` **note:if you want to run the script just for the main processing references(including libraries serial, net and io) you should run `./processingrefBuild.sh processing` and if you want to run the script for sound or video library you should run `./processingrefBuild.sh sound` or `./processingrefBuild.sh video`** +3. Run the script: -If you are only updating the processing reference and not the sound or video libraries, you can comment out the part related to those libraries in the `processingrefBuild.sh` file. Please remember to not commit these changes to the repo. +- If you are updating a single repository, run `./processingrefBuild.sh processing`, `./processingrefBuild.sh sound` or `./processingrefBuild.sh video` +- If you are updating all the repositories, run `./processingrefBuild.sh` 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: