openmolecules.org

 
Home » DataWarrior » Functionality » Hyperlinks
Hyperlinks [message #721] Thu, 12 December 2019 03:18 Go to next message
sbembenek18 is currently offline  sbembenek18
Messages: 60
Registered: April 2019
Member
It would be great if hyperlinks could be activated within DW; alone or as a new column type.
Re: Hyperlinks [message #729 is a reply to message #721] Tue, 17 December 2019 22:11 Go to previous messageGo to next message
thomas is currently offline  thomas
Messages: 715
Registered: June 2014
Senior Member
You can do that if you edit a dwar file with a text editor. You need to add column properties like the these (taken from the DataWarrior file after retrieving all wikipedia compounds) into the column properties section:

<column properties>
...
<columnName="Compound Name">
<columnProperty="lookupCount 1">
<columnProperty="lookupName0 Wikipedia Entry">
<columnProperty="lookupURL0 http://en.wikipedia.org/wiki/%s">
</column properties>

This means the following: The column with the name 'Compound Name' gets three column properties:
lookupCount<TAB>1: there is one URL lookup
lookupName0<TAB>Wikipedia Entry: the name of this lookup (index=0) is 'Wikipedia Entry'
lookupURL0<TAB>http://en.wikipedia.org/wiki/%s: the URL for every cell of this column (also here is lookup index=0) is the given one, where '%s' is automatically replaced by the cell content. If you wanted to have the entire URL in the cell, then the given URL should be simply '%s'.

Hope I could explain it in an understandable manner, Thomas
Re: Hyperlinks [message #765 is a reply to message #729] Sun, 02 February 2020 08:36 Go to previous messageGo to next message
sbembenek18 is currently offline  sbembenek18
Messages: 60
Registered: April 2019
Member
thanks Thomas. How hard would it be to add "Hyperlink" as a column type (when adding a column) such that links would be active when in this column?
Re: Hyperlinks [message #768 is a reply to message #765] Mon, 10 February 2020 22:03 Go to previous messageGo to next message
thomas is currently offline  thomas
Messages: 715
Registered: June 2014
Senior Member
that should be possible without a lot of effort. I will experiment...
Re: Hyperlinks [message #776 is a reply to message #768] Wed, 12 February 2020 19:41 Go to previous messageGo to next message
thomas is currently offline  thomas
Messages: 715
Registered: June 2014
Senior Member
It is now built into the current beta and will be in the next official version that is due in a few days...
Re: Hyperlinks [message #791 is a reply to message #776] Mon, 02 March 2020 00:27 Go to previous messageGo to next message
sbembenek18 is currently offline  sbembenek18
Messages: 60
Registered: April 2019
Member
Very cool. I just saw this. I created a weblink column and put in a link -- but I cannot get it to activate when I click on it.
Re: Hyperlinks [message #794 is a reply to message #791] Mon, 02 March 2020 17:46 Go to previous messageGo to next message
thomas is currently offline  thomas
Messages: 715
Registered: June 2014
Senior Member
a right mouse click of the link, followed by selecting 'open ... in web browser' should do it.
A single click just selects the cell, a double click allows to edit the cell's content.
Re: Hyperlinks [message #798 is a reply to message #794] Tue, 03 March 2020 01:19 Go to previous messageGo to next message
sbembenek18 is currently offline  sbembenek18
Messages: 60
Registered: April 2019
Member
thanks. It opens with Firefox (even though Google is set as my default browser), which causes an error. It then proceeds to open with Google, which works. Is there a way to get DW to use Google the first time?
Re: Hyperlinks [message #799 is a reply to message #798] Tue, 03 March 2020 21:47 Go to previous messageGo to next message
thomas is currently offline  thomas
Messages: 715
Registered: June 2014
Senior Member
which OS do you use? Except for Linux, where it explicitly opens Firefox, it should open the default browser. If you say Google, do you mean Crome or Cromium?
Re: Hyperlinks [message #800 is a reply to message #799] Wed, 04 March 2020 21:13 Go to previous message
sbembenek18 is currently offline  sbembenek18
Messages: 60
Registered: April 2019
Member
I'm using Linux and Chrome
Previous Topic: tautomer & protomer display
Next Topic: Duplicate Molecules
Goto Forum:
  


Current Time: Thu Nov 21 23:31:04 CET 2024

Total time taken to generate the page: 0.03476 seconds