-
Notifications
You must be signed in to change notification settings - Fork 579
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
ImageDimensionBear #1260
Comments
Marking this as blocked, as ideally the authors of that tool come together and publish their code in a separate ruby gem, so it can be used by coala. |
@jayvdb -- that script would need to be radically refactored to handle non-square dimensions...I have a few ideas on how to do this. I'll work on it later today. |
The current script is highly specialized for FOSSASIA's GCI16 site -- I could probably make this more generic and package it up as a gem. I do not think this should be a GCI task -- students need to work on harder things right now...I'll help out with this one. |
What would be REALLY cool with this bear existing is that it can actually resize the images for you! |
Ok then @robbyoconnor sir go on, just take a turn to me when you are looking for a magical touch. |
Polishing code so it is generic and packaging are a really useful set of skills, and a completely valid GCI task. I am happy to write it up. But the problem is authorship. You three need to decide on a license, repository location, etc, etc. That discussion can (and should) happen privately between the three of you -- not here please! If you dont package the current ruby code, in a reasonable timeframe, I'll unblock this task and we'll write a generic tool in Python. |
Is there a task for it @jayvdb |
@Abhi2424shek -- if you wanna work on this -- I'll help you out -- the main reason I did what I did and rewrote it was I saw a lot of repeated code. I'd like that to remain. As far as stuff I did to it - a lot of my work was simply DRY'ing up the code and bringing it in-line with the ruby style guide. |
As far as license, it'd have to be GPL. It's a derivative work. |
https://github.com/robbyoconnor/ImageSizeLinter/ -- we can pull it back into the GCI site afterwards |
@jayvdb -- that work? |
@robbyoconnor @jayvdb can I sir, but I think it's more good to create a repository and where we three of us (myself, @ankitrgadiya and @robbyoconnor) could code together and create the ruby gem there for this issue. |
@Abhi2424shek -- hilariously -- it's never been frowned upon to queue up tasks... so go for it! |
@jayvdb can you share the link to the gci task for us pls and the ruby gem would be ready by evening today IST |
The task for the ruby gem was created a few days ago, and is still unpublished, but here is the link https://codein.withgoogle.com/tasks/5746072943067136/ The task for the coala bear which uses the ruby gem has just been created so it is also unpublished, but again here is the link https://codein.withgoogle.com/tasks/6269128656551936/ |
@jayvdb thanks we will just accept it when the task comes alive! |
@jayvdb the gems published; link to repo: https://github/Abhi2424shek/img_checker Install gem by: gem install img_checker Check the gem: https://rubygems.org/gems/img_checker |
@jayvdb Just being curious how are rubygems useful in the making of a bear? Also will this bear serve its purpose for linting in any language or will it be ruby specific? Pardon me if I am wrong saying anything as I am not acquainted with the working of coala-bears. I just seem to have a rough idea seeing the repository structure. |
@ananyo2012, In the same way that rubocop is used. It provides a means to get the linter. It allows others outside of coala to use it as well. It's a way to package it up. |
@robbyoconnor Yes use outside coala as a gem is fine. I was asking with relation to use in coala-bears. rubocop works as a ruby linter only. So is this something as ruby specific or can we use it in generalized way? |
@ananyo2012 the linter happens to be a Ruby script. The Image Linter can be used outside of Ruby -- it literally checks the image dimensions (for now). It could be extended to check image size as well. |
@ananyo2012 coala has a LinterBear subclass. Which can run any executable and parse its output. |
@nemaniarjun is correct. That's the reason it's packaged as a gem. |
fwiw, a working prototype is at #1288 |
Added ImageDimensionBear.py in bears/general, that runs the gem img_checker to see if images follow provided dimensions. Also added unittest for the bear, ImageDimensionBearTest.py in tests/general Closes coala#1260
Added ImageDimensionBear.py in bears/general, that runs the gem img_checker to see if images follow provided dimensions. Also added unittest for the bear, ImageDimensionBearTest.py in tests/general Closes coala#1260
Added ImageDimensionBear.py in bears/general, that runs the gem img_checker to see if images follow provided dimensions. Also added unittest for the bear, ImageDimensionBearTest.py in tests/general Closes coala#1260
Added ImageDimensionBear.py in bears/general, that runs the gem img_checker to see if images follow provided dimensions. Also added unittest for the bear, ImageDimensionBearTest.py in tests/general Closes coala#1260
Added ImageDimensionBear.py in bears/general, that runs the gem img_checker to see if images follow given dimensions by user. Also added unittest for the bear, ImageDimensionBearTest.py in tests/general Closes coala#1260
Added ImageDimensionBear.py in bears/general, that runs the gem img_checker to see if images follow given dimensions by user. Also added unittest for the bear, ImageDimensionBearTest.py in tests/general Closes coala#1260
Added ImageDimensionBear.py in bears/general, that runs the gem img_checker to see if images follow given dimensions by user. Also added unittest for the bear, ImageDimensionBearTest.py in tests/general Closes coala#1260
Added ImageDimensionBear.py in bears/general, that runs the gem img_checker to see if images follow given dimensions by user. Also added unittest for the bear, ImageDimensionBearTest.py in tests/general Closes coala#1260
Added ImageDimensionBear.py in bears/general, that runs the gem img_checker to see if images follow given dimensions by user. Also added unittest for the bear, ImageDimensionBearTest.py in tests/general Closes coala#1260
This bear could have been used to prevent coala/coala#4078 from being merged , and check coala/coala#4081 . |
Added ImageDimensionBear.py in bears/general, that runs the gem img_checker to see if images follow given dimensions by user. Also added unittest for the bear, ImageDimensionBearTest.py in tests/general Closes coala#1260
Added ImageDimensionBear.py in bears/general, that runs the gem img_checker to see if images follow given dimensions by user. Also added unittest for the bear, ImageDimensionBearTest.py in tests/general Closes coala#1260
Added ImageDimensionBear.py in bears/general, that runs the gem img_checker to see if images follow given dimensions by user. Also added unittest for the bear, ImageDimensionBearTest.py in tests/general Closes coala#1260
Added ImageDimensionBear.py in bears/general, that runs the gem img_checker to check if images follow given dimensions by user. Also added unittest for the bear, ImageDimensionBearTest.py in tests/general Closes coala#1260
Added ImageDimensionBear.py in bears/general, that runs the gem img_checker to check if images follow given dimensions by the user. Also added unittest for the bear, ImageDimensionBearTest.py in tests/general Closes coala#1260
Added ImageDimensionBear.py in bears/general, that runs the gem img_checker to check if images follow given dimensions by the user. Also added unittest for the bear, ImageDimensionBearTest.py in tests/general Closes coala#1260
c.f #1259
fossasia/gci16.fossasia.org#239 was a feature request to add an image size linter.
FOSSASIA contributor @Abhi2424shek created the tool in fossasia/gci16.fossasia.org#467 .
History of it is split between https://github.com/fossasia/gci16.fossasia.org/commits/3ba48810d46416f32267c3f99f4d9498ac1399da/scripts/ImgChecker/ImgChecker.rb (with some enhancements by @ankitrgadiya) and https://github.com/fossasia/gci16.fossasia.org/commits/gh-pages/scripts/image_checker.rb after @robbyoconnor renamed it and radically improved it.
The current script is at:
https://github.com/fossasia/gci16.fossasia.org/blob/gh-pages/scripts/image_checker.rb
This issue is to create a coala bear with similar functionality.
The text was updated successfully, but these errors were encountered: