Skip to content

exports each tiddler of a local tiddlywiki file to a textfile

License

Notifications You must be signed in to change notification settings

IE404/tiddler-export

Folders and files

NameName
Last commit message
Last commit date

Latest commit

author
ms
Oct 27, 2024
5314a1f · Oct 27, 2024

History

6 Commits
Oct 27, 2024
Oct 27, 2024
Oct 27, 2024
Oct 27, 2024
Oct 27, 2024

Repository files navigation

tiddler-export

Description

exports each tiddler of a local tiddlywiki file to a textfile with python and beautifulsoup

This application is meant as a base for yor own tiddler export needs. Especially if you have many custom tiddler fields, tiddler images, etc this needs tweaking but can be a good base for starting.

As of now it reads all tiddlers which are content tiddlers (no $:/ in tiddlers title), reads title, text and tags and writes it as a string into the new file. Final files are .md or .txt. it also preserves the tiddlers creation and modified date in the newly exportet files

the resulting file name is cleaned of special characters (again, tweak to your own needs) and each tiddler is written into a seperate file in the export folder. If you need special transformation (like replacing tiddlywikis headings "!" with "#" you can tweak this)

Installation

  • clone this repo
  • cd into cloned repo folder
  • create virtual environment
python -m venv .venv
  • activate environment
python .\.venv\Scripts\Activate.ps1
  • install requirements
pip install -r requirements.txt
  • deactivate environment
deactivate.ps1

Configuration

  • apply your settings in the main.py
tiddly_wiki_file = 'tiddlywiki.html' # name pf tiddlywiki to export files
ignore_types = ["image/png"] # ignore certain tiddler types
maximum_file_name_length = 220 # max length of file name
export_directory = "export" # name of folder where files will be stored. folder gets created if not exist
exportet_file_extension = "txt" # txt or md
exportet_file_tiddler_contents = ["title", "text", "tags"] # tiddler fields content, which get written in the exportet file

Run Application

  • copy your tiddlywiki.html file into the same folder as the main.py application
  • run the application from the command line (or Visual Studio, etc)
.venv/Scripts/python.exe ./main.py
  • check created files in the export folder

About

exports each tiddler of a local tiddlywiki file to a textfile

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages