Hi Greg,
Initially I tried exporting the map to a JSON file, one edge of which was
> styled as desired with a simple colour change. I added the color element
> to some more of the edges in the JSON and imported them back in. However,
> while TW would see the file as an import file it would never indicate there
> were any tiddlers to import and indeed never imported anything. After a bit
> of fiddling I moved on. It might be nice to know why this didn't work.
>
This json is only "export" only, this doesn't work as import. I agree this
is a bit confusing...
>
> {
> "edges": [
> {
> "id": "9ed087ce-abff-48df-a043-18afab924a18",
> "from": "51b38c02-0bf1-4de0-b391-1cc0dfe96476",
> "to": "c04185d7-ea68-4ca1-8125-98cdbf5e9187",
> "type": "flow clear: POS_BLTYESBP",
> "label": " POS_BLTYESBP",
> "color": {
> "color": "rgba(209,19,26,1)"
> }
> },
> {
> "id": "7f7c655d-8408-42c4-a0cb-d296dbfd3a18",
> "from": "d1a1826b-bd43-4b99-9055-f75f2b5e028f",
> "to": "2bdf023d-580b-4201-96f6-c81ecdc51a7d",
> "type": "flow clear: APIGW_LDMS",
> "label": " APIGW_LDMS"
>
>
>
> Aside from the lengthy names that start with a dollar sign (why? - I'm
> certain there is a good reason but you have to escape the dollar sign at
> times), the edge tiddlers themselves are obviously quite simple as seen
> below.
>
The dollar sign marks the tiddler as "system tiddler".
>
> created: 20161230124851953
> description: Clear [[POS Services|POS_BLTYESBP]]
> modified: 20161231214952583
> style: {"color":{"color":"rgba(255,0,0,1)"}}
> title: $:/plugins/felixhayashi/tiddlymap/graph/edgeTypes/flow clear:
> POS_BLTYESBP
> type: text/vnd.tiddlywiki
>
> With some concern over ordering (the file with style added through TW had
> the color statement in the middle of the file), I used sed to append
> different color statements to the last line of the file based on the file
> name that included my name space of flow_clear or flow_token.
>
however, make sure you are not breaking the json format using sed ;)
> I'd love to figure out how to script this from within TW, but working with
> some more familiar tools (even though it's probably been almost 10 years
> since I've actively used Linux) got the job done for now.
>
within tw and your browser, your js-console is your only option. Maybe I
find the time to post a js console command that iterates over all edges
with a given name and adds a certain property (e.g. color) to it...
Best wishes
Felix
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/36627a4f-e94b-406a-b894-7596a2b293e1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.