Difference between revisions of "PipedStylesheets.bash"

From TEIWiki
Jump to navigation Jump to search
Line 8: Line 8:
  
 
== Detailed Instructions ==
 
== Detailed Instructions ==
# Log into a commandline interface to a bash-enabled system, e.g. Mac OS X or Debian
+
# Log into a commandline interface to a bash-enabled system, e.g. Mac OS X or Debian GNU/Linux.
GNU/Linux.
 
 
# Create a new directory (if needed), and cd into it. E.g. <tt>mkdir ~/Desktop/p42p5/; cd ~/Desktop/p42p5/</tt>.
 
# Create a new directory (if needed), and cd into it. E.g. <tt>mkdir ~/Desktop/p42p5/; cd ~/Desktop/p42p5/</tt>.
# If your bash executable is '''not''' <tt>/bin/bash</tt>, then change '''both''' occurences of the string "/bin/bash" to a working path to the bash executable. You can  
+
# If your bash executable is '''not''' <tt>/bin/bash</tt>, then change '''both''' occurences of the string "/bin/bash" to a working path to the bash executable. You can probably ascertain such a path with the command <tt>which bash</tt>.
probably ascertain such a path with the command <tt>which bash</tt>.
+
# Copy all of the desired stylesheets into the new and current directory. You may want to get all or some of the stylesheets at [[Category:P4toP5|P4toP5]], and you may want [[Remove-Default-Attributes.xsl]], although remember that it only works on the elements  & attributes in TEI Lite (P4 XML), and does not understand namespaces (and thus should be 'before' [[Dot-two.xslt]]).
# Copy all of the desired stylesheets into the new and current directory. You may want to get all or some of the stylesheets at [[Category:P4toP5]], and you may want  
 
  
  
 
[[Category:P4toP5]]
 
[[Category:P4toP5]]
 
[[User:Syd|Syd]] 07:15, 26 May 2006 (BST)
 
[[User:Syd|Syd]] 07:15, 26 May 2006 (BST)

Revision as of 08:20, 26 May 2006

Idea

This is a shell script (in the bash language) that executes each stylesheet it finds in its own directory on the specified input file.

Quick Usage Summary

Copy this script and all the stylesheets you want to execute into a single directory. Make sure that the stylesheets all end in ".xslt" and are named such that they are sorted in the order you wish to have them executed. Then run the script.

Detailed Instructions

  1. Log into a commandline interface to a bash-enabled system, e.g. Mac OS X or Debian GNU/Linux.
  2. Create a new directory (if needed), and cd into it. E.g. mkdir ~/Desktop/p42p5/; cd ~/Desktop/p42p5/.
  3. If your bash executable is not /bin/bash, then change both occurences of the string "/bin/bash" to a working path to the bash executable. You can probably ascertain such a path with the command which bash.
  4. Copy all of the desired stylesheets into the new and current directory. You may want to get all or some of the stylesheets at, and you may want Remove-Default-Attributes.xsl, although remember that it only works on the elements & attributes in TEI Lite (P4 XML), and does not understand namespaces (and thus should be 'before' Dot-two.xslt).

Syd 07:15, 26 May 2006 (BST)