How to add, extract, modify "tiddlers" from command line? To do IPFS media transfer

Thanks again for your precious help !

I have a question about “encrypted tiddlers”, do you know if there is a way to manipulate them form command line?

Consider a created date it is stored in the form YYYYMMDDhhmmssxxx or the date format YYYY0MM0DD0hh0mm0ss0xxxsimple date comparisons is easy because any date before is a smaller number and any date after a larger number.

  • Just construct a date number for and compare it greater than or less than eg
    • [<now YYYY0MM0DD0hh0mm0ss0xxx>...
    • 20220902120000000 midday on 20220902
1 Like

@TW_Tones thanks for your good advice about date comparison

I found https://github.com/masonicGIT/sjcl-cli that is the same way tiddlers are encrypted… “Stanford JavaScript Crypto Library”

But import command is missing “crypto” encoding type…
Is the “encrypt widget” a way? Do you know what is PasswordVault ?

If you are trying to import from an encrypted wiki, try preceding the --import command with --password <mypassword>, replacing “” with your password.

See https://tiddlywiki.com/#PasswordCommand

This way, the encrypted tiddler is imported in clear or encrypted version?

I would like to import a clear tiddler, but encrypt it before or during --import for protecting data from being seen by anyone. Only TW owner knows the pass code and can decrypt it …

To import “outside data” by forging json, I think i need to encrypt “text” with sjcl-cli, before using --import new_tiddler.json "application/json"

good command to see if it extract…

now the “cyphering” pipe is broken, will need to bypass interactive CLI to have automation

sjcl encrypt coucou
Enter data: coucou
Enter password: ****
Confirm password: ****
Encrypted data:
		 {"iv":"00OPCx2cSDn7PZZF+gtEOQ==","v":1,"iter":10000,"ks":128,"ts":64,"mode":"ccm","adata":"","cipher":"aes","salt":"buemB9E09Io=","ct":"NCbnX7tzTYIQh42nuEg="}

with sudo apt install expect

and understand what to copy in which json tiddler field

Hi @papiche how are you getting on with this? Let us know if you have more questions.

Hi,

Bypassing sjcl encrypt CLI prompt was abandoned.
And symmetric ciphering is not the best to share a secret :wink:
So.
We are going to use “public key” encryption (+ priv key signature) in tiddlers hidden fields.

We also work on TW templates too.
Tiddlywiki and the IPFS “Video Wall” Experiment

We hope to be soon ready to welcome users in our beta testing groug…
‘PM’ if you wish to participate?

Good to hear, thanks @papiche

1 Like