I think you can export JSON, and turn it to txt instead (without html tags in .html file, it is much smaller)
I use [all[]!is[binary]field:type[text/vnd.tiddlywiki]] to export tiddlers that might be meaningful to GPT
export json to C:\Users\linonetwo\Downloads\tiddlers.json
use following script to turn it to txt
use txt directly or print it to pdf
const fs = require('fs'); // If running in Node.js
// If you're running this in a browser environment, you might need to use a different approach to read the file, such as FileReader API.
// Read the tiddlers.json file
const jsonData = fs.readFileSync('C:/Users/linonetwo/Downloads/tiddlers.json', 'utf8'); // Assuming tiddlers.json is in the same directory
// Parse the JSON data
const tiddlers = JSON.parse(jsonData);
// Concatenate the text fields with their corresponding titles
let concatenatedText = '';
tiddlers.forEach(tiddler => {
concatenatedText += `${tiddler.title}:\n${tiddler.text}\n\n`;
});
fs.writeFileSync('C:/Users/linonetwo/Downloads/tiddlers.txt', concatenatedText, 'utf8')
script is written by GPT3.5, and the result is pretty small (1.9M)
Creating a custom filter operator in TiddlyWiki using JavaScript involves several steps, but it’s a great way to extend TiddlyWiki’s functionality to meet your specific needs. Here’s a basic guide to get you started:
1. Understand Filter Operator Structure
A filter operator in TiddlyWiki processes an input list of tiddler titles and outputs a modified list according to specific criteria. It typically has this structure:
Name: The operator’s identifier in filter expressions.
Function: The JavaScript function that implements the operator’s logic.
Parameters: Arguments that can modify the operator’s behavior.
2. Create Your JavaScript Module
You’ll need to create a JavaScript module that TiddlyWiki can recognize and load. This involves writing your filter operator’s code and saving it in a .js file within your TiddlyWiki plugins folder, or embedding it directly in a tiddler set to the correct module type.
Here’s an example of a simple filter operator that filters tiddlers based on whether their titles are of even length:
/*\
title: $:/plugins/yourname/yourplugin/filters/evenlength.js
type: application/javascript
module-type: filteroperator
Filter operator to select tiddlers with titles of even length.
\*/
exports.evenlength = function(source, operator, options) {
var results = [];
source(function(tiddler, title) {
if(title.length % 2 === 0) {
results.push(title);
}
});
return results;
};
3. Module Type and Path
Set the module type to filteroperator in your tiddler’s fields or your .js file’s metadata.
Choose a meaningful title/path. For plugins, a common convention is $:/plugins/[yourname]/[pluginname]/filters/[operatorname].
4. Using Your Filter Operator
After adding the custom filter operator to your TiddlyWiki, you can use it like any built-in operator. For instance, assuming your operator is named evenlength, you could use it in a filter like this:
[all[tiddlers]evenlength[]]
This filter would return all tiddlers with titles of even length.
5. Testing and Debugging
Test your filter operator thoroughly to ensure it behaves as expected.
Use the browser’s developer tools to debug if something doesn’t work. Look for errors in the console, and check if your operator is being loaded correctly.
6. Documentation and Sharing
Document how to use your filter operator, including examples.
If you plan to share your plugin, consider publishing it on the TiddlyWiki community platforms or repositories.
Further Learning
For more complex behaviors, delve into TiddlyWiki’s core code to understand how built-in filter operators work. The TiddlyWiki documentation and source code are excellent resources for learning more about filter operators and TiddlyWiki’s internals.
Remember, creating custom functionality in TiddlyWiki can be incredibly rewarding. Don’t hesitate to experiment and explore the possibilities!
You make use of a “proprietary IA”, I can’t access…
My mean is to create an open “TW5 assistant” model that could perform as “chatGPT4”
or better.
I’m using www.coze.com , I think it uses GPT4. I put all tw5-com doc to its database, and it still can’t understand filter expression and widget well.