azurecurve ClassicPress Plugin: Get GitHub File

ClassicPress PluginsThis is part of the which introduces the plugins I have available for ClassicPress.

The plugin I am going to cover in this post, is a brand new one written for ClassicPress; Get Github File.

Functionality

Gets the content of a file from a GitHub repository and outputs using a shortcode.

Settings allow default options, such as author, folder, filename to be specified. Additional options to allow the removal or conversion of WordPress headers in readme.txt files.

Available shortcode parameters:

  • account – account on GitHub
  • branch – branch to get file from
  • folder – folder containing the file
  • file – file to get from GitHub repository
  • repository – name of GitHub repository
  • startfrom – text in file to start outputting from (e.g. # Description)
  • htmlastext – 1 to output HTMl as text and 0 to output as HTML
  • shortcodesastext – 1 to output shortcodes as text and 0 to output as shortcode
  • wordpresstitles – remove/ignore/convert

All parameters except repository can be defined as defaults in settings.

Output is in markdown, but use of a plugin such as Markdown by azurecurve can convert this markdown to HTML markup.

Download

The plugin can be downloaded via my Development site.

ClassicPress Development with TortoiseGit: Revert Last Commit

TortoiseGitWhen I started developing plugins for ClassicPress I decided that I needed to be using source control. As ClassicPress is intending to use GitHub for their plugin directory, it made sense for me to use it as well. This post is part of a series on ClassicPress Development with TortoiseGit which is a sub-series of the ClassicPress Development with GitHub series.

When you have changes committed to GitHub, you need to make a release of your plugin. Making a release has two main benefits:

  1. It labels the files in the repository with a tag making it easy to download a particular version of the plugin.
  2. You can upload a zip file containing the plugin folder giving a zip file which users can download and upload to their ClassicPress site.

To create a release, open the GitHub repository page and click the releases link at the top (ringed in red):

Github repository

Continue reading “ClassicPress Development with TortoiseGit: Revert Last Commit”

ClassicPress Development with TortoiseGit: Commit

TortoiseGitWhen I started developing plugins for ClassicPress I decided that I needed to be using source control. As ClassicPress is intending to use GitHub for their plugin directory, it made sense for me to use it as well. This post is part of a series on ClassicPress Development with TortoiseGit which is a sub-series of the ClassicPress Development with GitHub series.

Once the repository has been cloned and changes made, you need to submit the changes back to the repository to keep control of changes. This is referred to as a “commit”. To commit your change, right-click the folder (or file) to commit and select Git Commit -> “master” on the context menu:

Git Commit

Continue reading “ClassicPress Development with TortoiseGit: Commit”

ClassicPress Development with TortoiseGit: Clone Repository

TortoiseGitWhen I started developing plugins for ClassicPress I decided that I needed to be using source control. As ClassicPress is intending to use GitHub for their plugin directory, it made sense for me to use it as well. This post is part of a series on ClassicPress Development with TortoiseGit which is a sub-series of the ClassicPress Development with GitHub series.

With TortoiseGit installed we can start using it for managing source control on projects. The first thing you will want to do is to make a copy of your GitHub repository on your PC so you can amend files. In TortoiseGit terms this is done by cloning the repository.

On my local PC I have a folder called Plugins into which I want to close a repository. To do this, right-click the folder and select Git Clone from the context menu:

Right-click menu showing the clone option

Continue reading “ClassicPress Development with TortoiseGit: Clone Repository”

ClassicPress Development with TortoiseGit: Update

TortoiseGitWhen I started developing plugins for ClassicPress I decided that I needed to be using source control. As ClassicPress is intending to use GitHub for their plugin directory, it made sense for me to use it as well. This post is part of a series on ClassicPress Development with TortoiseGit which is a sub-series of the ClassicPress Development with GitHub series.

TortoiseGit is like any other application and should be updated when an update is available. Fortunately, it comes with automatic updates includes. You will receive a popup telling you there is an update available; click Download to download the new version:

Check For Updates - TortoiseGit: New version available

Continue reading “ClassicPress Development with TortoiseGit: Update”

ClassicPress Development with TortoiseGit: First run

TortoiseGitWhen I started developing plugins for ClassicPress I decided that I needed to be using source control. As ClassicPress is intending to use GitHub for their plugin directory, it made sense for me to use it as well. This post is part of a series on ClassicPress Development with TortoiseGit which is a sub-series of the ClassicPress Development with GitHub series.

On the last stage of installing TortoiseGit had the run First Start Wizard marked. When the First Start Wizard launches, select your language and click Next:

First Start Wixzard - TortoiseGit: Welcome to TortoiseGit

Continue reading “ClassicPress Development with TortoiseGit: First run”

ClassicPress Development with TortoiseGit: Install TortoiseGit for Windows

TortoiseGitWhen I started developing plugins for ClassicPress I decided that I needed to be using source control. As ClassicPress is intending to use GitHub for their plugin directory, it made sense for me to use it as well. This post is part of a series on ClassicPress Development with TortoiseGit which is a sub-series of the ClassicPress Development with GitHub series.

With Git for Windows installed, we can move onto installing TortoiseGit itself. TortoiseGit can be downloaded from here:

Download TortoiseGit

Continue reading “ClassicPress Development with TortoiseGit: Install TortoiseGit for Windows”

ClassicPress Development with TortoiseGit: Install Git for Windows

TortoiseGitWhen I started developing plugins for ClassicPress I decided that I needed to be using source control. As ClassicPress is intending to use GitHub for their plugin directory, it made sense for me to use it as well. This post is part of a series on ClassicPress Development with TortoiseGit which is a sub-series of the ClassicPress Development with GitHub series.

A key prerequisite for installing TortoiseGit is an already installed (command line) Git client which provides a git.exe. The recommended one if Git for Windows which is, the only one, used by the developers of TortoiseGit. The application can be downloaded from Git for Windows:

Download Git for Windows

Continue reading “ClassicPress Development with TortoiseGit: Install Git for Windows”

ClassicPress Development with TortoiseGit: What is TortoiseGit?

TortoiseGitWhen I started developing plugins for ClassicPress I decided that I needed to be using source control. As ClassicPress is intending to use GitHub for their plugin directory, it made sense for me to use it as well. This post is part of a series on ClassicPress Development with TortoiseGit which is a sub-series of the ClassicPress Development with GitHub series.

Project on GitHub can be managed through the web interface, but it can be very useful to have an application installed on the computer(s) on which you are developing. I’ve been a longtime user of TortoiseSVN for developing my WordPress Plugins, so when looking around for a Windows GIT client, it seemed natural to use TortoiseGit.

TortoiseGit is a Git revision control client, implemented as a Windows shell extension and, useful for me due to prior experience, based on TortoiseSVN; TortoiseGit is released under the GNU General Public License so is free for use.

TortoiseGit is written as a shell extension which gives you access to commands by right-clicking a file or folder. Over the next few posts, I will be taking a look at both the installation and use of TortoiseGit.

ClassicPress Development with TortoiseGit
What is TortoiseGit?
Install Git for Windows
Install TortoiseGit for Windows
First run
Update
Clone Repository
Commit
Revert Last Commit

ClassicPress Development with TortoiseGit: Series Index

TortoiseGitWhen I started developing plugins for ClassicPress I decided that I needed to be using source control. As ClassicPress is intending to use GitHub for their plugin directory, it made sense for me to use it as well.

While you can manage your uploads and everything from the GitHub website, I decided it would be somewhat easier to use a Windows application and having used TortoiseSVN, I opted for TortoiseGit. This post is the series index for a sub-series of posts on using TortoiseGit, which is a sub-series of the ClassicPress Development with TortoiseGit series.

ClassicPress Development with TortoiseGit
What is TortoiseGit?
Install Git for Windows
Install TortoiseGit for Windows
First run
Update
Clone Repository
Commit
Revert Last Commit

This is a weekend series of posts with new posts going live over the next few weeks. If you’re reading this on azurecurve|Ramblings of a Dynamics GP Consultant the index will update automatically.