Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[doc] Improved readme and all contributors #3481

Merged
merged 11 commits into from
Sep 23, 2021
Merged

Conversation

adangel
Copy link
Member

@adangel adangel commented Aug 20, 2021

Describe the PR

I tried to improve our README. And also add all-contributors (https://allcontributors.org/) (but without the bot yet).

Resources used:

Preview: https://github.com/adangel/pmd/blob/improved-readme/README.md
Preview credits: https://github.com/adangel/pmd/blob/improved-readme/docs/pages/pmd/projectdocs/credits.md

Much more colorful 馃槃

Questions, suggestions:

@adangel adangel changed the title Improved readme [doc] Improved readme Aug 20, 2021
@adangel adangel added this to the 6.38.0 milestone Aug 20, 2021
@pmd-test
Copy link

1 Message
馃摉 No java rules are changed!

Generated by 馃毇 Danger

@adangel
Copy link
Member Author

adangel commented Aug 21, 2021

I finally found a program, that kind of works to record screens/single windows under wayland: https://github.com/HasinduLanka/screencorder

Here's my try:

pmd-demo-5fps

Copy link
Member

@oowekyala oowekyala left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this looks great :)

.all-contributorsrc Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@adangel adangel modified the milestones: 6.38.0, 6.39.0 Aug 27, 2021
@adangel
Copy link
Member Author

adangel commented Aug 27, 2021

adangel and others added 3 commits September 2, 2021 11:14
Co-authored-by: Cl茅ment Fournier <clement.fournier76@gmail.com>
@adangel
Copy link
Member Author

adangel commented Sep 2, 2021

I've now added the first 100 github contributors with the following script (maybe it's useful for others):

export PRIVATE_TOKEN=....
curl https://api.github.com/repos/pmd/pmd/contributors?per_page=100 > pmd-contributors.json
for i in $(cat pmd-contributors.json | jq -r '.[].login'); do
  echo $i
  npx all-contributors add $i code
  sleep 1
done

This API only provides the first top 100 contributors (see also https://github.com/pmd/pmd/graphs/contributors)

@adangel
Copy link
Member Author

adangel commented Sep 2, 2021

Better screencast:

pmd-demo.mp4

@adangel
Copy link
Member Author

adangel commented Sep 2, 2021

It seems, that only gifs work in README.md files, although you can upload videos in comments (https://github.blog/2021-05-13-video-uploads-available-github/)

For creating the screencast, I used gnome and https://github.com/EasyScreenCast/EasyScreenCast
This will create a webm video.

With ffmpeg, it can be converted into mp4: ffmpeg -i pmd-demo.webm -r 15 -s 708x484 pmd-demo.mp4

Or into a high quality gif (http://blog.pkh.me/p/21-high-quality-gif-with-ffmpeg.html):

ffmpeg -i pmd-demo.webm -vf "fps=3,palettegen" -y pmd-demo-palette.png
ffmpeg -i pmd-demo.webm -i pmd-demo-palette.png -lavfi "fps=3 [x]; [x][1:v] paletteuse" -y pmd-demo.gif

@adangel
Copy link
Member Author

adangel commented Sep 2, 2021

Should we add the pmd logo at the top?

We should probably do this for pmd7, but not for pmd6

Should we really use all contributors?
It's easy to find the code contributors, but much harder to find other contributors (issue reporter, tester, ...)
add another language/framework to the mix: nodejs...

I guess, it makes sense to add the bot (https://allcontributors.org/docs/en/bot/overview) in order to easily add new contributors.

We have however older contributors (https://github.com/pmd/pmd/blob/master/docs/pages/pmd/projectdocs/credits.md) which we need to migrate....

If the list is too big in README.md, we might move it into CONTRIBUTORS.md

The Demo looks very unspectacular - I guess, we should create a (gif) video

The new demo is simple and basic... at least a moving picture

Not sure, if we should keep the snapshot of pmd-eclipse-plugin here...

Removed it.

TODOs:

  • use git history to find more code contributors
    • I used only the issues. Using git commits is difficult, because we would need to map email addresses to users/identities.
  • move contributors list out of README into a own file - maybe into the documentation, to replace credits.md?
    • I moved it into credits.md
  • add/converts credits.md to contributors
    • I decided not to manually try to find each one on github. Instead I moved the "old" contributors into a own section "previous contributors". From now on, we should simply update .all-contributorsrc.

@adangel
Copy link
Member Author

adangel commented Sep 8, 2021

Just noticed: The readme in the pmd7 branch already has the new logo : https://github.com/pmd/pmd/blob/pmd/7.0.x/README.md

@adangel
Copy link
Member Author

adangel commented Sep 9, 2021

Here are the scriptlets I used to get the "issue"-contributors from github:

# download the issues... page 1 to 35, 100 per page
for page in $(seq 1 35); do
    curl \
      -H "Accept: application/vnd.github.v3+json" \
      "https://api.github.com/repos/pmd/pmd/issues?per_page=100&page=${page}&direction=asc&state=all" > pmd-issues-${page}.json
done

# extract the users
for page in $(seq 1 35); do
   jq -r '.[].user.login' pmd-issues-${page}.json >> pmd-issues-users.txt
done

# remove duplicates
sort pmd-issues-users.txt | uniq > pmd-issues-users-uniq.txt

# collect already added contributors
jq -r '.contributors[].login' .all-contributorsrc > contributors-users.txt
sort contributors-users.txt | uniq > contributors-users-uniq.txt

# contributors, that are already in .all-contributorsrc but additionally created bugs
comm -1 -2 contributors-users-uniq.txt pmd-issues-users-uniq.txt

# new contributors, who only created bugs
comm -1 -3 contributors-users-uniq.txt pmd-issues-users-uniq.txt

npm i
export PRIVATE_TOKEN=...

# Add new "bug" contributors:
for i in $(comm -1 -3 contributors-users-uniq.txt pmd-issues-users-uniq.txt); do
    echo $i;
    npx all-contributors add $i bug
    sleep 0.5
done

How many contributors?

$ jq -r '.contributors[].login' .all-contributorsrc|wc -l
702

* Fix layout
* Reorganize old sections
* Add link from index.md
@adangel adangel self-assigned this Sep 21, 2021
@adangel adangel changed the title [doc] Improved readme [doc] Improved readme and all contributors Sep 23, 2021
adangel added a commit to adangel/pmd that referenced this pull request Sep 23, 2021
[doc] Improved readme and all contributors pmd#3481
@adangel adangel merged commit a69a612 into pmd:master Sep 23, 2021
@adangel adangel deleted the improved-readme branch September 23, 2021 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants