Open bobbingwide opened 8 years ago
When generating plugin and theme .zip files then the banner and icon images do not need to be included.
Changed the requirement to handle just the banner image.
We look for files ending -banner-772x250.jpg
in the assets
folder.
If we want to display the icon image as well this will have to be a separate issue.
Rather than hard coding the owner we could extract this from the list of Contributors.
We need to be able to support both plugins and themes. Probably the easiest way to achieve this is to implement https://github.com/bobbingwide/oik-zip/issues/1, then we can pass parameters. When invoked directly from the command line the code will echo the output to stdout. When invoked by oik-zip or oik-tip ( under control of oik-wp ) it will need to be told what to do.
The pragmatic solution was to look for the files and add the links if we find them. This works for plugins and themes.
Well, since this issue's still open. The logic now needs to correctly set the branch name.
It used to default to master
but now it defaults to main
.
Note: When first created using git init the main branch is called main
on GitHub.
The logic in display_screenshot()
also needs to be updated to support the branch.
Note: It already supports the $owner
, but this is hardcoded to 'bobbingwide'.
Also, since this issue's still open. The logic needs to cater for the owner name being other than bobbingwide
. eg wppompey
.
When viewing a WordPress plugin / theme on wordpress.org, if available from assets the banner or icon image is displayed, depending on the context.
The GitHub display of the README.md file supports the display of images. I would like to enhance the generated README.md file so that it displays the banner image appropriately.
Proposed solution
Change txt2md to detect the banner file in the git repo and create the appropriate image link
![banner](https://raw.githubusercontent.com/bobbingwide/oik-ajax/master/assets/oik-ajax-banner-772x250.jpg)
See http://github.com/bobbingwide/oik-ajax for a full example