[tw5] Re: 3D file preview?

2021-09-19 Thread Ste
Did you make any progress on this Alex? 

On Tuesday, August 24, 2021 at 4:44:57 PM UTC+1 Alex Davies wrote:

> With the lazy-load tiddler on node-js supporting larger collections of 
> files it seems like a potentially very useful tool.
>
> On Wednesday, August 11, 2021 at 7:40:38 PM UTC-3 joshua@gmail.com 
> wrote:
>
>> Including 3d files in a wiki is a really neat idea. Man, I wish I had 
>> more time. Replaying so I can find the thread later. ;)
>>
>> Best,
>>
>> Joshua Fontany
>>
>> On Wednesday, August 11, 2021 at 3:58:15 AM UTC-7 Ste wrote:
>>
>>> There is also this as part of the plugin:
>>>
>>>
>>> http://rboue.tiddlyspot.com/#%24%3A%2Fplugins%2Frboue%2FThree.js%2FLib%2FLoaders%2FSTLLoader.js
>>>
>>> On Tuesday, 10 August 2021 at 21:15:56 UTC+1 Alex Davies wrote:
>>>
 There there needs to be what, a display widget and and a parser?

 On Tuesday, August 10, 2021 at 1:57:39 PM UTC-3 Ste wrote:

> There is this :
> http://rboue.tiddlyspot.com/#Three.js%2Fintroduction 
>
> Which has, I think, the ability to display STL files. 
> It's been on my to do list to look at and have a go but... 
>
>
>
> On Tuesday, 10 August 2021 at 16:30:00 UTC+1 Alex Davies wrote:
>
>> I'd really like to be able to include STL files in my tiddlywiki, but 
>> actually supporting a new file type is a bit beyond me. It seems like it 
>> would be entirely doable using threejs, but a bit more challenging to 
>> make 
>> it happen "automatically" so that tiddlywiki doesn't try to show me 
>> several 
>> MB text files.
>>
>> Any thoughts on how that could be accomplished? Something to do with 
>> mime type detection?
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/eb8ab95c-9c73-48bb-8c7b-9c45cb37e8f4n%40googlegroups.com.


Re: [tw5] Re: tw editions and docker questions

2021-09-19 Thread Jean-Pierre Rivière
Thank you Xavier.

I'm closing this topic and will start another one on Talk about having 
localized server edition for the sake of it and not that of translating 
another edition.

Le dimanche 19 septembre 2021 à 14:40:17 UTC+2, xca...@immateriel.fr a 
écrit :

> Hi Jean-Pierre,
>
> Embarrassingly, I'm not sure I still grasp the whole thing anymore. The 
> confusing thing is that the fr-FR server edition is not meant as an fr-FR 
> localisation of the server edition (nor any xx-YY-server editions by the 
> way). As far as I know, they are mostly useful when one wants to edit the 
> source of their xx-XX edition counterpart *in-place* (typically in a 
> dedicated git branch). 
>
> With the help of 
> https://tiddlywiki.com/prerelease/#tiddlywiki.info%20Files, it must be 
> possible to combine these editions in order to create a NodeJS wiki that is 
> bootstrapped with the payload tiddlers contained in these editions, but I 
> didn't succeed to write down a straightforward description of the process. 
> Maybe @pmario has a better understanding of these mechanisms?
>
> -- Xavier.
>
>
> On Sat, Sep 18, 2021 at 10:23 PM Jean-Pierre Rivière <
> jn.pierr...@gmail.com> wrote:
>
>> I'm sorry Xavier, but I've been unable to create any edition to see what 
>> you suggest would do. I haven't understood how to do it. Could you help me 
>> please?
>>
>> cheers,
>>
>> Le mercredi 15 septembre 2021 à 15:20:35 UTC+2, xca...@immateriel.fr a 
>> écrit :
>>
>>> Hi Jean-Pierre,
>>>
>>> Historically, the fr-FR and fr-FR-server editions were aimed at 
>>> providing a translated version of tw5.com. I had wanted to gather a 
>>> team of translators in order to achieve this, but I eventually gave up as 
>>> the task seemed too daunting. I focused instead on the fr-FR language 
>>> plugin. 
>>>
>>> What you experience — tiddlers are saved in the fr-FR sub-directory 
>>> instead of the served wiki — is probably due to the 
>>> "default-tiddler-location": "../fr-FR/tiddlers" in the config of the 
>>> fr-FR-server edition. If you remove that before you --init a new wiki, you 
>>> will get a more natural behaviour. If you confirm that it solves the 
>>> problem, I'll propose a removal from the official edition.
>>>
>>> Cheers,
>>> -- Xavier Cazin.
>>>
>>> On Wed, Sep 15, 2021 at 12:43 PM Jean-Pierre Rivière <
>>> jn.pierr...@gmail.com> wrote:
>>>
 Hi @PMario and mauloop!

 I(ve taken my time but I can now bring some valuable new input. But 
 before that, let me thank you for your answers. I've dipped deeper in 
 docker and nodejs tiddlywiki as a result. And I can tell you that I've 
 finally come to a successful setup but some problems are still there. But 
 I 
 can create an OK docker image and use it to launch it a suceesfull 
 tiddlywiki and load stuff inside before really launching it as a server (I 
 have not yet seen how to use apache as a proxy).

 So for the sake of answering my question, here is my Dockerfile:
 -
 # Dockerfile pour lancer le tiddlywiki proteva
 # copiée et adaptée du modèle elasticdog/tiddlywiki disponible sur le 
 docker hub
 from node:16.9.0-alpine3.11

 LABEL author="Jean-Pierre RIVIÈRE"
 LABEL content="instance de nodejs avec le tiddliwki proteva"

 env TIDDLYWIKI_VERSION=5.1.23
 env PROTEVA_FEED=proteva-data.json
 env WORKDIR=/usr/share/tiddlywiki/proteva-wiki

 EXPOSE 8080

 WORKDIR $WORKDIR
 VOLUME $WORKDIR

 run apk update && apk add --no-cache tini
 run npm install -g tiddlywiki@$TIDDLYWIKI_VERSION && npm install clean 
 --force

 #ENTRYPOINT ["tiddlywiki", "proteva"]
 #CMD ["--listen", "host=0.0.0.0"]
 ENTRYPOINT ["/sbin/tini", "--"]
 CMD ["tiddlywiki", "proteva", "--listen", "host=0.0.0.0"]
 --

 and here is my proteva.sh script that I use to manage the wiki with 
 ./proteva.sh init  && ./proteva.sh start
 
 #!/bin/sh
 # shell pour initialiser ou lancer proteva via docker

 IMAGE=proteva
 WIKI=$IMAGE
 PROTEVA_FEED=proteva-data.json
 PROTEVA_DIR=$PWD/proteva-data
 WORKDIR=/usr/share/tiddlywiki/proteva-wiki
 EDITION=rerver

 case $1 in
   init)
 echo wiping $PROTEVA_DIR
 [ -d $PROTEVA_DIR ] && sudo rm -rf $PROTEVA_DIR
 mkdir $PROTEVA_DIR
 echo building $IMAGE docker image
 sudo docker build . -t $IMAGE
 echo built
 sudo docker run --rm -v $PROTEVA_DIR:$WORKDIR $IMAGE tiddlywiki 
 $WIKI --init $EDITION
 echo initialized
 cp $PROTEVA_FEED $PROTEVA_DIR
 sudo docker run --rm -v $PROTEVA_DIR:$WORKDIR $IMAGE tiddlywiki 
 $WIKI --load $PROTEVA_FEED
 rm $PROTEVA_DIR/$PROTEVA_FEED
 echo import done
 ;;
   start)
 [ -d $PROTEVA_DIR ] || mkdir $PROTEVA_DIR
 sudo docker run --rm -it -p 8080:8080 -v $PROTEVA_DIR:$WORKDIR 
 --name $WIKI $IMAGE 

[tw5] Re: 1. Parallel Tab 2. "find/replace"

2021-09-19 Thread JD
Wow, thank-you so much.  I've been trying to find it forever!

On Saturday, September 18, 2021 at 6:18:00 AM UTC-7 strikke...@gmail.com 
wrote:

> I think you are looking for the tiddlers $:/.giffmex/sidebar/parallel and 
> $:/.giffmex/sidebar/parallel2. I you have deleted those tiddlers you will 
> have to download TiddlyRoam and drag the tiddlers over to your own wiki.
> If you do not want to download - I think David Giffords TiddlyBlink has 
> the same tiddlers: 
> Parallel 
> 
>  
> and parallel2 
> 
> On Saturday, September 18, 2021 at 2:31:14 PM UTC+2 jd@gmail.com 
> wrote:
>
>> Hello Everyone,
>>
>> I'm a complete newbie with TiddlyWiki. I'm currently using TiddlyRoam 
>> version *5.1.22. *
>>
>> I have 2 questions:
>>
>>
>>1. I love the aspect of SideBar tabs but somehow, in the process of 
>>cleaning up my plug-ins I seemed to delete the  default "parallel" tab. 
>> Is 
>>there a way to retrieve it?
>>2. Is there a way to have a "find and replace" option/button/etc. 
>>within the tiddler itself?
>>
>>
>> Thanks for any advice,
>>
>> Joe
>>
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/f277ddc2-e683-4c69-b90b-5701fca898bfn%40googlegroups.com.


Re: [tw5] Re: tw editions and docker questions

2021-09-19 Thread Xavier Cazin
Hi Jean-Pierre,

Embarrassingly, I'm not sure I still grasp the whole thing anymore. The
confusing thing is that the fr-FR server edition is not meant as an fr-FR
localisation of the server edition (nor any xx-YY-server editions by the
way). As far as I know, they are mostly useful when one wants to edit the
source of their xx-XX edition counterpart *in-place* (typically in a
dedicated git branch).

With the help of https://tiddlywiki.com/prerelease/#tiddlywiki.info%20Files,
it must be possible to combine these editions in order to create a NodeJS
wiki that is bootstrapped with the payload tiddlers contained in these
editions, but I didn't succeed to write down a straightforward description
of the process. Maybe @pmario has a better understanding of these
mechanisms?

-- Xavier.


On Sat, Sep 18, 2021 at 10:23 PM Jean-Pierre Rivière <
jn.pierre.rivi...@gmail.com> wrote:

> I'm sorry Xavier, but I've been unable to create any edition to see what
> you suggest would do. I haven't understood how to do it. Could you help me
> please?
>
> cheers,
>
> Le mercredi 15 septembre 2021 à 15:20:35 UTC+2, xca...@immateriel.fr a
> écrit :
>
>> Hi Jean-Pierre,
>>
>> Historically, the fr-FR and fr-FR-server editions were aimed at providing
>> a translated version of tw5.com. I had wanted to gather a team of
>> translators in order to achieve this, but I eventually gave up as the task
>> seemed too daunting. I focused instead on the fr-FR language plugin.
>>
>> What you experience — tiddlers are saved in the fr-FR sub-directory
>> instead of the served wiki — is probably due to the
>> "default-tiddler-location": "../fr-FR/tiddlers" in the config of the
>> fr-FR-server edition. If you remove that before you --init a new wiki, you
>> will get a more natural behaviour. If you confirm that it solves the
>> problem, I'll propose a removal from the official edition.
>>
>> Cheers,
>> -- Xavier Cazin.
>>
>> On Wed, Sep 15, 2021 at 12:43 PM Jean-Pierre Rivière <
>> jn.pierr...@gmail.com> wrote:
>>
>>> Hi @PMario and mauloop!
>>>
>>> I(ve taken my time but I can now bring some valuable new input. But
>>> before that, let me thank you for your answers. I've dipped deeper in
>>> docker and nodejs tiddlywiki as a result. And I can tell you that I've
>>> finally come to a successful setup but some problems are still there. But I
>>> can create an OK docker image and use it to launch it a suceesfull
>>> tiddlywiki and load stuff inside before really launching it as a server (I
>>> have not yet seen how to use apache as a proxy).
>>>
>>> So for the sake of answering my question, here is my Dockerfile:
>>> -
>>> # Dockerfile pour lancer le tiddlywiki proteva
>>> # copiée et adaptée du modèle elasticdog/tiddlywiki disponible sur le
>>> docker hub
>>> from node:16.9.0-alpine3.11
>>>
>>> LABEL author="Jean-Pierre RIVIÈRE"
>>> LABEL content="instance de nodejs avec le tiddliwki proteva"
>>>
>>> env TIDDLYWIKI_VERSION=5.1.23
>>> env PROTEVA_FEED=proteva-data.json
>>> env WORKDIR=/usr/share/tiddlywiki/proteva-wiki
>>>
>>> EXPOSE 8080
>>>
>>> WORKDIR $WORKDIR
>>> VOLUME $WORKDIR
>>>
>>> run apk update && apk add --no-cache tini
>>> run npm install -g tiddlywiki@$TIDDLYWIKI_VERSION && npm install clean
>>> --force
>>>
>>> #ENTRYPOINT ["tiddlywiki", "proteva"]
>>> #CMD ["--listen", "host=0.0.0.0"]
>>> ENTRYPOINT ["/sbin/tini", "--"]
>>> CMD ["tiddlywiki", "proteva", "--listen", "host=0.0.0.0"]
>>> --
>>>
>>> and here is my proteva.sh script that I use to manage the wiki with
>>> ./proteva.sh init  && ./proteva.sh start
>>> 
>>> #!/bin/sh
>>> # shell pour initialiser ou lancer proteva via docker
>>>
>>> IMAGE=proteva
>>> WIKI=$IMAGE
>>> PROTEVA_FEED=proteva-data.json
>>> PROTEVA_DIR=$PWD/proteva-data
>>> WORKDIR=/usr/share/tiddlywiki/proteva-wiki
>>> EDITION=rerver
>>>
>>> case $1 in
>>>   init)
>>> echo wiping $PROTEVA_DIR
>>> [ -d $PROTEVA_DIR ] && sudo rm -rf $PROTEVA_DIR
>>> mkdir $PROTEVA_DIR
>>> echo building $IMAGE docker image
>>> sudo docker build . -t $IMAGE
>>> echo built
>>> sudo docker run --rm -v $PROTEVA_DIR:$WORKDIR $IMAGE tiddlywiki
>>> $WIKI --init $EDITION
>>> echo initialized
>>> cp $PROTEVA_FEED $PROTEVA_DIR
>>> sudo docker run --rm -v $PROTEVA_DIR:$WORKDIR $IMAGE tiddlywiki
>>> $WIKI --load $PROTEVA_FEED
>>> rm $PROTEVA_DIR/$PROTEVA_FEED
>>> echo import done
>>> ;;
>>>   start)
>>> [ -d $PROTEVA_DIR ] || mkdir $PROTEVA_DIR
>>> sudo docker run --rm -it -p 8080:8080 -v $PROTEVA_DIR:$WORKDIR
>>> --name $WIKI $IMAGE tiddlywiki $WIKI --listen host=0.0.0.0
>>> ;;
>>>   *) echo "usage : ${0##/} ORDER"
>>>  echo '  where ORDER is either "init" or "start"'
>>>  echo '  to initialize or launch proteva tiddlywiki nodejs via
>>> docker.'
>>>  ;;
>>> esac
>>> 
>>>
>>> Now for the remaining problem: the fr-FR-server edition seems at fault.
>>> If I use iti instead of server (as value of the EDITION variable in the
>>> script)' the 

[tw5] Re: What are editor options for TiddlyWiki syntax highlighting?

2021-09-19 Thread PMario
On Sunday, September 19, 2021 at 11:44:13 AM UTC+2 TiddlyTweeter wrote:

*You forgot to mention your own Custom Markup* that can do highlights easy 
> already and more :-)


... Hmmm, It's built for a different usecase. It can do highlights for the 
rendered output. ... The OP is for editor highlighting. 
 

> There is no serious brain science involved in editor markup. 
> It just needs a clever person like you to provide the way to engage a 
> parser to apply the HTML/CSS as needed in render.
>

As so often, the "devil is in the detail". It's relatively easy to 
performantly highlight 100 lines of code, but it's really hard to be fast, 
if you highlight 100.000 lines of code. .. Rightclick tiddlywiki.com and 
choose "Show Code" .. It's about 40.000 lines .. 

It's easy to highlight a full code structure. Eg 

If (a == b) {
  do this
else {
  do that
}

But what if the else { element is 300 lines away out of the screen and 
isn't even rendered or in memory, since we can't see it anyway. The 
highlighter still needs to show something that is valid. ... Because the 
source text can be long we only can render what fits on the screen, +- 100 
lines to satisfy page-up and page-down 

There is a reason why the codemirror base-plugin is 166kByte as a minified 
file. 

You are right, there is a lot of editor-overhead in the code, but that's 
mainly because of browser quirks, at the times where the library was 
created. 

I think we making a mountain out of a molehill. 
> *Your Custom Markup *is really good in solving this kind of issue easily.
>

Not as a syntax highlighter in edit mode.
 

> A think its *Generic Solutions*  much better long term already. It it 
> much better to have one logic than several.
>

That's right. But they have to be built for exactly that purpose. Sadly, 
for syntax highlighting there is no "1 size fits all" [1] approach. 

There is codemirror-6  which created it's own Lezer 
Parser  system as a generic solution, that 
creates language specific highlighter modules, based on a language  
specific grammars.  There _is_ a lot of science involved, if you want 
to create generic tools for syntax highlighting. 

have fun!
mario
PS [1] I did write this sentence and then looked up the Lezer Parser 
documentation  page :)

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/49c43f68-f338-4a0c-8972-250266db74a6n%40googlegroups.com.


[tw5] Re: What are editor options for TiddlyWiki syntax highlighting?

2021-09-19 Thread TiddlyTweeter
PMario

*You forgot to mention your own Custom Markup* that can do highlights easy 
already and more :-)

TBH we need to open up this more. 

There is no serious brain science involved in editor markup. 
It just needs a clever person like you to provide the way to engage a 
parser to apply the HTML/CSS as needed in render.

I think we making a mountain out of a molehill. 
*Your Custom Markup *is really good in solving this kind of issue easily.

A think its *Generic Solutions*  much better long term already. It it much 
better to have one logic than several.

Just saying,
TT

On Sunday, 19 September 2021 at 04:13:33 UTC+2 PMario wrote:

> On Sunday, September 19, 2021 at 3:05:52 AM UTC+2 cj.v...@gmail.com wrote:
> ...
>
>> Does anybody know of other editors that either have TiddlyWiki syntax 
>> highlighting built-in or allow custom language syntax highlighting?
>>
>  
> There is a plugin for VSCode, named: TiddlyWiki5 Syntax, which can be 
> installed as any other highlighter.
>
> As a TW plugin there is: 
> https://github.com/Gk0Wk/CodeMirror-Mode-TiddlyWiki5/blob/main/README_en.md 
> now. 
>
> -mario
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/5fbea51c-2006-4ee2-984b-51a563cf8852n%40googlegroups.com.