Skip to content

Commit

Permalink
Merge pull request #2 from ClydeDz/develop
Browse files Browse the repository at this point in the history
Add GitHub templates, update readme with usage and installation details, add icon.
  • Loading branch information
ClydeDz committed Dec 22, 2020
2 parents 8abb37d + 995621b commit 94773e7
Show file tree
Hide file tree
Showing 6 changed files with 172 additions and 1 deletion.
65 changes: 65 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Contributing

When contributing to this repository, please first discuss the change you wish to make via issue. Please note we have a code of conduct, please follow it in all your interactions with the project.

## Pull Request Process

1. Ensure any install or build dependencies are removed before the end of the layer when doing a
build.
2. Update the `README.md` file with details of changes to this NuGet package.
3. Increase the version number in the `GiveMeAnAvatar.csproj` file. The versioning scheme we use is [SemVer](http://semver.org/).
4. You may merge the Pull Request in once you have the sign-off of another developer, or if you
do not have permission to do that, you may request the reviewer to merge it for you.

## Code of Conduct

### Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

### Our responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

### Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

### Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at [http://contributor-covenant.org/version/1/4][version]

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
12 changes: 12 additions & 0 deletions .github/issue_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
## Select type of issue
<!--- Put an `x` in a box that applies: -->
- [ ] Bug
- [ ] Feature request

## If it's a bug...
**Please explain what the issue is and the steps to reproduce the issue in as much detail below.**
(Insert comment here)

## If it's a feature request...
**Please explain your request and why you'd like to see it in this service.**
(Insert comment here)
17 changes: 17 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
## What has changed and why?
(Insert description here)

## Checklist
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [ ] I have read the `CONTRIBUTING` document.
- [ ] My code follows the code style of this project.
- [ ] My change requires to update the console app that outlines how to use the NuGet package.
- [ ] My change requires a change to the documentation in the `README` file.
- [ ] I have updated the documentation in the `README` file accordingly.
- [ ] I have updated the version number in the [`GiveMeAnAvatar.csproj`](https://github.com/ClydeDz/give-me-an-avatar-nuget/blob/main/src/GiveMeAnAvatar/GiveMeAnAvatar.csproj) file using the [SemVer](https://semver.org/) format.
- [ ] I have added tests to cover my changes.
- [ ] All new and existing tests passed.

Binary file added Icon.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
69 changes: 68 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,68 @@
# give-me-an-avatar-nuget
<div align="center">
<br>
<img width="172" src="https://raw.githubusercontent.com/ClydeDz/give-me-an-avatar-npm/main/icon.jpg" alt="Give me an avatar npm package icon">
<br>
<br>
</div>

# Give Me an Avatar
Gets a random avatar URL from a collection of different avatar generation services.

## Installation and usage
Library can either be directly downloaded from [Nuget.org](https://www.nuget.org/packages/give-me-an-avatar/), OR installed via the [NuGet Package Manager UI](https://docs.microsoft.com/en-us/nuget/tools/package-manager-ui#finding-and-installing-a-package) or via the [Package Manager Console](https://docs.microsoft.com/en-us/nuget/tools/package-manager-console) if you're using Visual Studio.

Command to install Give Me an Avatar NuGet via the Package Manager Console UI in Visual Studio shown below.
```PowerShell
PM> Install-Package give-me-an-avatar
```

Include the namespace in your program.
```C#
using GiveMeAnAvatar;
```

Then go ahead and consume it.
```C#
var avatarURL= GiveMeAnAvatar.GetAvatarURL();
```

Or supply optional settings to get a slightly customized avatar URL.
```C#
var settings = new AvatarSettings() { Name = "John Smith", Size = 124 };
var avatarURL= GiveMeAnAvatar.GetAvatarURL(settings);
```



## Supported avatar services

| Service | Avatar example |
|--------------------------------------------|------------------------------------------------------|
| [placeholder.com](https://placeholder.com) | ![image](https://via.placeholder.com/128?Text=J%20S) |
| [placeimg.com](https://placeimg.com) | ![image](https://placeimg.com/128/128/people) |
| [placekitten.com](https://placekitten.com) | ![image](https://placekitten.com/g/128/128?cache=invalidate) |
| [dummyimage.com](https://dummyimage.com/) | ![image](https://dummyimage.com/128x128&text=J%20S) |
| [loremflickr.com](https://loremflickr.com) | ![image](https://loremflickr.com/128/128/human) |
| [baconmockup.com](https://baconmockup.com) | ![image](https://baconmockup.com/128/128/) |
| [placebeard.it](https://placebeard.it) | ![image](https://placebeard.it/128) |
| [fakeimg.pl](https://fakeimg.pl) | ![image](https://fakeimg.pl/128x128/?text=John%20Smith&font=bebas) |
| [thispersondoesnotexist.com](https://thispersondoesnotexist.com/) | <img src="https://thispersondoesnotexist.com/image" width="128"/> |
| [picsum.photos](https://picsum.photos/) | ![image](https://picsum.photos/128) |
| [fillmurray.com](https://www.fillmurray.com) | ![image](https://www.fillmurray.com/128/128) |
| [placecage.com](https://www.placecage.com) | ![image](https://www.placecage.com/128/128) |
| [stevensegallery.com](https://www.stevensegallery.com) | ![image](https://www.stevensegallery.com/128/128) |
| [gravatar.com](https://www.gravatar.com) | ![image](https://www.gravatar.com/avatar/default?s=128) |
| [ui-avatars.com](https://www.ui-avatars.com) | ![image](https://ui-avatars.com/api/?background=random&size=128&name=J%20S) |
| [generative-placeholders.glitch.me](https://generative-placeholders.glitch.me) | ![image](https://generative-placeholders.glitch.me/image?width=128&height=128) |
| [robohash.org](https://robohash.org) | ![image](https://robohash.org/John%20Smith?size=128x128&set=set1) ![image](https://robohash.org/John%20Smith?size=128x128&set=set2) ![image](https://robohash.org/John%20Smith?size=128x128&set=set3) ![image](https://robohash.org/John%20Smith?size=128x128&set=set4) |
| [avatars.dicebear.com](https://avatars.dicebear.com) | ![image](https://avatars.dicebear.com/4.5/api/gridy/John%20Smith.svg?w=128&h=128) ![image](https://avatars.dicebear.com/4.5/api/human/John%20Smith.svg?w=128&h=128) ![image](https://avatars.dicebear.com/4.5/api/identicon/John%20Smith.svg?w=128&h=128) ![image](https://avatars.dicebear.com/4.5/api/jdenticon/John%20Smith.svg?w=128&h=128) ![image](https://avatars.dicebear.com/4.5/api/avataaars/John%20Smith.svg?w=128&h=128) ![image](https://avatars.dicebear.com/4.5/api/bottts/John%20Smith.svg?w=128&h=128) |
| [avatar.uimaterial.com](https://avatar.uimaterial.com) | ![image](https://avatar.uimaterial.com/?setId=0496UVJDTqyd2eCIAa46&name=John%20Smith&size=128) ![image](https://avatar.uimaterial.com/?setId=8Pfmys5bgfL2NbXFG2sU&name=John%20Smith&size=128) ![image](https://avatar.uimaterial.com/?setId=SM2u3518GjohwtHQXNK0&name=John%20Smith&size=128) ![image](https://avatar.uimaterial.com/?setId=Pb7ErSM37KjjIZyJk8w6&name=John%20Smith&size=128) |

## Notes
* I'm not using [avataaars](https://avataaars.io/) separately since [avatars.dicebear.com](https://avatars.dicebear.com) includes avataaars.
* Placekitten image might appear broken at times in the table above, however, the image service itself runs fine.

## Credits
- All the avatar services used in this npm package are outlined in the table above.
- Package logo created using [AutoDraw](https://www.autodraw.com/).
- This NPM package is developed by [Clyde D'Souza](https://twitter.com/clydedz).
10 changes: 10 additions & 0 deletions src/GiveMeAnAvatar/GiveMeAnAvatar.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,16 @@
<Copyright>Copyright (c) 2020 Clyde D'Souza</Copyright>
<PackageProjectUrl>https://github.com/ClydeDz/give-me-an-avatar-nuget</PackageProjectUrl>
<RepositoryUrl>https://github.com/ClydeDz/give-me-an-avatar-nuget</RepositoryUrl>
<PackageIcon>Icon.jpg</PackageIcon>
<PackageReleaseNotes>Development release</PackageReleaseNotes>
<PackageTags>avatar avatar-generator avatar-library random-avatar</PackageTags>
</PropertyGroup>

<ItemGroup>
<None Include="..\..\Icon.jpg">
<Pack>True</Pack>
<PackagePath></PackagePath>
</None>
</ItemGroup>

</Project>

0 comments on commit 94773e7

Please sign in to comment.