Skip to content

Commit

Permalink
Improved documentation for parse-schedule.php.
Browse files Browse the repository at this point in the history
  • Loading branch information
cfinke committed Feb 9, 2023
1 parent 75020c1 commit 5f7fa3d
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions parse-schedule.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
<?php

/**
* This script takes the cron-style schedule file and generates a JavaScript file that
* the web app can use.
*
* This is necessary because client-side JavaScript can't enumerate files in directories.
*/

/**
* Usage: php parse-schedule.php --schedule schedule.txt
* By default, the script will read the existing programming.js file in order to
* re-use any previously computed durations. To force it to re-examine every
* file, add the optional --flush parameter.
*/

$options = getopt( '', array( 'schedule:', 'flush' ) );

if ( ! isset( $options['schedule'] ) ) {
Expand Down

0 comments on commit 5f7fa3d

Please sign in to comment.