Code Monkey home page Code Monkey logo

oik-tip's Introduction

oik-tip

banner

Description

oik-tip.php packages the source files for a WordPress theme into a .zip file ready for release to the general public.

The packaging process ensures up to date versions are released

  • update the theme's style.css
  • update the theme's readme.txt
  • build a new version of the README.md file for GitHub

What it does not do:

  • Create minimised versions of .css and .js files
  • run Unit Tests
  • perform translation
  • update the API reference

Installation

  1. Upload the contents of the oik-tip plugin to the `/wp-content/plugins/oik-tip' directory
  2. Create a batch file called tip.bat to invoke the oik-tip routine, through oik-wp.php from oik-batch
php c:\apache\htdocs\wordpress\wp-content\plugins\oik-batch\oik-wp.php c:\apache\htdocs\wordpress\wp-content\plugins\oik-tip\oik-tip.php %*

Frequently Asked Questions

How does it work?

Read the code

What are the dependencies?

  • 7-ZIP
  • an editor
  • t2m - convert a readme.txt file to README.md ( github.com/bobbingwide/txt2md )

Does it use Composer?

No. But it may be enabled for use with Composer

Why not WP-CLI?

Now that I need most of WordPress to do all the things I'm working towards using WP-CLI primarily to handle command line parameters.

Is it integrated with Git?

It will be, when I've made more progress with the oik-git shared library.

Is it integrated with SVN?

No. Updating the SVN version is currently a manual process performed after creating the .zip and updating GitHub.

Screenshots

  1. oik-tip in action - not actually taken

Upgrade Notice

0.0.2

Tested with WordPress 4.6-RC2

0.0.1

Now includes the custom.css file.

0.0.0

Finally put under version control. First version of the plugin, available from GitHub and oik-plugins.

Changelog

0.0.2

  • Changed: Now needs to be run under oik-wp
  • Changed: Corrected descriptions, which had been swapped between oik-tip and oik-zip

0.0.1

  • Changed: Includes the custom.css file in the .zip file. First part [github bobbingwide oik-tip issue 1]

0.0.0

  • Added: First version on GitHub

oik-tip's People

Contributors

bobbingwide avatar

Watchers

 avatar  avatar

oik-tip's Issues

oik-tip dependent upon files from oik-batch

When running oik-tip against a theme in a sub-directory install where oik-batch is not available we get a Fatal error.

Fatal error: require_once(): Failed opening required 
'C:\apache\htdocs\hallsgs/wp-content/plugins/oik-batch/oik-login.inc' 
(include_path='.;C:\php\pear') in
C:\apache\htdocs\wordpress\wp-content\plugins\oik-bwtrace\libs\oik_boot.php on line 80 

In another instance it was

Fatal error: Uncaught Error: Call to undefined function oik_batch_load_cli_functions() in C:\apache\htdocs\tags\wp-content\plugins\tags\tags.php:48

Workaround

Create a symlink to oik-batch. The plugin doesn't need to be activated.

Support running oik-tip to package a theme in a WPMS installation

When I changed oik-tip so that it was run under oik-wp I didn't test it to package a theme in a WPMS environment.

Running tip rjdap v0.0.6 produces Warning: Cannot modify header information even when passing the --url=qw/rjduk parameter.

It would have been easier to analyse this problem had Windows not updated itself last night.
I would then have been able to report the other problem with docontinue() being redeclared.
Now I'm going to have to reproduce the problems all over again.
That's wasted nearly an hour!

Fatal error: Cannot redeclare docontinue() (previously declared in C:\apache\htdocs\wordpress\wp-content\plugins\oik-batch\libs\oik-cli.php:305) in C:\apache\htdocs\wor
dpress\wp-content\plugins\oik-tip\oik-tip.php on line 56
C:\apache\htdocs\rjduk\wp-content\themes>

Update oik-tip to work with the new default branch name - main

During packaging the readme.txt file is transformed to the markdown file README.md.

GitHub has changed the name of the main branch from master to main.
This needs to be reflected in any URLs which contain the main branch name.
For the theme packaging routine this is the screenshot.png file.

See bobbingwide/txt2md#1
which has already been changed for oik-zip.

Should oik-tip include a custom.css file when packing?

The oik base plugin supports the use of a custom.css file which is edited using the theme editor. If we deliver a custom.css file as part of a new version of the theme we can override the custom.css file that's in use. Should the user therefore use a differently named file or what.

Temporary solution

While the jury is out, we'll allow the custom.css file to be zipped if it's present in the theme's directory structure.

Permanent solution

Only include the custom.css file if it's committed as part of the Git repo.

Improve in line with oik-zip

Several improvements have been made or are planned for oik-zip. oik-tip should be similar.

  • Correct readme
  • Run under oik-wp
  • Invoke txt2md using PHP ( co-req change to txt2md )
  • README.md should include the theme's screenshot

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.