About Features Downloads Getting Started Documentation Events Support GitHub

Love VuFind®? Consider becoming a financial supporter. Your support helps build a better VuFind®!

Site Tools


Warning: This page has not been updated in over over a year and may be outdated or deprecated.
administration:command_line_utilities

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
administration:command_line_utilities [2019/12/17 20:54] – [util controller] demiankatzadministration:command_line_utilities [2023/04/20 14:53] (current) demiankatz
Line 5: Line 5:
 ===== Running the Tools ===== ===== Running the Tools =====
  
-The command line tools are organized into controllers and actions, just like the web portion of the VuFind application. (See the VuFindConsole module of the code for the implementation details). The specific controllers and actions are documented below. Once you know which one you need, you can run it following these instructions.+The command line tools are organized into categories and actions, similar to the web portion of the VuFind application. (See the VuFindConsole module of the code for the implementation details). The specific categories and actions are documented below. Once you know which one you need, you can run it following these instructions.
  
-==== Using Zend Framework ====+==== Using the Index Script ====
  
-In VuFind 2.4 or newer, the most consistent way to run command line tools is to run them through Zend Framework directly using the application's index.php script.+In VuFind 2.4 or newer, the most consistent way to run command line tools is to run them through VuFind's framework directly using the application's index.php script.
  
-The "PHP scripts in directory" approach to command line utilities was designed for backward compatibility with the structure of early VuFind releases. However, the introduction of Zend Framework in VuFind 2 allowed a route-based approach where all commands can be invoked through a single endpoint -- the application's index.php script.+The "PHP scripts in directory" approach to command line utilities was designed for backward compatibility with the structure of early VuFind releases. However, the introduction of a formal framework in VuFind 2 allowed a route-based approach where all commands can be invoked through a single endpoint -- the application's index.php script.
  
 <code> <code>
-php $VUFIND_HOME/public/index.php [controller] [action] [additional parameters]+php $VUFIND_HOME/public/index.php [category] [action] [additional parameters]
 </code> </code>
 +
 +The code was implemented using the Zend\Console package until release 7.0, when that package was deprecated and had to be replaced with Symfony\Console. Only the internals changed, so the process of running the scripts remained the same -- see the blog post [[https://blog.library.villanova.edu/2020/04/23/vufind-moving-from-laminasconsole-to-symfonyconsole/|Moving from Laminas\Console to Symfony\Console]] for more history and details.
  
 ==== Using Legacy Wrapper Scripts ==== ==== Using Legacy Wrapper Scripts ====
  
-Prior to VuFind 2.4, the only way to access command line scripts was to run PHP scripts whose filenames corresponded with action names, and which were stored in directories corresponding with controller names. These could be run like this:+Prior to VuFind 2.4, the only way to access command line scripts was to run PHP scripts whose filenames corresponded with action names, and which were stored in directories corresponding with category names. These could be run like this:
  
 <code> <code>
-php $VUFIND_HOME/controller/action.php [additional parameters]+php $VUFIND_HOME/category/action.php [additional parameters]
 </code> </code>
  
Line 39: Line 41:
 </code> </code>
  
-Most of these actions are also summarized below, grouped by controller. However, in case this documentation falls out of date, the index.php output is always the most current way of finding all available tools.+Most of these actions are also summarized below, grouped by category. However, in case this documentation falls out of date, the index.php output is always the most current way of finding all available tools.
  
-==== compile controller ====+==== compile category ====
  
-The compile controller contains the [[administration:performance#theme_compiler|theme compiler]] that was introduced in VuFind 4.1.+The compile category contains the [[administration:performance#theme_compiler|theme compiler]] that was introduced in VuFind 4.1.
  
-==== generate controller ====+==== generate category ====
  
-The generate controller (introduced in release 2.4) contains code generation tools to help automate common VuFind customization tasks. It is documented in more detail on the [[development:code_generators|code generators]] page.+The generate category (introduced in release 2.4) contains code generation tools to help automate common VuFind customization tasks. It is documented in more detail on the [[development:code_generators|code generators]] page.
  
-==== harvest controller ====+==== harvest category ====
  
-The harvest controller contains tools for collecting and managing records prior to import into VuFind.+The harvest category contains tools for collecting and managing records prior to import into VuFind.
  
 Actions: Actions:
Line 58: Line 60:
   * merge-marc  \\ Tool for merging individual MARC records together into a single collection (useful for improving import speed after harvesting records).   * merge-marc  \\ Tool for merging individual MARC records together into a single collection (useful for improving import speed after harvesting records).
  
-==== import controller ====+==== import category ====
  
-The import controller contains tools for loading records into VuFind's Solr index.+The import category contains tools for loading records into VuFind's Solr index.
  
 Actions: Actions:
Line 67: Line 69:
   * webcrawl \\ Tool for populating the website index when [[indexing:websites|indexing websites]].   * webcrawl \\ Tool for populating the website index when [[indexing:websites|indexing websites]].
  
-==== language controller ====+==== install category ==== 
 + 
 +Introduced in VuFind 7.0, the install category integrates the formerly stand-alone install.php script with VuFind's core console infrastructure. 
 + 
 +Actions: 
 +  * install \\ Run the install script to set up [[development:architecture:customizing_vufind#modules|local modules]], adjust Apache configuration, etc. 
 + 
 +==== language category ====
  
-The language controller contains tools for managing VuFind's i18n language files.+The language category contains tools for managing VuFind's i18n language files.
  
 Actions: Actions:
Line 78: Line 87:
   * normalize \\ Normalize (sort/deduplicate/tidy) a directory of language files.   * normalize \\ Normalize (sort/deduplicate/tidy) a directory of language files.
  
-==== scheduledsearch controller ====+==== scheduledsearch category ====
  
-The scheduledsearch controller is used for tasks related to VuFind's [[configuration:email_alerts|Email Alerts]] functionality.+The scheduledsearch category is used for tasks related to VuFind's [[configuration:email_alerts|Email Alerts]] functionality.
  
 Actions: Actions:
Line 86: Line 95:
   * notify \\ Send out new notification emails, as needed.   * notify \\ Send out new notification emails, as needed.
  
-==== util controller ====+==== util category ====
  
-The util controller is a catch-all for a variety of useful utilities.+The util category is a catch-all for a variety of useful utilities.
  
 Actions: Actions:
Line 95: Line 104:
   * commit \\ Commit the Solr index.   * commit \\ Commit the Solr index.
   * createHierarchyTrees \\ Populate the hierarchy cache when using [[indexing:hierarchies_and_collections|hierarchies and collections]].   * createHierarchyTrees \\ Populate the hierarchy cache when using [[indexing:hierarchies_and_collections|hierarchies and collections]].
-  * cssBuilder \\ Compile LESS files into CSS within all themes.+  * cssBuilder \\ Compile LESS files into CSS within all themes. (:!: Deprecated as of VuFind 8.0 and removed in VuFind 9.0; use "[[development:npm|npm run build:css]]" instead)
   * dedupe \\ Remove duplicate lines from a text file.   * dedupe \\ Remove duplicate lines from a text file.
   * deletes \\ Remove all of the records in a specified MARC or text file from the Solr index.   * deletes \\ Remove all of the records in a specified MARC or text file from the Solr index.
Line 105: Line 114:
   * lint_marc \\ Check a MARC file for errors.   * lint_marc \\ Check a MARC file for errors.
   * optimize \\ Optimize the Solr index.   * optimize \\ Optimize the Solr index.
 +  * purge_cached_record \\ Purge a cached record and optionally a resource from the database. (This command was added in release 9.0).
 +  * scssBuilder \\ Compile SCSS files into CSS within all themes.
   * sitemap \\ Generate a sitemap for use with search engines.   * sitemap \\ Generate a sitemap for use with search engines.
   * suppressed \\ Delete all currently suppressed catalog records from the Solr index.   * suppressed \\ Delete all currently suppressed catalog records from the Solr index.
   * switch_db_hash \\ Change the password hashing algorithm in the database and configuration.   * switch_db_hash \\ Change the password hashing algorithm in the database and configuration.
 ---- struct data ---- ---- struct data ----
 +properties.Page Owner : 
 ---- ----
  
administration/command_line_utilities.1576616073.txt.gz · Last modified: 2019/12/17 20:54 by demiankatz