ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Post New Requests Here

IDEA: convert rich text formatting to user-specified markup/markdown

(1/1)

dr_andus:
I'd need a little app that lives in the system tray area (where its options can be accessed) and which can be operated using a hotkey to copy to clipboard, convert the following rich text formatting into markup specified by the user (set up beforehand in the options), and keep it in the clipboard. Ideally there would be an option for the user to save a variety of markups for different applications (such as wiki markup or Markdown).

I wouldn't need the full set of rich text formatting converted, but, in order of importance (for me, but it doesn't mean they need to be in this order in the app), the following:

1. Convert italics to //italics//

2. Convert bold to **bold**

3. Convert superscript2 to superscript^^2^^

4. Convert subscript2 to subscript;;2;;

5. Convert underline to __underline__  (that's 2x underscore on both sides)

6. Convert strikethrough to --strikethrough--

(Sorry, didn't know how to do the superscript2 and subscript2 with DC's forum software.)

It would be mainly used to copy and convert text from PDFs, webpages, and MS Word. Lines copied from a PDF would be broken, but that's not a big deal as I can join the lines in a text editor before pasting it into its final destination.

The above markup is for a desktop wiki (ConnectedText), but one could manually change (or set up other instances for) the markup to other wikis or for Markdown.

Option to deselect some of the above (e.g. when one doesn't want strikethrough to be converted but everything else) would be also nice.

Does this sound feasible? (AutoHotkey would be fine.)

dr_andus:
If it wouldn't be a big additional step, it would be also nice to have

"text highlighted in yellow" to be converted to  %%background-color=#ffff00%%text highlighted in yellow%%%%

(again, sorry, didn't know how to highlight text as yellow in the forum software)

dr_andus:
P.S. While I presented the above to match my specific needs (which are mainly for converting to ConnectedText markup), I thought that by making the markup user-specifiable, it would become more useful to others as well (and occasionally I may want to convert it to Markdown myself). However, if making it a universal app is a lot more hassle for the programmer, I'd be very satisfied with just having a ConnectedText-specific solution as well.

dr_andus:
Did a bit more research on whether something like this exists and whether there any major obstacles. Similar efforts include:

- Wiky: A Bidirectional Markup Converter and WikyBox - no rich text, only Wiky markup to HTML and back;

- HTML to DokuWiki Converter - no rich text;

- Mark It Down: convert rich text to Markdown this one does convert some rich text, but not consistently.

One problem concerns how to copy rich text from a PDF, and then how to convert that into HTML, so that a tool like one of the above would recognise it. The only workflow that sort of worked was the following:

1) use PDF-XChange Editor's "Copy as rich text" feature.

2) paste into MS Word.

3) copy and paste into Mark It Down;

4) convert to Markdown. Except of course Markdown is not what I'm after. I'd prefer to set my own markup to be able customise the basic formatting options (such as for ConnectedText).

I have also found that there is at least one other person  on this planet that might be interested in a solution to this problem (in his case it would be for Zim wiki).  :)

Navigation

[0] Message Index

Go to full version