Bitcoin Forum
April 26, 2024, 01:52:54 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How to convert a Word .doc to bbcode for Bitcointalk  (Read 416 times)
Pmalek (OP)
Legendary
*
Offline Offline

Activity: 2744
Merit: 7104



View Profile
February 22, 2021, 02:39:23 PM
Last edit: November 12, 2023, 10:01:46 AM by Pmalek
Merited by Welsh (8), suchmoon (4), vapourminer (3), ABCbits (3), malevolent (2), Halab (2), tranthidung (2), Daniel91 (1), hosseinimr93 (1), DdmrDdmr (1), Husna QA (1), DireWolfM14 (1), icopress (1), Heisenberg_Hunter (1)
 #1

I wasn't sure whether to post this here or somewhere else. I asked hilariousandco who said it can be in Meta or Off-topic. Hope it stays here though. Here it goes.


Sometimes when I create threads, I like to write the content in Word, and then I copy/paste the text to Bitcointalk. I find the Word environment easier to work with. When a thread has plenty of bbcode entries such as bold, italicised, underlined, different font sizes, etc., it can become tiresome working with each line of text to make it look the way you want it to.

When preparing the 2nd post in My Football Gambling System: A Betting Experiment, I needed to highlight each line individually and add bbcodes for underlined, green/red text, and bold text. It was time-consuming and tiresome. I thought: There has to be an easier way to do this.

I tried with a few online tools that convert a Word doc/docx into bbcode, such as https://any2bb.com/ or http://www.ecardmax.com/hoteditor/. But that didn’t give me satisfactory results. I put the results of these two converters in the screenshot below one next to the other. Compare it with the 2nd post in my thread, and you will notice how messed up the formatting is.



After a lot of searching, I finally came across a bbcode extension for Libre Office. I downloaded and installed Libre office, installed the extension and gave it a try. I finally got somewhere and was able to produce a decent copy of my Word document.

Below is a screenshot of how it looks when you convert a Word text to bbcode with Libre Office and the bbkode extension. On the left side are the results of the conversion with Libre Office. On the right is a screenshot taken from the thread, which was edited line by line in Bitcointalk.



As you can see, they are almost identical. There seems to be a difference in the colour shades between the two screenshots. But honestly, I prefer the green colour on the left more than the original.

The resulting bbcode of the converted document is quite messy, but it works:

Code:
[B][SIZE=12pt]Paris FC[/SIZE][/B]

[U][SIZE=10pt]Round 1[/SIZE][/U][SIZE=10pt]
[/SIZE][SIZE=10pt]Chambly vs [/SIZE][COLOR=#00B050][SIZE=10pt]Paris FC [/SIZE][/COLOR][SIZE=10pt]0:3
[/SIZE][SIZE=10pt]Odds: 3.25
[/SIZE][SIZE=10pt]Stake: $3.00[/SIZE][SIZE=10pt]
[/SIZE][B][SIZE=10pt]Profit/Loss: +$9.75[/SIZE][/B][SIZE=10pt]
[/SIZE][SIZE=10pt]
[/SIZE][U][SIZE=10pt]Round 2[/SIZE][/U][SIZE=10pt]
[/SIZE][COLOR=#FF0000][SIZE=10pt]Paris FC [/SIZE][/COLOR][SIZE=10pt]vs Valenciennes 1:0
[/SIZE][SIZE=10pt]Odds: 3.10
[/SIZE][SIZE=10pt]Stake: $3.00[/SIZE][SIZE=10pt]
[/SIZE][B][SIZE=10pt]Profit/Loss: -$3.00[/SIZE][/B][SIZE=10pt]
[/SIZE][SIZE=10pt]
[/SIZE][U][SIZE=10pt]Round 3[/SIZE][/U][SIZE=10pt]
[/SIZE][SIZE=10pt]Amiens vs [/SIZE][COLOR=#00B050][SIZE=10pt]Paris FC [/SIZE][/COLOR][SIZE=10pt]1:2
[/SIZE][SIZE=10pt]Odds: 3.50
[/SIZE][SIZE=10pt]Stake: $6.00[/SIZE][SIZE=10pt]
[/SIZE][B][SIZE=10pt]Profit/Loss: +$21.00[/SIZE][/B][SIZE=10pt]
[/SIZE][SIZE=10pt]
[/SIZE][U][SIZE=10pt]Round 4[/SIZE][/U][SIZE=10pt]
[/SIZE][COLOR=#FF0000][SIZE=10pt]Paris FC [/SIZE][/COLOR][SIZE=10pt]vs Nancy 0:2
[/SIZE][SIZE=10pt]Odds: 2.80
[/SIZE][SIZE=10pt]Stake: $3.00[/SIZE][SIZE=10pt]
[/SIZE][B][SIZE=10pt]Profit/Loss: -$3.00[/SIZE][/B]



Here is how you can do it as well:

1.   Download and install Libre Office from the official website: https://www.libreoffice.org/
2.   Download and install the BBkode extension for Libre Office: https://extensions.libreoffice.org/en/extensions/show/bbkode
3.   Edit your document in Libre Office or copy/paste the finished document from Word.
4.   Highlight the text that you want to convert to bbcode.


5.   In Libre Office, click on Tools > Add-Ons > BBcode



6.   A new window will appear with the text converted to bbcode. Click inside the box, hit CTRL+A to copy the content, and paste it into your topic/post on Bitcointalk. Play around with the “equalise font name” and “equalise font size” options to see the results.




This is not a perfect solution and can’t recreate everything. But it can help with the basics.
If someone knows a better way, please share it.


EDIT: FatFork found an excellent online converter that works with lists and tables as well. It's easy to use and produces great results.
The link to his post can be found here > SCEditor

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
Be very wary of relying on JavaScript for security on crypto sites. The site can change the JavaScript at any time unless you take unusual precautions, and browsers are not generally known for their airtight security.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
NotFuzzyWarm
Legendary
*
Online Online

Activity: 3612
Merit: 2506


Evil beware: We have waffles!


View Profile
February 22, 2021, 02:47:53 PM
 #2

Now go 1 better and ditch using MS Word. Just use Libre Office (or Open Office) for all you document needs....

- For bitcoin to succeed the community must police itself -    My info useful? Donations welcome! 1FuzzyWc2J8TMqeUQZ8yjE43Rwr7K3cxs9
 -Sole remaining active developer of cgminer, Kano's repo is here
-Support Sidehacks miner development. Donations to:   1BURGERAXHH6Yi6LRybRJK7ybEm5m5HwTr
Pmalek (OP)
Legendary
*
Offline Offline

Activity: 2744
Merit: 7104



View Profile
February 23, 2021, 09:35:37 AM
 #3

@NotFuzzyWarm
I don't think I will do that. I have used different versions of MS Word since I was a little kid. I never experienced any issues with it. I see no reason to completely switch to an open-source solution like Libre Office just because it's open-sourced. Using open-sourced software with anything related to your finances is recommended and I do that. Writing a few documents every now and then in something I have used for 20 years doesn't require a change.

I played around in Libre Office a bit while writing this guide to check out its features, and noticed a few things that are missing, but which are available in Word right from the start. I am sure they can be found with a bit of editing and online searching, but why change a working piece of document-editing software for no reason... 

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
Pmalek (OP)
Legendary
*
Offline Offline

Activity: 2744
Merit: 7104



View Profile
February 23, 2021, 10:32:06 AM
Merited by ABCbits (1)
 #4

It can't convert MS Word created tables unfortunately. It just places each word one below the other.
It can do lists, but it depends on the type of list.

If all lines have text with the same font size, it seems to work. You get this:

List

  • First item
  • Second item
  • Third item

Thank you!


If the lines contain text with different sizes, it messes it up. For example, if you have a heading just before the list, you get this output: 

List

  • First item
  • [/SIZE]
  • Second item
  • [/SIZE]
  • Third item

    Thank you!

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
Pmalek (OP)
Legendary
*
Offline Offline

Activity: 2744
Merit: 7104



View Profile
February 27, 2021, 10:00:42 AM
 #5

Bump and a question:

We have several coders, developers, and script creators on Bitcointalk. My question is for them. Do you think it would be difficult to code a .doc to bbcode converter that can be used on Bitcointalk? A tool that can recognize all the most used bbcode entries on Bitcointalk. There might not be that much interest in such a tool, but it's seems like an interesting project.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
FatFork
Legendary
*
Offline Offline

Activity: 1582
Merit: 2584


Top Crypto Casino


View Profile WWW
February 27, 2021, 06:24:15 PM
Merited by Welsh (6), Pmalek (2), ABCbits (1), Coyster (1), notasimp (1)
 #6

I have converted the doc formatting to bbcode several times so far with SCEditor and I've had pretty good results. SCEditor is a lightweight, open source, WYSIWYG BBCode and (X)HTML editor written in JavaScript and can be run online or locally in a browser.


https://www.sceditor.com/

Simply copy/paste the content from the word document into the SCEditor and, if necessary, edit the content further. When you are done with editing click on the 'View source' icon (<>) to get the bbcode. As far as I've tested so far, tables and lists work as well.

The only thing I didn't like is a bunch of [font] tags which is understandable since word documents most often use Arial font (at least on windows OS). This is easily solved by selecting the whole content and applying the Verdana font which is standard on the bitcointalk forum.

The good thing is that the software is open source and can be further configured with custom commands and bbcodes if you are a developer and know some JavaScript. Complete documentation can be found here: https://www.sceditor.com/documentation/

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
Pmalek (OP)
Legendary
*
Offline Offline

Activity: 2744
Merit: 7104



View Profile
February 28, 2021, 07:45:54 AM
Merited by FatFork (1)
 #7

Thank you FatFork.
This is excellent and seems to work really good. I wonder why this editor was never mentioned among the search results that I got while trying to find an appropriate editor. It can convert tables too which makes it better than the BBKode extension for Libre Office. It does add font tags to each line of text, but so does Libre Office and that isn't too big of a concern.

It's very useful and I am going to link to your post in my OP.

Text text text text text text
Text text text

New list:

1.   First
2.   Second
3.   Third

The end


TableTableTable
TableTableTable
TableTableTable
TableTableTable

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
FatFork
Legendary
*
Offline Offline

Activity: 1582
Merit: 2584


Top Crypto Casino


View Profile WWW
March 01, 2021, 07:19:42 PM
 #8

Thank you FatFork.

I'm glad you liked it.

I almost forgot about SCEditor because I used it a long time ago. Your thread reminded me of it and now I have another idea.
I need more follow-up research, so I'll get back here with my findings.

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
rosenbauer02
Member
**
Offline Offline

Activity: 205
Merit: 80


View Profile
April 02, 2021, 02:01:41 PM
 #9

Which means that those services offer for BBCode could no longer be needed or will be some sort of optional. I knew it from the start that those BB code in the services offer can be done so easily and here it goes the ways to make those BB codes. Thanks to OP for wonderful share since it has been some time when the BBCodes that are being created especially in the signature can be done in a easy manner.

Well, I just hope that I am right about whether these BBCodes are applicable to signature or if not then still the BBCodes services being rendered might slow down their business. 😁

Anyway, there is no big deal with the BBCodes services rendered for still their creativity and their inspiring ideas in designing signatures are incomparable and worth paying for the work done in doing the BB codes. I just hope that I can wear signature after ranking up jr or member. Getting into full member would be difficult especially that there are many bad newbie users degrading other newbies as well that are doing well in the forum.
kxwhalexk
Member
**
Offline Offline

Activity: 98
Merit: 173


View Profile
July 15, 2021, 08:50:52 AM
 #10

Hello, is there a way to send a beautiful excel form on bitcointalk? I don’t want to convert the table to a picture because it’s not friendly to those who need Google Translate
FatFork
Legendary
*
Offline Offline

Activity: 1582
Merit: 2584


Top Crypto Casino


View Profile WWW
July 15, 2021, 11:40:02 AM
 #11

Hello, is there a way to send a beautiful excel form on bitcointalk? I don’t want to convert the table to a picture because it’s not friendly to those who need Google Translate

I'm not sure if there is an easy way to convert an excel sheet to bbcode table format in one go. You might be able to copy-paste data from Excel into a Word document, and then using SCEditor convert word formatting to bbcode. However, due to the absence of cell borders in bbcode, you may need to perform additional content editing for a better visual appeal.

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
Pmalek (OP)
Legendary
*
Offline Offline

Activity: 2744
Merit: 7104



View Profile
December 18, 2021, 07:21:53 AM
 #12

Bump

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!