How to make a template/button?

@TW_Tones and @pmario
Please accept my sincere thanks for your time and effort in helping me with this mission. I must admit that it took me a long, long time to work out how to install the two JSONs, but I managed it in the end and I’m pleased that I perservered. It’s exciting to see everything start to come together. Here is a look at a sample book review.

Looks great! Again, thank you so much. I am so happy with it. :smiley:

Naturally, I still have questions and I hope you won’t get tired of answering them. For now, I have two questions:

  1. As mentioned before, I have about 300 book reviews that I would like to import. I believe I have to export them from the source first, change the headings to match what I have in Tiddlywiki and then import to my Tiddlywiki. I think I’ll be OK with this bit. But I don’t understand how the import will know to look for the book review template?

  2. Once all the book reviews are in my Tiddlywiki, I’ll want to add more each time I finish reading a book. So, how do I create a new book review? I notice “fields” have been created in Alice, so should I create a button with these fields so that I have a blank template?

As always, I appreciate your time and efforts.

kind regards,
Karen

1 Like

I discovered the answer to question 2. I made a New Review Button using the fields in the template and it works like a charm. :slight_smile: And, it didn’t take two days, so I’m even happier.

Yes, that’s probably the the trickiest part. I don’t know how the export format from WordPress looks like. But TW has s CSV (comma seperated values) import plugin and a plugin for importing from Excel.

I do not use them myself, so someone else would need to jump in here. … But I did a short Google search and found this: Export any WordPress data to XML/CSV – WordPress plugin | WordPress.org … so there are probably plenty of WP plugins, that you can use.

The simpliest import for TW is a TID file. eg: alice.tid which would need to look like this.

title: Alice
tags: tag1 tag2 [[tag with spaces]]
book-rating: ... 
book-blurb: ... 

The text comes here with 1 empty line between the fields above and the main text. 
Done.

If it is possible to create something like this, it will be very straight forward to import it into TW. Every other format is more complex.

-m

Thanks for the quick reply. I know I can export a XML/CSV. I think I’ll attempt a small export and import into another test wiki to see how it works out.

Once you have the data, you could use Tiddler Commander for batch processing to rename fields or other changes, that you may need.

It would be very useful to be able to import data from WordPress blogs. WordPress has a standard, built-in XML export format that doesn’t need a plugin:

It’s not something I can work on right now, but I’d be happy to help anyone who wanted to pick it up.

2 Likes

If you can export a few reviews and share the file, I would be happy to look at an import process for you.

  • I have done a fair bit of this and interested in building a generic WordPress to TiddlyWiki process.

I attempted to export from Wordpress and import to Tiddlywiki, and it didn’t really work.

Firstly, I exported from Tiddlywiki to see what it looks like and got the following:


Nothing unusual there. I expected to see this.

Then, I exported to XML from Wordpress, and imported to Tiddlywiki. While the data imported, it all appeared in one tiddler. I don’t know if that is normal or not, but it would take me a long time to fix and to me was not ideal. The file looked like this:

So I found an exporter to CSV for Wordpress and it was closer to what I need as the data was in columns. However, it brought across a lot of Wordpress coding, which is a pity:

I’m not sure how to move forward from here. The time it will take to tidy up the spreadsheet, could take me days, unless there’s a way to strip the Wordpress coding. More research is required. Does anyone have any suggestions?

I can help more later, but I am quite busy this weekend. Some tips to get you started,

  • How many posts do you have to convert? This can make a big difference to the approach.
    • You may find even with a 100 or so you could copy and paste content, making use of Browser addons, even select, drag and drop, to copy as text etc… it would take a few hours ONLY
  • CSV is normally the best way
  • Some wordpress plugins are better than others at exporting.
    • You can see which fields/columns to not export.
  • WordPress sits on top of a database and someone with the skills, even some online guides can tell you how to export via database query.
  • If something is reoccurring like <!-- wp:paragraph --> its easy to remove with search and replace, but this is a comment and will not display anyway.
  • Some tools for CSV such as CSV Editors, exist that can help you “clean up your data” before you use a wiki with the “JSON Mangler” installed to import, select and convert them into tiddlers.
    • Most Spreadsheets can help you edit CSV as well.
  • If you can share a sample of your csv file, I and others can help more.

I am happy to help you here, but if you want you can engage me professionally to do the whole JOB.

Could you export 3 reviews into XML format and attach them here, so we can see, how they look like?

My apologies for the delay in responding. I have had a big week. Yesterday, I spent some time on my Tiddlywiki website and it’s coming together nicely. I do admit that it has been quite a learning curve for me, and some elements are quite out of my knowledge.

For now, I’m returning to my quest to find a quicker way of importing the posts from a Wordpress export. As requested, I attempted to attach an xml file with 3 book reviews, but received a message saying the file type is not authorised.

In total, I guess there are about 400 to 500 posts I wish to import into Tiddlywiki, the rest I will happily permanently dump. I did look into converting an xml file to json but the process is beyond me. It may be faster to copy and paste, in the long run.

For now, I will copy and paste a few and move on to creating a condensed version of my website to see if I can work out how to upload it via Github. Once I know I can do that, then I’ll seriously consider my options to moving my entire website over.

you can rename it from abc.xml to abc.xml.json. … May be that works.

You should be able to rename *.xml.txt before attaching

Do consider my offer

Or if your site is published give us a link or sample export files.

Otherwise we haven insufficient into to help.

You can just share with one individual too.

OK, I’m going to try to upload the xml file as a csv file instead. No, it didn’t work. I also changed the extension to json, but was unsuccessful.

My website can be found at https://karenleefield.com

I just had a quick look at the site and it should be trivial.

I will have a closer look tomorrow +10 hours. But I will message you privately.

Thy this one: https://wormhole.app/ … It will create a link, where we can download the content.

@pmario and @TW_Tones
I have uploaded an export from Wordpress for you to look at. There are 10 posts included from one category. The export is the standard export (not using a plugin) and looks a bothersome to me as it runs down the page, instead of across the page with titles.

Here’s the link: Wormhole link.

Apparently, the file will be deleted in 24 hours. I wasn’t able to lengthen the timeframe. Please let me know what you think. I do have files for other categories too, as I’m not interested in bringing all the posts over, just the relevant ones.

kind regards,
Karen

1 Like

Hi, I did have short look. … But I do not see any fields like “The blurb” or the Rating elements in the export. … It seems to contain 11 articles. … Should they have this meta data?

Thanks Karen,
TiddlyWiki could be given the capacity to handle XML Files however it does not currently. I am at for some XML tools that some one developed in the past but it would be more useful if it was in a CSV column format.

[Edited] I just found in my notes MS Excel reads XML so this is a way to generate a simpler csv from XML

@pmario I’m sorry, it appears I’ve uploaded the wrong one. It’s the author interviews instead of the book reviews. The format is the same for both, but different categories etc.

@TW_Tones This is the standard export. I’ve installed several plugins and they are confusing. However, I did manage to get an xml that had the data in columns. I can’t get a CSV unless I pay for an upgrade, which I’m not willing to do.

Here’s the link to the right document: 3 Review Wormhole Link

I’m sorry for wasting your time. If this doesn’t work, I think I’ll just work out how to get a working website and copy and paste the data.