Where to put new Examples in Snap

Hello,

In Snap you can load 2 Examples in menu open Examples :
poppy-demo-project.xml
pypot-snap-blocks.xml

Where can I put on the Raspberry-pi my examples to see them in the Open->Project->Examples

Thanks

PS : I have seen a lot of examples in /home/poppy/dev/puppet-master/snap/Examples/ how can I load them in Snap! ?

I don’t use the standart raspoppy but I guess (@Theo to confirm) :
Find the snap directory and …/snap/examples
You should put your .xml and add a line in the EXAMPLES files.

The management of Snap projects file need a lot of improvments (help is welcome)…

Basically, you have to copy them (or with a symlink) in the /home/poppy/dev/puppet-master/snap/Examples/ folder, and add there name in /home/poppy/dev/puppet-master/snap/Examples/EXAMPLES file. If you want to add again standard Snap project examples, you just have to add them in the EXAMPLE file.

If you are interrested of how Snap Example folder is managed, you can look at in install_snap() function in raspoppy.

Does not work after a reboot:

$ pwd
/home/poppy/dev/puppet-master/snap/Examples
$ cat EXAMPLES 
poppy-demo-project.xml	poppy-demo-project.xml
pypot-snap-blocks.xml	pypot-snap-blocks.xml
Activite_1-Poppy_demonstration.xml Activite_1-Poppy_demonstration.xml

Activite_1-Popp_demonstration.xml does not appear in Snap! -> Open > Examples, only the two first.

Cache could be the problem (browser cache, I guess). Try to clean all the cache you can.

Some tricks here : http://stackoverflow.com/questions/8392441/stop-chrome-caching-my-js-files

Now I can put examples files in /home/poppy/dev/puppet-master/snap/Examples/ and load programmatically with selenium, great !

1 Like