Manual 2 page renaming

From Bluefish Wiki
Revision as of 17:49, 21 July 2010 by Fal7i (talk | contribs) (→‎Usage)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Bill Valaski has renamed Manual 2 pages. Next step: update the links.

{{Man2top
|lang=en
|rev=2.0.0
|st=d
|Title=Chapter IX. Shortcuts available within Bluefish
|prev=Man 2 ch08s12
|Subtitle=Part 2. Using Bluefish
|next=Man 2 ch09s02
}}

Here is a PHP script that can help:

<?php
$conv = array(
"Man 2 HTML Tool Bar" => "HTML Tool Bar",
"Man 2 Templates" => "Templates",
"Man 2 ToC2" => "Table of Contents (2/3)",
"Man 2 ToC3" => "Table of Contents (3/3)",
"Man 2 apc" => "Guidelines for Writing this Manual",
"Man 2 apds02" => "TERMS AND CONDITIONS",
"Man 2 apds03" => "How to Apply GPL to Your New Programs",
"Man 2 ch01s02" => "Latest Stable Version",
"Man 2 ch01s03" => "Getting Bluefish - Latest Snapshot",
"Man 2 ch01s04" => "Getting Bluefish - Latest Development Version",
"Man 2 ch02s02" => "Installing Bluefish - Quick Standard Install",
"Man 2 ch02s03" => "Installing Bluefish - System Issues",
"Man 2 ch02s04" => "Installing Bluefish - Install from Source Code",
"Man 2 ch02s05" => "Installing Bluefish - Install from Source Code Options",
"Man 2 ch02s06" => "Installing Bluefish - Install from Binary Distribution",
"Man 2 ch02s07" => "Installing Bluefish - Post-Installation Checklist",
"Man 2 ch03s02" => "Command line options",
"Man 2 ch04s02" => "Menus and Tool Bars",
"Man 2 ch04s03" => "Side Panel",
"Man 2 ch04s04" => "Interface - Status Bar",
"Man 2 ch04s05" => "Interface - Help Menu",
"Man 2 ch05s02" => "Managing Directories",
"Man 2 ch05s03" => "Opening Files",
"Man 2 ch05s04" => "Saving Files",
"Man 2 ch05s05" => "Renaming Files",
"Man 2 ch05s06" => "Deleting files",
"Man 2 ch05s07" => "Closing Files",
"Man 2 ch05s08" => "Inserting files",
"Man 2 ch05s09" => "Editing",
"Man 2 ch05s10" => "Basic Find and Replace",
"Man 2 ch05s11" => "File Types (1/2)",
"Man 2 ch05s12" => "File Types (2/2)",
"Man 2 ch06s02" => "Go Menu and Document Navigation",
"Man 2 ch06s03" => "Projects",
"Man 2 ch06s04" => "Bookmarks",
"Man 2 ch06s05" => "Find and Replace",
"Man 2 ch07s02" => "Autocompletion",
"Man 2 ch07s03" => "Spell checker",
"Man 2 ch07s04" => "Programming and Markup Languages Function Reference",
"Man 2 ch07s05" => "HTML Editing",
"Man 2 ch07s06" => "Quick Bar Customization",
"Man 2 ch07s07" => "Snippets plugin",
"Man 2 ch07s08" => "External Programs and Filters",
"Man 2 ch08s02" => "Invisible Files and Folders",
"Man 2 ch08s03" => "Showing backup files",
"Man 2 ch08s04" => "Editor Appearance Customization",
"Man 2 ch08s05" => "Bookmarks Path Customization",
"Man 2 ch08s06" => "HTML Tags Style Customization",
"Man 2 ch08s07" => "Author Meta Tag",
"Man 2 ch08s08" => "File Handling and Browsing Customization",
"Man 2 ch08s09" => "User Interface Customization",
"Man 2 ch08s10" => "File Types Handling",
"Man 2 ch08s11" => "File Filters",
"Man 2 ch08s12" => "Highlight Patterns Modification",
"Man 2 ch09s02" => "HTML Shortcuts",
"Man 2 ch10s02" => "Bugs - Filing a Report",
"Man 2 ch11s02" => "HTML Tab Options",
"Man 2 ch11s03" => "Files Tab Options",
"Man 2 ch11s04" => "User Interface Tab Options",
"Man 2 ch11s05" => "Images Tab Options",
"Man 2 ch12s02" => "Development - Naming",
"Man 2 ch12s03" => "Development - Declaring Procedures",
"Man 2 ch12s04" => "Development - Header Files",
"Man 2 ch12s05" => "Development - New Files",
"Man 2 ch12s06" => "Development - File Reference",
"Man 2 ch12s07" => "Development - Patches",
"Man 2 ch12s08" => "Development - Translations",
"Man 2 ch12s09" => "Development - Some tips",
"Man 2 ch12s10" => "Development - Making Releases",
"Man 2 ch12s11" => "Development - Useful Stuff",
"Man 2 pr01s02" => "What is Bluefish?",
"Man 2 pt02" => "Using Bluefish",
"Man 2 pt03" => "Developing Bluefish",
"Man2 ch09s02" => "HTML Shortcuts"
);

$conv2 = array(
"Man 2 apd" => "GNU GENERAL PUBLIC LICENSE",
"Man 2 ch03" => "Launching Bluefish",
"Man 2 ch04" => "Editing Area",
"Man 2 ch05" => "Creating Files",
"Man 2 ch06" => "Navigating through a document",
"Man 2 ch07" => "Indenting",
"Man 2 ch08" => "Modifying shortcut keys",
"Man 2 ch09" => "General Shortcuts",
"Man 2 ch10" => "Bugs - Using the Debugger",
"Man 2 ch11" => "Editor Tab Options",
"Man 2 ch12" => "Development - Indenting and Formatting",
"Man 2 pr01" => "Preface",
"Man 2 pt01" => "Getting and Installing Bluefish",
"Man 2 ToC" => "Table of Contents (1/3)"
);

$fp=fopen($argv[1], "r");
$text =fread($fp,100000);
fclose($fp);

$text =str_replace(array_keys($conv),array_values($conv),$text);
$text =str_replace(array_keys($conv2),array_values($conv2),$text);

echo $text;

?>

Usage

  1. save this script as ~/.bluefish/conv.php
  2. add in Preferences > External Filters
    Label: Man2conv
    Command: php ~/.bluefish/conv.php %f|
  3. using It's All Text! import in Bf a page of Manual 2,
  4. apply the filter: Tools > External Filters > Man2conv
  5. save the file.

If you find one of the bugs of this procedure, please report!