From eac3699c6b426ce060acf916c17d2b25f06f8818 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Thu, 6 Mar 2014 23:01:35 +0000 Subject: convbkmk git-svn-id: svn://tug.org/texlive/trunk@33110 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/support/convbkmk/README | 8 ++++++-- Master/texmf-dist/scripts/convbkmk/convbkmk.rb | 17 +++++++++++++---- 2 files changed, 19 insertions(+), 6 deletions(-) (limited to 'Master') diff --git a/Master/texmf-dist/doc/support/convbkmk/README b/Master/texmf-dist/doc/support/convbkmk/README index d6528f62b45..b2ec1482e54 100644 --- a/Master/texmf-dist/doc/support/convbkmk/README +++ b/Master/texmf-dist/doc/support/convbkmk/README @@ -1,6 +1,6 @@ -convbkmk Ver.0.08 +convbkmk Ver.0.09 -2013.05.11 +2014.03.02 Takuji Tanaka KXD02663 (at) nifty.ne.jp http://homepage3.nifty.com/ttk/comp/tex/uptex_en.html @@ -16,4 +16,8 @@ Thus, data conversion is required to create correct bookmarks. convbkmk provides a function of the encoding conversion and formatting the bookmark data. +Lisence notice is written in the convbkmk.rb. +It is as same as the MIT license. +Ref. http://opensource.org/licenses/MIT + More information is within the convbkmk.rb with the RD format. diff --git a/Master/texmf-dist/scripts/convbkmk/convbkmk.rb b/Master/texmf-dist/scripts/convbkmk/convbkmk.rb index 2c566fe6301..d2c41ca9d7a 100755 --- a/Master/texmf-dist/scripts/convbkmk/convbkmk.rb +++ b/Master/texmf-dist/scripts/convbkmk/convbkmk.rb @@ -3,9 +3,9 @@ =begin -= convbkmk Ver.0.08 += convbkmk Ver.0.09 - 2013.05.11 + 2014.03.02 Takuji Tanaka KXD02663 (at) nifty.ne.jp (()) @@ -26,6 +26,7 @@ the encoding conversion and formatting the bookmark data. == Requirement ruby 1.8.3 or later +ruby 1.8.x will not be supported in the near future release. == Examples @@ -63,7 +64,7 @@ More examples are included in the uptex source archive. convbkmk -Copyright (c) 2009-2013 Takuji Tanaka +Copyright (c) 2009-2014 Takuji Tanaka Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -108,10 +109,12 @@ THE SOFTWARE. : 2013.05.11 0.08 * Add -O option: overwrite output files onto input files instead of creating foo-convbkmk.ps . * Make comments rd/rdtool friendly. +: 2014.03.02 0.09 + * Bug fix: Conversion was not complete in some cases. =end -Version = "0.08" +Version = "0.09" require "optparse" @@ -439,6 +442,12 @@ def file_treatment(ifile, ofile, enc) ofile.print $` line = $& + $' + if Opts[:mode] != 'out' + while line =~ %r!(/Title|/Author|/Keywords|/Subject|/Creator|/Producer)\Z! do + line += ifile.gets + end + end + if enc.status == 'guess' if tmp_enc = try_guess_encoding(line, enc) # succeeded in guess or ascii only -- cgit v1.2.3