-
Notifications
You must be signed in to change notification settings - Fork 112
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
First Take w/ Github Image #7
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. The only thought I have is that maybe we offer two JSON files, one with the image data, and one without? This repo is about getting a list of cryptocurrencies, the images are just a bonus, but I think some use cases won't require the extra bloat from the image urls. What do you think
build.js
Outdated
const ImageFile = `${Name}.${extension}`; | ||
const ImagePath = path.join('images', ImageFile); | ||
|
||
if (fs.existsSync(ImagePath)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe we need to add a --force flag to the build then, because this checks for an existing image, but sometimes the icons change, and we will want a way to grab the updated images. We could get fancy with checksums, but it might be overkill.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes that's what I was thinking, a force flag should be beneficial.
Agreed, let's go ahead and do that. How about the API implementation ( |
|
Suggestions for the name of 2nd json file with images? |
Ideas:
|
@radiovisual Updated per PR comments.
|
Looks good to me. My main issue is with the GitHub hosting. If anyone is going to use this in a real application they would want the images delivered by a cdn, and to be hosted in a way that is scalable and reliable. So maybe we add a note (disclaimer) that the GitHub hosting is for reference only, but give them a build command to specify where the images should be saved, and generate their own custom JSON file with the updated paths, then we can recommend that they maintain their own build process in their own apps This would free us from having to maintain a database of these images (that would break someone's app every time we updated the list of images 😆 ), but give users the flexibility to do what they want with the images without the right to yell at us. 🤣 |
@radiovisual That's an excellent point. How about we include a build to generate a meta file for the images stored locally, and the current meta (will need to rename) file used only for the purpose of this repository's |
I like the idea of letting them generate their own metafile with references to the images, which forces them to maintain the images and the list on their own, and in this case, we don't even need to generate the meta JSON file at all, because if all we are doing is hosting the images to show in the list.md file, then we only need a file path for that in the .md file, which means we don't need to create a JSON file. So I vote for:
This way, they only thing we officially support is the somewhat up-to-date list of cryptocurrencies, with the build tool that lets users gain easy access to the image icons to use however they see fit...and we are pretty clear every step of the way that we aren't trying to maintain a versioned icon reference for anyone...since that would quickly become a nightmare to maintain. |
Decided to take a first stab of enhancing pre-existing work in the PR #6. This PR mainly is using this repository as a way to provide image to directly referenced (against ToS? not sure 👯♂️ ), as well as additional minor improvements. Feel free to revise / update anywhere accordingly
Changes Include:
list.md
, which now contains the icon imagesLet me know what you think @radiovisual