bobbingwide / txt2md

Convert a WordPress readme.txt file to Github README.md
GNU General Public License v2.0
1 stars 0 forks source link

Add logic to include the banner image in the generated README.md #1

Open bobbingwide opened 8 years ago

bobbingwide commented 8 years ago

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)

banner

See http://github.com/bobbingwide/oik-ajax for a full example

bobbingwide commented 8 years ago

When generating plugin and theme .zip files then the banner and icon images do not need to be included.

bobbingwide commented 8 years ago

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.

bobbingwide commented 8 years ago

Rather than hard coding the owner we could extract this from the list of Contributors.

bobbingwide commented 8 years ago

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.

bobbingwide commented 7 years ago

The pragmatic solution was to look for the files and add the links if we find them. This works for plugins and themes.

bobbingwide commented 4 years ago

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.

bobbingwide commented 4 years ago

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'.

bobbingwide commented 3 years ago

Also, since this issue's still open. The logic needs to cater for the owner name being other than bobbingwide. eg wppompey.