Merge lp:~vr123456/leo-editor/detect_urls into lp:leo-editor/old-trunk

Proposed by Viktor Ransmayr
Status: Merged
Merged at revision: not available
Proposed branch: lp:~vr123456/leo-editor/detect_urls
Merge into: lp:leo-editor/old-trunk
Diff against target: 116 lines (+17/-14)
2 files modified
leo/plugins/detect_urls.py (+7/-4)
leo/plugins/leoPluginsRef.leo (+10/-10)
To merge this branch: bzr merge lp:~vr123456/leo-editor/detect_urls
Reviewer Review Type Date Requested Status
Ville M. Vainio Approve
Review via email: mp+17074@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Viktor Ransmayr (vr123456) wrote :

This contains the improvements to the plugin 'detect_urls.py'.

A quick diff should show the few changes I have made nicely.

Revision history for this message
Ville M. Vainio (villemvainio) wrote :

Seems fine to me

review: Approve
lp:~vr123456/leo-editor/detect_urls updated
2642. By Ville M. Vainio

  merge file:// support for detect_urls (by Viktor Ransmayr)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'leo/plugins/detect_urls.py'
--- leo/plugins/detect_urls.py 2008-05-19 16:38:30 +0000
+++ leo/plugins/detect_urls.py 2010-01-09 14:22:14 +0000
@@ -3,14 +3,15 @@
3#@<< docstring >>3#@<< docstring >>
4#@+node:vpe.20060426084738:<< docstring >>4#@+node:vpe.20060426084738:<< docstring >>
5"""5"""
6Colorizes URLs everywhere in node's body on node selection. 6Colorizes URLs everywhere in node's body on node selection
7or saving.
8
7Double click on any URL launches it in default browser.9Double click on any URL launches it in default browser.
810
9URL regex: (http|https|ftp)://[^\s'"]+[\w=/]11URL regex: (http|https|file|ftp)://[^\s'"]+[\w=/]
1012
11Related plugins: color_markup.py; rClick.py13Related plugins: color_markup.py; rClick.py
12"""14"""
13#@nonl
14#@-node:vpe.20060426084738:<< docstring >>15#@-node:vpe.20060426084738:<< docstring >>
15#@nl16#@nl
16#@@language python17#@@language python
@@ -18,7 +19,8 @@
18import leo.core.leoGlobals as g19import leo.core.leoGlobals as g
19import leo.core.leoPlugins as leoPlugins20import leo.core.leoPlugins as leoPlugins
20import re21import re
21url_regex = re.compile(r"""(http|https|ftp)://[^\s'"]+[\w=/]""")22#VR20100108: url_regex = re.compile(r"""(http|https|ftp)://[^\s'"]+[\w=/]""")
23url_regex = re.compile(r"""(http|https|file|ftp)://[^\s'"]+[\w=/]""")
2224
23#@+others25#@+others
24#@+node:vpe.20060305064323.5:openURL()26#@+node:vpe.20060305064323.5:openURL()
@@ -71,6 +73,7 @@
71if 1:73if 1:
72 leoPlugins.registerHandler("bodydclick1", openURL)74 leoPlugins.registerHandler("bodydclick1", openURL)
73 leoPlugins.registerHandler("select2", colorizeURLs)75 leoPlugins.registerHandler("select2", colorizeURLs)
76 leoPlugins.registerHandler("save2", colorizeURLs) #VR20100108
74 g.plugin_signon(__name__)77 g.plugin_signon(__name__)
75#@-node:ekr.20060506070443.1:@thin detect_urls.py78#@-node:ekr.20060506070443.1:@thin detect_urls.py
76#@-leo79#@-leo
7780
=== modified file 'leo/plugins/leoPluginsRef.leo'
--- leo/plugins/leoPluginsRef.leo 2010-01-03 14:50:03 +0000
+++ leo/plugins/leoPluginsRef.leo 2010-01-09 14:22:14 +0000
@@ -3,7 +3,7 @@
3<leo_file>3<leo_file>
4<leo_header file_format="2" tnodes="0" max_tnode_index="0" clone_windows="0"/>4<leo_header file_format="2" tnodes="0" max_tnode_index="0" clone_windows="0"/>
5<globals body_outline_ratio="0.5">5<globals body_outline_ratio="0.5">
6 <global_window_position top="48" left="25" height="692" width="996"/>6 <global_window_position top="48" left="10" height="692" width="1024"/>
7 <global_log_window_position top="0" left="0" height="0" width="0"/>7 <global_log_window_position top="0" left="0" height="0" width="0"/>
8</globals>8</globals>
9<preferences/>9<preferences/>
@@ -32,7 +32,7 @@
32<v t="ekr.20090430075506.4"><vh>Notes &amp; to-do</vh>32<v t="ekr.20090430075506.4"><vh>Notes &amp; to-do</vh>
33<v t="ekr.20090430075506.3"><vh>@thin leoPluginNotes.txt</vh></v>33<v t="ekr.20090430075506.3"><vh>@thin leoPluginNotes.txt</vh></v>
34</v>34</v>
35<v t="edream.110203113231.618"><vh>Plugins</vh>35<v t="edream.110203113231.618" a="E"><vh>Plugins</vh>
36<v t="EKR.20040517090508"><vh> Enable plugins using @enabled-plugins nodes</vh></v>36<v t="EKR.20040517090508"><vh> Enable plugins using @enabled-plugins nodes</vh></v>
37<v t="ekr.20050303051035"><vh> Templates: these show recommended ways of defining plugins.</vh>37<v t="ekr.20050303051035"><vh> Templates: these show recommended ways of defining plugins.</vh>
38<v t="ekr.20041114102139"><vh>Notes</vh>38<v t="ekr.20041114102139"><vh>Notes</vh>
@@ -64,9 +64,9 @@
64<v t="ekr.20091118065749.5261"><vh>@thin ctagscompleter.py</vh></v>64<v t="ekr.20091118065749.5261"><vh>@thin ctagscompleter.py</vh></v>
65<v t="ville.20091204224145.5355"><vh>@thin codewisecompleter.py</vh></v>65<v t="ville.20091204224145.5355"><vh>@thin codewisecompleter.py</vh></v>
66</v>66</v>
67<v t="ekr.20040722135402.1"><vh>Body pane</vh>67<v t="ekr.20040722135402.1" a="E"><vh>Body pane</vh>
68<v t="edream.110403140857.8"><vh>@thin color_markup.py</vh></v>68<v t="edream.110403140857.8"><vh>@thin color_markup.py</vh></v>
69<v t="ekr.20060506070443.1"><vh>@thin detect_urls.py</vh></v>69<v t="ekr.20060506070443.1" a="E"><vh>@thin detect_urls.py</vh></v>
70<v t="edream.110203113231.753"><vh>@thin image.py</vh></v>70<v t="edream.110203113231.753"><vh>@thin image.py</vh></v>
71<v t="edream.110203113231.925"><vh>@thin script_io_to_body.py</vh></v>71<v t="edream.110203113231.925"><vh>@thin script_io_to_body.py</vh></v>
72<v t="ekr.20080619090226.4"><vh>rClick plugin</vh>72<v t="ekr.20080619090226.4"><vh>rClick plugin</vh>
@@ -364,7 +364,7 @@
364<v t="edream.110203113231.873"><vh>@thin at_folder.py</vh></v>364<v t="edream.110203113231.873"><vh>@thin at_folder.py</vh></v>
365<v t="ekr.20040915085351"><vh>@thin at_produce.py</vh></v>365<v t="ekr.20040915085351"><vh>@thin at_produce.py</vh></v>
366<v t="ktenney.20041211072654.1"><vh>@thin at_view.py</vh></v>366<v t="ktenney.20041211072654.1"><vh>@thin at_view.py</vh></v>
367<v t="tbrown.20091029123555.5319" descendentVnodeUnknownAttributes="7d71005803000000302e3571017d710258040000007465737471037d710458050000005f6564697471057d7106580400000074686973710758120000006f6b20686f77206120626f757420746869737108737373732e"><vh>@thin attrib_edit.py</vh></v>367<v t="tbrown.20091029123555.5319" descendentVnodeUnknownAttributes="7d71005503302e3571017d710258040000007465737471037d710458050000005f6564697471057d7106580400000074686973710758120000006f6b20686f77206120626f757420746869737108737373732e"><vh>@thin attrib_edit.py</vh></v>
368<v t="mork.20041020082242.1"><vh>@thin base64Packager.py</vh></v>368<v t="mork.20041020082242.1"><vh>@thin base64Packager.py</vh></v>
369<v t="tbrown.20070322113635"><vh>@thin bookmarks.py</vh></v>369<v t="tbrown.20070322113635"><vh>@thin bookmarks.py</vh></v>
370<v t="ekr.20060807103814.1"><vh>@thin datenodes.py</vh></v>370<v t="ekr.20060807103814.1"><vh>@thin datenodes.py</vh></v>
@@ -801,8 +801,7 @@
801</v>801</v>
802<v t="ekr.20100103093121.5329"802<v t="ekr.20100103093121.5329"
803marks="vivainio2.20091008133028.5823,vivainio2.20091008140054.14555,ville.20091008210853.7616,ville.20091023181249.5264,vivainio2.20091008133028.5825,ville.20091023181249.5266,"><vh>@thin stickynotes.py</vh></v>803marks="vivainio2.20091008133028.5823,vivainio2.20091008140054.14555,ville.20091008210853.7616,ville.20091023181249.5264,vivainio2.20091008133028.5825,ville.20091023181249.5266,"><vh>@thin stickynotes.py</vh></v>
804<v t="ekr.20100103093121.5339"804<v t="ekr.20100103093121.5339"><vh>@thin stickynotes_plus.py</vh></v>
805marks="vivainio2.20091008133028.5823,vivainio2.20091008140054.14555,ville.20091008210853.7616,ville.20091023181249.5264,vivainio2.20091008133028.5825,ville.20091023181249.5266,"><vh>@thin stickynotes_plus.py</vh></v>
806<v t="ekr.20070119094733.1"><vh>@thin dtest.py</vh></v>805<v t="ekr.20070119094733.1"><vh>@thin dtest.py</vh></v>
807</v>806</v>
808<v t="ekr.20061023142737"><vh>UNL plugin</vh>807<v t="ekr.20061023142737"><vh>UNL plugin</vh>
@@ -867,10 +866,11 @@
867<v t="ekr.20040915075530"><vh>@thin UASearch.py</vh></v>866<v t="ekr.20040915075530"><vh>@thin UASearch.py</vh></v>
868<v t="ekr.20040831122004"><vh>@thin UniversalScrolling.py</vh></v>867<v t="ekr.20040831122004"><vh>@thin UniversalScrolling.py</vh></v>
869<v t="ekr.20040831115238"><vh>@thin URLloader.py</vh></v>868<v t="ekr.20040831115238"><vh>@thin URLloader.py</vh></v>
870<v t="ekr.20060506070443.1"></v>869<v t="ekr.20060506070443.1" a="E"></v>
871<v t="ville.20090310191936.10"><vh>@thin colorize_headlines.py</vh></v>870<v t="ville.20090310191936.10"><vh>@thin colorize_headlines.py</vh></v>
872<v t="ville.20090314215508.4"><vh>@thin quicksearch.py</vh></v>871<v t="ville.20090314215508.4"><vh>@thin quicksearch.py</vh></v>
873<v t="ville.20091008210853.5241"><vh>@thin stickynotes.py</vh></v>872<v t="ville.20091008210853.5241"
873marks="vivainio2.20091008133028.5823,vivainio2.20091008140054.14555,ville.20091008210853.7616,ville.20091023181249.5264,vivainio2.20091008133028.5825,ville.20091023181249.5266,"><vh>@thin stickynotes.py</vh></v>
874</v>874</v>
875</v>875</v>
876</vnodes>876</vnodes>
@@ -4496,7 +4496,7 @@
4496<t tx="ekr.20041114103913.1">PLEASE define each function or method in a separate node! To make this work,4496<t tx="ekr.20041114103913.1">PLEASE define each function or method in a separate node! To make this work,
4497just put @others in the root of your plugin as shown. Note that @others may be4497just put @others in the root of your plugin as shown. Note that @others may be
4498nested, as shown in class myClass.</t>4498nested, as shown in class myClass.</t>
4499<t tx="ekr.20041211035618" str_leo_pos="2"></t>4499<t tx="ekr.20041211035618" str_leo_pos="2,3,1"></t>
4500<t tx="ekr.20041231134702"># This is called from plugins_menu plugin.4500<t tx="ekr.20041231134702"># This is called from plugins_menu plugin.
45014501
4502# It should only be defined if the extension has been registered.4502# It should only be defined if the extension has been registered.

Subscribers

People subscribed via source and target branches

to status/vote changes: