Difference between revisions of "Git include"

From PyMOLWiki
Jump to navigation Jump to search
Line 5: Line 5:
 
The include module has been restricted to only accept pages from:
 
The include module has been restricted to only accept pages from:
 
  <nowiki> https://raw.github.com/Pymol-Scripts/Pymol-script-repo/master/* </nowiki>
 
  <nowiki> https://raw.github.com/Pymol-Scripts/Pymol-script-repo/master/* </nowiki>
 +
 +
The wiki page will not automatically get changes to the code, if the code is update at the Github. This is because, that the
 +
code gets [http://en.wikipedia.org/wiki/Wikipedia:Bypass_your_cache#Server_cache cached at the server].
 +
 +
Therefore, you also need to make a [http://en.wikipedia.org/wiki/Wikipedia:Purge Purge button], so that the wiki will fetch new code.
 +
<nowiki>[http://www.pymolwiki.org/index.php?title=Git_include?action=purge Press here to refresh script from Github.]</nowiki>
 +
 +
== Python Code ==
 +
This code has been put under version control. In the project, [http://www.pymolwiki.org/index.php/Git_intro Pymol-script-repo].
 +
 +
For a color coded view:
 +
https://github.com/Pymol-Scripts/Pymol-script-repo/blob/master/colorbydisplacement.py
 +
See the raw code or download manually, by right clicking the following link here -> Save as: colorbydisplacement.py
 +
https://raw.github.com/Pymol-Scripts/Pymol-script-repo/master/colorbydisplacement.py
 +
 +
[http://www.pymolwiki.org/index.php?title=Git_include?action=purge Press here to refresh script from Github.]

Revision as of 06:33, 3 December 2011

Use of module include

You write in wiki like this

 <include src="https://raw.github.com/Pymol-Scripts/Pymol-script-repo/master/README" highlight="python" /> 

The include module has been restricted to only accept pages from:

 https://raw.github.com/Pymol-Scripts/Pymol-script-repo/master/* 

The wiki page will not automatically get changes to the code, if the code is update at the Github. This is because, that the code gets cached at the server.

Therefore, you also need to make a Purge button, so that the wiki will fetch new code.

[http://www.pymolwiki.org/index.php?title=Git_include?action=purge Press here to refresh script from Github.]

Python Code

This code has been put under version control. In the project, Pymol-script-repo.

For a color coded view:

https://github.com/Pymol-Scripts/Pymol-script-repo/blob/master/colorbydisplacement.py

See the raw code or download manually, by right clicking the following link here -> Save as: colorbydisplacement.py

https://raw.github.com/Pymol-Scripts/Pymol-script-repo/master/colorbydisplacement.py

Press here to refresh script from Github.