Shlomi Fish avatar Shlomi Fish committed 44c7eaf

Got rid of more trailing space

Comments (0)

Files changed (28)

bin/Serve/ShlomifServe.pm

 {
     my (%args) = (@_);
     my $dir_to_serve = $args{'dir_to_serve'};
-    
+
     my $cgi = CGI->new();
     my $mimetypes = MIME::Types->new();
     my $path = $cgi->path_info();
             closedir(D);
             print $cgi->header();
             my $title = "Listing for " . CGI::escapeHTML($path);
-            my $files_string = join("", 
-                map { 
-                    my $fn = CGI::escapeHTML($_) . 
+            my $files_string = join("",
+                map {
+                    my $fn = CGI::escapeHTML($_) .
                         ((-d $dir_to_serve.$path."/".$_)?"/":"");
-                    qq{<li><a href=\"$fn\">$fn</a></li>\n} 
+                    qq{<li><a href=\"$fn\">$fn</a></li>\n}
                 } @files);
             $files_string = @files ? "<ol>\n$files_string\n</ol>" : "";
             print <<"EOF";

bin/Serve/serve-shlomifish.org.pl

 use ShlomifServe;
 
 ShlomifServe::serve(
-     'dir_to_serve' => 
+     'dir_to_serve' =>
         # File::Spec->rel2abs("../../dest/t2-homepage/"),
         "../../dest/t2-homepage/",
     );

bin/Test/first-page-of-section-nav-menu.pl

-#!/usr/bin/perl 
+#!/usr/bin/perl
 
 use strict;
 use warnings;

bin/Test/render-breadcrumbs-trail.pl

-#!/usr/bin/perl 
+#!/usr/bin/perl
 
 use strict;
 use warnings;

bin/Test/render-navmenu.pl

-#!/usr/bin/perl 
+#!/usr/bin/perl
 
 use strict;
 use warnings;

bin/clean-up-docbook-5-xsl-xhtml-1_1.pl

-#!/usr/bin/perl 
+#!/usr/bin/perl
 
 use strict;
 use warnings;

bin/clean-up-docbook-xsl-xhtml.pl

-#!/usr/bin/perl 
+#!/usr/bin/perl
 
 use strict;
 use warnings;

bin/cleanup-mediawiki-html.pl

 {
     my $list = shift;
 
-    return 
+    return
     [
         map { (ref($_) eq "") ? XML::LibXML::Text->new($_) : $_ } @$list
     ];
     {
         return 1;
     }
-    
+
     if ($node->nodeType() == XML_TEXT_NODE)
     {
         if ($node->data() !~ /\S/)
         {
             $start = $start->nextSibling();
         }
-        
+
         my $to_del = $start;
         my $next_to_del;
         while ($to_del)
     my $p = $a_el->parentNode();
 
     my $h_tag = $p->nextSibling();
-    
+
     while(   $h_tag->nodeType() != XML_ELEMENT_NODE
           || $h_tag->nodeName() !~ m{\Ah}
       )

bin/extract-screenplay-xml-html.pl

-#!/usr/bin/perl 
+#!/usr/bin/perl
 
 use strict;
 use warnings;

bin/extract-xhtml.pl

-#!/usr/bin/perl 
+#!/usr/bin/perl
 
 use strict;
 use warnings;
 my @deps;
 while (defined(my $result = $ff->next_obj()))
 {
-    if (   $result->is_dir() 
+    if (   $result->is_dir()
         && @{$result->dir_components()}
         && $result->dir_components()->[-1] eq ".svn"
        )
     my $depends_on = $dep->{'dep'};
     $file =~ s{\At2/}{};
     $file =~ s{\.wml\z}{};
-    
-    print {$deps_mak} qq{\$(T2_DEST)/$file :  lib/$depends_on\n\n}, 
+
+    print {$deps_mak} qq{\$(T2_DEST)/$file :  lib/$depends_on\n\n},
 }
 close($deps_mak);
 

bin/find_ascii_quotes-xmlp.pl

                     {
                         printf {*STDOUT}
                         (
-                            "%s:%d:%s\n", 
-                                $filename, 
-                                $idx+$expat->current_line(), 
+                            "%s:%d:%s\n",
+                                $filename,
+                                $idx+$expat->current_line(),
                                 $l
                         );
                     }

bin/find_ascii_quotes.pl

-#!/usr/bin/perl 
+#!/usr/bin/perl
 
 use strict;
 use warnings;

bin/find_ascii_quotes.rb

             if elem.node_type == Nokogiri::XML::Node::TEXT_NODE
                 data = elem.value
                 lines = data.split(/\n/, -1);
-                
+
                 lines.each_with_index do |line, idx|
                     if (line =~ /"/) then
                         STDOUT.printf "%s:%d:%s\n", filename, elem.line()+idx, line

bin/from-docbook-to-fiction-xml-txt.pl

 
     my @subs = $xpc->findnodes(q{./db:section}, $sect_elem);
 
-    return 
-          qq{<s id="} . _esc_for_attr($id) . qq{">\n\n} 
+    return
+          qq{<s id="} . _esc_for_attr($id) . qq{">\n\n}
         . qq{<title>} . _esc($title_text) . qq{</title>\n\n}
         .  join("\n\n", map { _esc($_->textContent()) } @paras)
         . join("\n\n", map { _out_section($_) } @subs)
-        . qq{</s>\n\n} 
+        . qq{</s>\n\n}
         ;
 }
 
 
 =head1 NAME
 
-Template::Preprocessor::TTML - Preprocess files using the Template Toolkit 
+Template::Preprocessor::TTML - Preprocess files using the Template Toolkit
 from the command line.
 
 =cut
 
     my $obj = Template::Preprocessor::TTML->new(argv => [@ARGV]);
     $obj->run()
-    
+
     ...
 
 =head1 FUNCTIONS
 {
     print <<"EOF";
 This is TTML version $VERSION
-TTML is a Command Line Preprocessor based on the Template Toolkit 
+TTML is a Command Line Preprocessor based on the Template Toolkit
 (http://www.template-toolkit.org/)
 
 More information about TTML can be found at:
 sub _mode_help
 {
     my $self = shift;
-    
+
     print $self->_get_help_text();
 
     return 0;
     }
 }
 
-1; 
+1;
 
 package main;
 

bin/gen-deps-mak.pl

             $s =~ s{\.wml\z}{};
             $s =~ s{\A(?:\./)?t2/}{\$(T2_DEST)/};
             $s;
-        } 
+        }
         @$files
     ];
 }
                 re => qr{^\#include *"\Q$_\E\.wml"}ms,
                 files => [],
             },
-        } 
+        }
         qw(
             amazon
             dbook
         {
             if ($contents =~ $files_containing_headers{$header}{re})
             {
-                push @{ $files_containing_headers{$header}{files} }, 
+                push @{ $files_containing_headers{$header}{files} },
                     $fn;
             }
         }
     }
-    
+
     my $deps_text = "";
 
     foreach my $header (sort { $a cmp $b } keys(%files_containing_headers))
     {
-        $deps_text .= 
-            join(' ', 
+        $deps_text .=
+            join(' ',
                 @{ _map_wmls_to_deps(
                         $files_containing_headers{$header}{files}
-                    ) 
+                    )
                 }
             );
 

bin/gen-fortunes.pl

     my $orig_dir = getcwd();
 
     chdir("t2/humour/fortunes");
-    system("make", "dist"); 
+    system("make", "dist");
     system("make", "list_files");
 
     chdir($orig_dir);

bin/html-check-spelling-xmlp.pl

 
                     my $mark_word = sub {
                         my ($word) = @_;
-                        
+
                         my $verdict = !($speller->check($word));
-                        
+
                         $mispelling_found ||= $verdict;
 
                         return $verdict ? "«$word»" : $word;
                     {
                         printf {*STDOUT}
                         (
-                            "%s:%d:%s\n", 
-                                $filename, 
-                                $idx+$expat->current_line(), 
+                            "%s:%d:%s\n",
+                                $filename,
+                                $idx+$expat->current_line(),
                                 $l
                         );
                     }

bin/indent-define-tag.pl

 use strict;
 use warnings;
 
-my $indent=0; 
+my $indent=0;
 my $line_num = 1;
 while(<>)
 {
     my $open = m!<define!;
     my $close = m!</define!;
-    if($close && (!$open)) 
+    if($close && (!$open))
     {
         $indent--;
     }
-    
+
     if ($open || $close)
     {
     print sprintf("%-4s: ", $line_num) . (($indent>=0)?
         "    "x$indent:
-        "ERRR"x(-$indent)).$_; 
+        "ERRR"x(-$indent)).$_;
     }
 
     if ($open && (!$close))

bin/preproc-optimizing-docbook.pl

 {
     my $list = shift;
 
-    return 
+    return
     [
         map { (ref($_) eq "") ? XML::LibXML::Text->new($_) : $_ } @$list
     ];

bin/processors/convert-hitchhiker-guide-to-st-tng-to-screenplay-xml.pl

 
 my $END = '* * *      T  h  e      E  n  d      * * *';
 $text =~ s{\A(.*?)^(SCENE 1:)}{wrap_as_desc($1) . $2}ems;
-$text =~ 
+$text =~
 s{^(?<start_line>(?:SCENE (?<id>\d+)|EPILOGUE):[^\n]*\n(?: +[^\n]*\n)*)(?<body>.*?)(?=^(?:(?:SCENE|EPILOGUE)|(?:\s*\Q$END\E)))}
 [
     my ($start_line, $id, $body) = @+{qw(start_line id body)};
 
-    my $s_line = 
+    my $s_line =
         defined($id)
         ? qq{\n\n<s id="scene_$id" title="Scene $id">\n\n}
         : qq{\n\n<s id="epilogue" title="Epilogue">\n\n}

bin/processors/process-blogs-posts.pl

         my $out_fn = "lib/feeds/shlomif_hsite/$date.html";
 
         my $contents = io($fn)->slurp;
-        
+
         if (not $contents =~ s{\A\s*<h2>([^<]+)</h2>\s*}{}ms)
         {
             die "Cannot match title at '$fn'!";
         }
-        
+
         my $title = $1;
 
         $contents =~ s{\s*<!--.*?-->\s*}{}gms;

bin/put-vim-conf.sh

 
 DEST="$(pwd)/t2/open-source/projects/conf/vim"
 CURRENT="$DEST/current"
-mkdir -p "$CURRENT" "$CURRENT/conf/Vim" 
+mkdir -p "$CURRENT" "$CURRENT/conf/Vim"
 
 cp -f "$HOME/.vimrc" "$CURRENT/vimrc"
 rsync -av --delete-after "$HOME/conf/Vim" "$CURRENT/conf/"
-#!/usr/bin/perl 
+#!/usr/bin/perl
 
 use strict;
 use warnings;
 my $before_size = 0;
 my $after_size = 0;
 
-my %skip = 
+my %skip =
 (
     map { $_ => 1 }
     (
         $before_size += (-s $r);
         if (system(qw(tidy -utf8 -q -config lib/tidy.rc -m), $r))
         {
-            system("gvim", "-p", 
+            system("gvim", "-p",
                 ((-e "t2/$base.wml") ? "t2/$base.wml" : "t2/$base"),
                 $r,
             );

bin/shlomifish.org-refer-and-redirect/sf.org-refer.pl

 
 <p>
 This domain is kept empty in order to not fragment the links and page rank of
-Shlomi Fish' site. Please don't use it. See 
+Shlomi Fish' site. Please don't use it. See
 <a href="$link_esc">$link_esc</a> for the page on the
 site.
 </p>

bin/t2_find_ascii_quotes.bash

     perl -lne 'print if m{t2-homepage/prog-evolution}..1'
 }
 
-find dest/t2-homepage/ -regextype posix-extended -regex '.*x?html' -print | 
-    sort | 
-    grep -vP '(catb-heb|WebMetaLecture/slides/examples|t2-homepage/rewrite\.html|humour/by-others/|humour/bits/COBOL-the-New-Age|humour/bits/Mastering-Cat|humour/fortunes/nyh-sigs|humour/fortunes/sharp-perl|humour/fortunes/sharp-programming|humour/fortunes/|humour/human-hacking/arabic-v2|humour/human-hacking/human-hacking-field-guide/|humour/human-hacking/human-hacking-field-guide-v2-arabic/|humour/TheEnemy/TheEnemy_eng\.html|humour/TheEnemy/The-Enemy-English-rev4\.html|humour/TheEnemy/The-Enemy-English-rev5\.html|humour/TheEnemy/The-Enemy-English-rev6\.html|humour/TheEnemy/The-Enemy-English-v7/|humour/TheEnemy/The-Enemy-Hebrew-v7\.html|humour/TheEnemy/The-Enemy-English-v7\.html|humour/TheEnemy/TheEnemy\.html|humour/TheEnemy/The-Enemy-rev[456]\.html|me/resumes/Shlomi-Fish-Heb-Resume\.html)' | 
+find dest/t2-homepage/ -regextype posix-extended -regex '.*x?html' -print |
+    sort |
+    grep -vP '(catb-heb|WebMetaLecture/slides/examples|t2-homepage/rewrite\.html|humour/by-others/|humour/bits/COBOL-the-New-Age|humour/bits/Mastering-Cat|humour/fortunes/nyh-sigs|humour/fortunes/sharp-perl|humour/fortunes/sharp-programming|humour/fortunes/|humour/human-hacking/arabic-v2|humour/human-hacking/human-hacking-field-guide/|humour/human-hacking/human-hacking-field-guide-v2-arabic/|humour/TheEnemy/TheEnemy_eng\.html|humour/TheEnemy/The-Enemy-English-rev4\.html|humour/TheEnemy/The-Enemy-English-rev5\.html|humour/TheEnemy/The-Enemy-English-rev6\.html|humour/TheEnemy/The-Enemy-English-v7/|humour/TheEnemy/The-Enemy-Hebrew-v7\.html|humour/TheEnemy/The-Enemy-English-v7\.html|humour/TheEnemy/TheEnemy\.html|humour/TheEnemy/The-Enemy-rev[456]\.html|me/resumes/Shlomi-Fish-Heb-Resume\.html)' |
     temp_filter |
     grep -vP 'meta/copyrights/index\.html' | # Contains rel="nofollow"
     grep -vP 'open-source/anti/php/index\.html' | # Contains code

bin/t2_html_spell_check.bash

 
 old_find_quotes_filter()
 {
-    grep -vP '(catb-heb|WebMetaLecture/slides/examples|t2-homepage/rewrite\.html|humour/by-others/|humour/bits/COBOL-the-New-Age|humour/bits/Mastering-Cat|humour/fortunes/nyh-sigs|humour/fortunes/sharp-perl|humour/fortunes/sharp-programming|humour/fortunes/|humour/human-hacking/arabic-v2|humour/human-hacking/human-hacking-field-guide/|humour/human-hacking/human-hacking-field-guide-v2-arabic/|humour/TheEnemy/TheEnemy_eng\.html|humour/TheEnemy/The-Enemy-English-rev4\.html|humour/TheEnemy/The-Enemy-English-rev5\.html|humour/TheEnemy/The-Enemy-English-rev6\.html|humour/TheEnemy/The-Enemy-English-v7/|humour/TheEnemy/The-Enemy-Hebrew-v7\.html|humour/TheEnemy/The-Enemy-English-v7\.html|humour/TheEnemy/TheEnemy\.html|humour/TheEnemy/The-Enemy-rev[456]\.html|me/resumes/Shlomi-Fish-Heb-Resume\.html)' | 
+    grep -vP '(catb-heb|WebMetaLecture/slides/examples|t2-homepage/rewrite\.html|humour/by-others/|humour/bits/COBOL-the-New-Age|humour/bits/Mastering-Cat|humour/fortunes/nyh-sigs|humour/fortunes/sharp-perl|humour/fortunes/sharp-programming|humour/fortunes/|humour/human-hacking/arabic-v2|humour/human-hacking/human-hacking-field-guide/|humour/human-hacking/human-hacking-field-guide-v2-arabic/|humour/TheEnemy/TheEnemy_eng\.html|humour/TheEnemy/The-Enemy-English-rev4\.html|humour/TheEnemy/The-Enemy-English-rev5\.html|humour/TheEnemy/The-Enemy-English-rev6\.html|humour/TheEnemy/The-Enemy-English-v7/|humour/TheEnemy/The-Enemy-Hebrew-v7\.html|humour/TheEnemy/The-Enemy-English-v7\.html|humour/TheEnemy/TheEnemy\.html|humour/TheEnemy/The-Enemy-rev[456]\.html|me/resumes/Shlomi-Fish-Heb-Resume\.html)' |
     grep -vP 'meta/copyrights/index\.html' | # Contains rel="nofollow"
     grep -vP 'open-source/anti/php/index\.html' | # Contains code
     grep -vP 'open-source/bits-and-bobs/greasemonkey/grease\.html' | # Contains HTML markup
     grep -vP 'rindolf/rindolf-spec/' # old and contains code
 }
 
-find dest/t2-homepage/ -regextype posix-extended -regex '.*x?html' -print | 
+find dest/t2-homepage/ -regextype posix-extended -regex '.*x?html' -print |
     grep -vP '/catb-heb\.html$' | # HTML - not XHTML file.
     grep -vP 'WebMetaLecture/slides/examples' | # HTML - not XHTML files.
     grep -vP '/rewrite\.html$' | # HTML - not XHTML files.
-    sort | 
+    sort |
     xargs -d '\n' perl bin/html-check-spelling-xmlp.pl
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.