The FileUploads plugin uses a filter to determine what to tiddlers to upload, so is completely flexible in that regard.
Great !! Your help unlock my first wish
âAdding tiddler to an online IPFS Tiddlywikiâ
My second wish then is âCopy internal/external media binaries from a tiddlywiki to IPFS to reduce index.html size and optimize my hostingâ
Do you have an example of a command extracting some tiddlers.json from a specific field or tag values ?
After that, If I want to replace tiddler:
- Do I need to remove old one, then add the new tiddler.
- Or âupdate specific tiddlerâ command exists?
@saqimtiaz, maybe after I can understand how to use your method, before, I must learn how to manipulate tiddlers from command line
Continuing exploring commands
https://tiddlywiki.com/#FetchCommand
https://tiddlywiki.com/#SaveCommand
And found
http://tobibeer.github.io/tw/filters/#Filter%20Examples
Extending the command
tiddlywiki --verbose --load index.html --import ~/Bureau/Journal/youtube/Original_Atari_PONG-1972-arcade_machine_gameplay_video.dragdrop.json json
with
Result in the fact newindex.html and index.html are the same !?
I donât know. Try this.
tiddlywiki --verbose --load index.html --load "~/Bureau/Journal/youtube/Original_Atari_PONG-1972-arcade_machine_gameplay_video.dragdrop.json" --output . --render "$:/core/save/all" "newindex.html" "text/plain"
How did you verify this? Are the files the same size? If the added tiddler does not contain a created
field, it will not show up in the Recent
tab, but it will show up in the All
tab.
Youâre right. My mistake was to put a trailing / in --output /tmp/
as file path
tiddlywiki --verbose --load index.html \
--import new_tiddler.json "application/json" \
--output /tmp --render "$:/core/save/all" "newindex.html" "text/plain"
This is the working âimport tiddlerâ command line.
I was missing "application/json"
for import
PS: I get json template from âexport tiddler as jsonâ from GUI
About SaveCommand I am a bit lost with filters
I can save tiddler with certain tittle.
But some filtering expression examples are missing to me
Like
- save to json format instead of .tid ?
- knowing TW last modification date ?
- âselect & save tiddlerâ containing a tag, a field, with certain values ?
- save tiddlers created after a certain date ?
Some examples would enhance my learning curve
Iâm thinking you may actually want the render command. There is an example for saving to JSON, though I feel the example must be wrong (maybe a leftover from a prior command), because the elements are in the wrong order.
@Mark_S thanks.
Great, render is the command I was needing.
I could make a script
- searching for tiddlers âtag=tubeâ,
- find URL in âtextâ,
- download it with yt-dlp,
- add mp4 video file to IPFS,
- create new tiddler removing first one
- publish new version of TW to IPNS
I am using TW associated with a crypto key related with IPFS/IPNS key. So anyone can store its tiddlywiki in the âinterplanetary file systemâ only through a âsalt/pepperâ NaCl key generator converted to ED25519 format
Btw, I still wonder how I could know TW last modification date ?
Unfortunately, there arenât many built-in functions for handling dates. You could filter, say, all tiddlers modified in the last 3 days:
[days[-3]]
Or, if you make up your date like yyyymmdd you can compare it:
[tag[HelloThere]]:filter[get[modified]compare:date:gt[20200101]]
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 YYYY0MM0DD0hh0mm0ss0xxx
simple 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
@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.
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,
Bypassing sjcl encrypt
CLI prompt was abandoned.
And symmetric ciphering is not the best to share a secret
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?