[doc] Update pmd-demo.gif

This commit is contained in:
Andreas Dangel 2024-03-01 08:29:30 +01:00
parent aa672e9d0e
commit 5b84459368
No known key found for this signature in database
GPG Key ID: 93450DF2DF9A3FA3
3 changed files with 31 additions and 1 deletions

View File

@ -39,7 +39,7 @@ See also [Getting Started](https://docs.pmd-code.org/latest/pmd_userdocs_install
**Demo:**
This shows how PMD can detect for loops, that can be replaced by for-each loops.
This shows how PMD analyses [openjdk](https://github.com/openjdk/jdk):
![Demo](docs/images/userdocs/pmd-demo.gif)

View File

@ -0,0 +1,30 @@
## How to create pmd-demo.gif
### Prepare
```shell
mkdir $HOME/pmd-demo
cd $HOME/pmd-demo
curl -L -o jdk-master.zip https://github.com/openjdk/jdk/archive/refs/heads/master.zip
unzip jdk-master.zip
alias pmd=$HOME/PMD/source/pmd/pmd-dist/target/pmd-bin-7.0.0-SNAPSHOT/bin
clear
pmd check -R rulesets/java/quickstart.xml -d jdk-master/src/java.base -f text --cache pmd.cache --report-file jdk-report.txt
```
Second terminal window: `cd $HOME/pmd-demo; tail -f jdk-report.txt`
### Recording
Record screencast with https://github.com/EasyScreenCast/EasyScreenCast (a gnome3 extension)
The recorded screencast can be found in `$HOME/Videos`.
### Converting
Convert webm to gif: https://engineering.giphy.com/how-to-make-gifs-with-ffmpeg/
```shell
cd $HOME/Videos
ffmpeg -i pmd7-demo.webm -filter_complex "[0:v] fps=12,scale=960:-1,split [a][b];[a] palettegen [p];[b][p] paletteuse" pmd7-demo.gif
```

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 MiB

After

Width:  |  Height:  |  Size: 2.9 MiB