From 72f72d64a422d6628c4796f5c0bf2e508f134214 Mon Sep 17 00:00:00 2001 From: Tatsuya Kinoshita Date: Wed, 4 May 2011 16:05:14 +0900 Subject: Adding upstream version 0.5.1 --- scripts/bm2menu/README | 21 +++++++++++++++++ scripts/bm2menu/bm2menu.pl | 58 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 79 insertions(+) create mode 100644 scripts/bm2menu/README create mode 100644 scripts/bm2menu/bm2menu.pl (limited to 'scripts/bm2menu') diff --git a/scripts/bm2menu/README b/scripts/bm2menu/README new file mode 100644 index 0000000..b44f144 --- /dev/null +++ b/scripts/bm2menu/README @@ -0,0 +1,21 @@ + +bm2menu.pl + + ブックマークファイル ~/.w3m/bookmark.html を変換して w3m の + ブックマークメニューとして使える様にする。 + +使用法 + + ~/.w3m/bookmark.html を変換して ~/.w3m/menu に追加。 + + perl bm2menu.pl ~/.w3m/bookmark.html >> ~/.w3m/menu + + 次に、~/.w3m/keymap に + + keymap x MENU Bookmarks + + の様にキーの割り当てを追加します。 + + これで、キー `x' でブックマークメニューが開きます。 + メニューの操作は doc-jp/README.menu を読んでください。 + diff --git a/scripts/bm2menu/bm2menu.pl b/scripts/bm2menu/bm2menu.pl new file mode 100644 index 0000000..d89f2b5 --- /dev/null +++ b/scripts/bm2menu/bm2menu.pl @@ -0,0 +1,58 @@ +#!/usr/bin/perl + +$PRE_MENU = ""; +$POST_MENU = <) { + if (/

(.*)<\/h2>/) { + $s = &unquote($1); + push(@section, $s); + } elsif (/
  • (.*)<\/a>/) { + $u = &unquote($1); + $t = &unquote($2); + $url{$s} .= "$u\n"; + $title{$s} .= "$t\n"; + } +} + +print "menu Bookmarks\n"; +print $PRE_MENU; +foreach(@section) { + print " popup\t\"$_\"\t\"$_\"\n"; +} +print $POST_MENU; +print "end\n"; + +foreach(@section) { + print "\n"; + print "menu \"$_\"\n"; + @ts = split("\n", $title{$_}); + @us = split("\n", $url{$_}); + while(@ts) { + $t = shift @ts; + $u = shift @us; + print " func\t\"$t\"\tGOTO\t\"\"\t\"$u\"\n"; + } + print "end\n"; +} + +sub unquote { + local($_) = @_; + + s/\</\/g; + s/\ / /g; + s/\&/\&/g; + + return $_; +} -- cgit v1.2.3 From 5397d09e585a1938fb64bc9c5cd5daed1959eb90 Mon Sep 17 00:00:00 2001 From: Tatsuya Kinoshita Date: Wed, 4 May 2011 16:41:45 +0900 Subject: Adding upstream version 0.5.3 --- scripts/bm2menu/CVS/Entries | 3 +++ scripts/bm2menu/CVS/Repository | 1 + scripts/bm2menu/CVS/Root | 1 + 3 files changed, 5 insertions(+) create mode 100644 scripts/bm2menu/CVS/Entries create mode 100644 scripts/bm2menu/CVS/Repository create mode 100644 scripts/bm2menu/CVS/Root (limited to 'scripts/bm2menu') diff --git a/scripts/bm2menu/CVS/Entries b/scripts/bm2menu/CVS/Entries new file mode 100644 index 0000000..448ac0a --- /dev/null +++ b/scripts/bm2menu/CVS/Entries @@ -0,0 +1,3 @@ +/README/1.1/Thu Nov 15 00:32:14 2001// +/bm2menu.pl/1.1/Thu Nov 15 00:32:14 2001// +D diff --git a/scripts/bm2menu/CVS/Repository b/scripts/bm2menu/CVS/Repository new file mode 100644 index 0000000..c3eaf83 --- /dev/null +++ b/scripts/bm2menu/CVS/Repository @@ -0,0 +1 @@ +w3m/scripts/bm2menu diff --git a/scripts/bm2menu/CVS/Root b/scripts/bm2menu/CVS/Root new file mode 100644 index 0000000..121fa06 --- /dev/null +++ b/scripts/bm2menu/CVS/Root @@ -0,0 +1 @@ +:ext:inu@w3m.cvs.sourceforge.net:/cvsroot/w3m -- cgit v1.2.3 From 620796f8d750bc58e1cf1327ff54aed32e302c73 Mon Sep 17 00:00:00 2001 From: Tatsuya Kinoshita Date: Tue, 22 May 2012 23:06:58 +0900 Subject: Remove garbage files --- scripts/bm2menu/CVS/Entries | 3 --- scripts/bm2menu/CVS/Repository | 1 - scripts/bm2menu/CVS/Root | 1 - 3 files changed, 5 deletions(-) delete mode 100644 scripts/bm2menu/CVS/Entries delete mode 100644 scripts/bm2menu/CVS/Repository delete mode 100644 scripts/bm2menu/CVS/Root (limited to 'scripts/bm2menu') diff --git a/scripts/bm2menu/CVS/Entries b/scripts/bm2menu/CVS/Entries deleted file mode 100644 index 448ac0a..0000000 --- a/scripts/bm2menu/CVS/Entries +++ /dev/null @@ -1,3 +0,0 @@ -/README/1.1/Thu Nov 15 00:32:14 2001// -/bm2menu.pl/1.1/Thu Nov 15 00:32:14 2001// -D diff --git a/scripts/bm2menu/CVS/Repository b/scripts/bm2menu/CVS/Repository deleted file mode 100644 index c3eaf83..0000000 --- a/scripts/bm2menu/CVS/Repository +++ /dev/null @@ -1 +0,0 @@ -w3m/scripts/bm2menu diff --git a/scripts/bm2menu/CVS/Root b/scripts/bm2menu/CVS/Root deleted file mode 100644 index 121fa06..0000000 --- a/scripts/bm2menu/CVS/Root +++ /dev/null @@ -1 +0,0 @@ -:ext:inu@w3m.cvs.sourceforge.net:/cvsroot/w3m -- cgit v1.2.3 From 1d0ba25a660483da1272a31dd077ed94441e3d9f Mon Sep 17 00:00:00 2001 From: Tatsuya Kinoshita Date: Sat, 2 Jan 2021 09:20:37 +0900 Subject: New upstream version 0.5.3+git20210102 --- scripts/bm2menu/README | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'scripts/bm2menu') diff --git a/scripts/bm2menu/README b/scripts/bm2menu/README index b44f144..cc1f89b 100644 --- a/scripts/bm2menu/README +++ b/scripts/bm2menu/README @@ -1,21 +1,21 @@ bm2menu.pl - ブックマークファイル ~/.w3m/bookmark.html を変換して w3m の - ブックマークメニューとして使える様にする。 + 若<ゃ ~/.w3m/bookmark.html 紊 w3m + 若<ャ若篏帥罕 -使用法 +篏睡羈 - ~/.w3m/bookmark.html を変換して ~/.w3m/menu に追加。 + ~/.w3m/bookmark.html 紊 ~/.w3m/menu 菴遵 perl bm2menu.pl ~/.w3m/bookmark.html >> ~/.w3m/menu - 次に、~/.w3m/keymap に + 罨<~/.w3m/keymap keymap x MENU Bookmarks - の様にキーの割り当てを追加します。 + 罕若蚊綵菴遵障 - これで、キー `x' でブックマークメニューが開きます。 - メニューの操作は doc-jp/README.menu を読んでください。 + с `x' с若<ャ若障 + <ャ若篏 doc-jp/README.menu 茯с -- cgit v1.2.3