# Structuring a notebook

**URL:** <https://swi-prolog.discourse.group/t/structuring-a-notebook/1032>\
**Category:** Help!\
**Tags:** swish\
**Created:** [August 3, 2019, 2:33pm UTC](https://swi-prolog.discourse.group/t/structuring-a-notebook/1032 "2019-08-03T14:33:57Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![CapelliC](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/capellic/32/17_2.png) [@CapelliC](https://swi-prolog.discourse.group/u/CapelliC)\
**Post date:** [August 3, 2019, 2:33pm UTC](https://swi-prolog.discourse.group/t/structuring-a-notebook/1032/1 "2019-08-03T14:33:57Z")

</div>

Currently I’m implementing a SWISH CytoscapeJS renderer, while writing the documentation, in form of notebooks, I realized I haven’t clear the relation among the notebook ‘fragments’, or components.  
In particular, is there a way to access predicates among programs cells ?  
While debugging the renderer, I had the impression each query get executed in different modules - maybe the pengine assigned one, but - of course - from these queries predicates defined in programs are visible.  
I’m fairly sure I’m missing something (very) basic…  
Now I’ll try to reproduce the issue (?) on [https://swish.swi-prolog.org/](https://swish.swi-prolog.org/) (of course, I’m developing on localhost). But the fact remains that I’d like to know more about the high level relations among SWISH components.

---

<div class="post-metadata">

**Author:** ![CapelliC](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/capellic/32/17_2.png) [@CapelliC](https://swi-prolog.discourse.group/u/CapelliC)\
**Post date:** [August 3, 2019, 3:44pm UTC](https://swi-prolog.discourse.group/t/structuring-a-notebook/1032/2 "2019-08-03T15:44:56Z")

</div>

Silly me, now I’ve found the button that enables predicate sharing…  
Sorry for the noise.

---

<div class="post-metadata">

**Author:** ![jan](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/jan/32/4_2.png) [@jan](https://swi-prolog.discourse.group/u/jan)\
**Post date:** [August 3, 2019, 4:09pm UTC](https://swi-prolog.discourse.group/t/structuring-a-notebook/1032/3 "2019-08-03T16:09:09Z")

</div>

Will you make this available? It looks cool!

---

<div class="post-metadata">

**Author:** ![CapelliC](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/capellic/32/17_2.png) [@CapelliC](https://swi-prolog.discourse.group/u/CapelliC)\
**Post date:** [August 3, 2019, 4:34pm UTC](https://swi-prolog.discourse.group/t/structuring-a-notebook/1032/4 "2019-08-03T16:34:18Z")

</div>

Yes, ASAP.

I’m thinking to prepare a pack that would handle the installation - so it would be ‘SWISH only’ pack - instead of issuing a PR on [https://github.com/SWI-Prolog/swish](https://github.com/SWI-Prolog/swish).

This because I would like to approach a WordPress like architecture, where plugins play an important role, and serve for developers as well end users.

(btw, I like SWISH, but have just started learning it… hope my next questions will be more interesting than this one)

---

<div class="post-metadata">

**Author:** ![jan](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/jan/32/4_2.png) [@jan](https://swi-prolog.discourse.group/u/jan)\
**Post date:** [August 3, 2019, 4:47pm UTC](https://swi-prolog.discourse.group/t/structuring-a-notebook/1032/5 "2019-08-03T16:47:20Z")

</div>

The current approach for SWISH is to maintain the whole stuff in one repo and have a file in config-available that enables functionality and can be linked from/copied to config-enabled. I think renderers like this are fine to have in the core, but of course in the end it is up to you 🙂
