This repository holds the content of my blog post series for converting Notes RichText to Markdown. You can read about that on the following links.
You'll need Java 8 to run the code.
Besides the source code you'll find a sample database in src/test/resources
which can be used to test drive the code. The sample database contains a few documents and need no special setup.
You may use any own database. In that case you have to make sure that you change the fields that are read from the view.
The project uses Gradle.
To setup the project for Eclipse run the following command from your command line.
gradle cleanEclipe eclipse
That will create the needed Eclipse project files and also download the dependencies. You can afterwards import the project into Eclipse.
If you don't have Gradle installed - the Gradle wrapper is attached to the project. Replace gradle
with gradlew
in the commands to run it standalone.
This step is not mandatory.
For running the code you've to change the some properties, like the server host name, view etc. Those are configured in the file src/main/resources/application.properties
.
Enter the hostname or IP address of the IBM Domino server (without a prepended http or https) in here. The PoC code uses http fixed. You can change that if you want. ;-)
Enter the full path (relative to the Domino data directory) to your test database in here.
Enter the view name that'll be used for getting the document data in here.
Set the field name that contains the to be converted RichText in here.
The PoC code assumes that the connection needs authentication. So set a valid HTTP username in here.
Well, its clear what should be in here, right?
Enter the target folder on your file system in here. The generated Markdown files will be stored in here.
After you've changed the application.properties
file you've two options to run the code. A runnable class is located for that in src/main/java/com.winkelmeyer.richtext2markdown.tests.SimpleTest
.
Just as usual you can run the class as a Java application.
Here you've two options. You can either run it directly via your command line or create a runnable/distributable JAR file. Make sure that your java.home property is set correctly within your operating system.
Enter gradle run
on the command line. That will execute the class directly.
Enter gradle installDist
on the command line. This will create a full distributable package located in build/install/com.winkelmeyer.richtext2markdown
. Within the bin
folder you'll find two executables (Windows/Unix).
Read more about this in the Gradle documentation and in my ICON UK presentation.
You can inspect the result data within the generated Markdown files. Play with different RichText elements to see and learn about the output (and with that about the stuff you may have to think about).
There are lots of different Markdown viewers and editors for all operating systems available. Pick one that you'll like. ;-)