How to convert html snippets to wikitext content

There are times when I work with markdown files, and eventually I need to convert these files into my wiki. But at the moment I haven’t found a particularly good tool for that. Because I want to copy the markdown content directly, then convert it to wikitext, and then I copy it to my notes. Although there are some plugins that can do similar function. But the result is not very good.

I can convert markdown to html format through some widgets. Just like the code below. (Not related to the topic, just an example)

<p>To open PDB files, you can use the following methods:</p>
<ol>
<li><p><strong>Protein Structure Visualization Software</strong>:</p>
<ul>
<li><strong>PyMOL</strong>: This is a widely used molecular visualization software in the field of molecular biology. You can open PDB files by entering <code>load yourfile.pdb</code> in the command line, or through PyMOL's graphical interface by selecting &quot;File&quot; and then clicking &quot;Open&quot; to locate and open your PDB file.</li>
<li><strong>Chimera</strong>: This is another powerful molecular visualization and analysis tool that supports a variety of molecular file formats, including PDB. You can open PDB files through Chimera's graphical interface by selecting &quot;File&quot; and then clicking &quot;Open&quot;, or by entering <code>open yourfile.pdb</code> in Chimera's command line.</li>
<li><strong>RasMol</strong>: This is an earlier molecular visualization tool, which, despite its relatively simple functionality, remains useful in certain situations due to its lightweight and quick response. You can open PDB files through RasMol's graphical interface by selecting &quot;File&quot; and then clicking &quot;Open&quot;, or by entering <code>load yourfile.pdb</code> in RasMol's command line.</li>
</ul>
</li>
<li><p><strong>Online Browsers</strong>:</p>
<ul>
<li><strong>RCSB PDB</strong>: This is the official website of the PDB database, offering an online PDB file browser. You can search and browse PDB files on the site and view detailed information about protein structures.</li>
</ul>
</li>
<li><p><strong>Text Editors</strong>:</p>
<ul>
<li>PDB files are essentially text files and can be opened with any text editor, such as Notepad++ or Sublime Text. However, please note that due to the complex format of PDB files, it may not be convenient to read and parse the file content directly with a text editor.</li>
</ul>
</li>
</ol>
<p>Choosing the right tool and method can greatly improve your efficiency in handling PDB files. Whether you use professional molecular visualization software, view through an online browser, or open directly with a text editor, you can choose the most suitable method based on your needs and preferences.</p>

After that I explored a lot of ways, but didn’t find a more reasonable way to go about converting html code to wikitext, can anyone tell me how to do it?

[[$:/state/markdown-tid]]


<$edit-text tiddler="$:/state/markdown-tid" class="w-100"/>

<$button> CLICK ME
   <$wikify name="out" text={{$:/state/markdown-tid}} output="formattedtext" >
      <$action-setfield $tiddler="JoinedOutput" text=<<out>> />
   </$wikify>
</$button>

I tried the code above. It does convert, but it doesn’t work well.




To open PDB files, you can use the following methods:


* 
Protein Structure Visualization Software:


* PyMOL: This is a widely used molecular visualization software in the field of molecular biology. You can open PDB files by entering load yourfile.pdb in the command line, or through PyMOL's graphical interface by selecting "File" and then clicking "Open" to locate and open your PDB file.

* Chimera: This is another powerful molecular visualization and analysis tool that supports a variety of molecular file formats, including PDB. You can open PDB files through Chimera's graphical interface by selecting "File" and then clicking "Open", or by entering open yourfile.pdb in Chimera's command line.

* RasMol: This is an earlier molecular visualization tool, which, despite its relatively simple functionality, remains useful in certain situations due to its lightweight and quick response. You can open PDB files through RasMol's graphical interface by selecting "File" and then clicking "Open", or by entering load yourfile.pdb in RasMol's command line.



* 
Online Browsers:


* RCSB PDB: This is the official website of the PDB database, offering an online PDB file browser. You can search and browse PDB files on the site and view detailed information about protein structures.



* 
Text Editors:


* PDB files are essentially text files and can be opened with any text editor, such as Notepad++ or Sublime Text. However, please note that due to the complex format of PDB files, it may not be convenient to read and parse the file content directly with a text editor.




Choosing the right tool and method can greatly improve your efficiency in handling PDB files. Whether you use professional molecular visualization software, view through an online browser, or open directly with a text editor, you can choose the most suitable method based on your needs and preferences.


As you can see there are some identifiers that are not handled correctly.

http://skplugins.tiddlyspot.com/#HTML%20Convert

This site also contains some other important plugins which seems to have slipped out of our attention like an exel-converter

Nice find! I’m gonna have a closer look at these later :slight_smile:

Thanks, I’ll check out the plugin.

if either of you manage to get this to work @dongrentianyu or @JanJo I’d love to know about it. I tried installing the HTML convert plugin and it doesn’t seem to do anything with the HTMLs I import via drag-and-drop

Have you testet It on Stefans site? It should give you a toolbar button… which didn’t appearat in my Wiki at first

Within the editor? I got that one. How did you perform your import? I saved an HTML and then dragged it into the wiki. Then went to the editor and pushed the button. No visible changes.

The tools act on the already imported html/csv/tabbed tables. You have to select the text that you want to change in the editor and then click the relevant editor button.

You will have to experiment on how to get the original unconverted text into TW. Drag/drop and copy/paste inside/outside the editor box will do slightly different things and some may just import as plain text and strip all the original formatting that you need to convert.

/Mike

Have you considered leaving markdown as is, and use the markdown plugin?

Personally I feel we need to add tiddlywiki wiki text to pandoc converters then you could go between any pandoc format.