Skip to content
This repository has been archived by the owner on Nov 11, 2024. It is now read-only.

Adding "hide prompt and output" feature for docs codeblocks #13

Merged
merged 3 commits into from
Jun 3, 2014

Conversation

bsipocz
Copy link
Member

@bsipocz bsipocz commented May 21, 2014

No description provided.

@astrofrog
Copy link
Member

@bsipocz - would it be possible to show an example build for this so that other people can decide whether to go ahead with this? Also, could you add the relevant license to the licenses directory?

@bsipocz
Copy link
Member Author

bsipocz commented May 21, 2014

Arrow button in the upper right corner of the code blocks e.g.: http://apm3.ast.cam.ac.uk/~bsipocz/astropy/docs_hide_prompt_and_output/html/coordinates/index.html

The license is a good question, I'll try to figure out where it is coming from originally (I copied it from Python's sphinxext).

@astrofrog
Copy link
Member

@bsipocz - thanks! Just for info, you don't need to put the URL in double ticks. Just put it normally and it will be clickable.

@astrofrog
Copy link
Member

@bsipocz - very cool!

@bsipocz
Copy link
Member Author

bsipocz commented May 21, 2014

@astrofrog - It looks like it's indeed coming from Python (but I'm not 100% sure). So should I copy the PSF license over, or how does that work?
Also, should I put it in LICENSE.rst in the astropy-helpers, or in the licenses directory in astropy?

@bsipocz
Copy link
Member Author

bsipocz commented May 21, 2014

Well, this is the closest I've found: https://answers.launchpad.net/ubuntu/trusty/+source/python-numpy/+copyright

@astrofrog
Copy link
Member

@bsipocz - that seems to be the right one. The license should go in astropy-helpers, in licenses, as e.g. LICENSE_COPYBUTTON.rst

@astrofrog
Copy link
Member

@bsipocz - yes, I would copy the license for copybutton.js from that numpy license page.

@bsipocz
Copy link
Member Author

bsipocz commented May 21, 2014

@astrofrog - Added

@astrofrog
Copy link
Member

@bsipocz - thanks! The next step is to email astropy-dev to suggest this change, point to this pull request, and point to the example page, and ask if anyone has any objections to including this. You can always point out (to be explicit) that this is very handy for copy/pasting examples.

@cdeil
Copy link
Member

cdeil commented May 21, 2014

👍

@@ -6,6 +6,10 @@
{# Add the google webfonts needed for the logo #}
{% block extrahead %}
<link href='https://fonts.googleapis.com/css?family=Source+Sans+Pro:200,600' rel='stylesheet' type='text/css'>
{% if not embedded %}<script type="text/javascript" src="{{
pathto('_static/copybutton.js',
1) }}"></script>{% endif %}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is one of those cases where strict adherence to a line wrap boundary makes no sense :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😄

@cdeil
Copy link
Member

cdeil commented Jun 1, 2014

See astropy-dev mailing list thread here.

@embray
Copy link
Member

embray commented Jun 2, 2014

Looks good to me :shipit:

@astrofrog
Copy link
Member

No objections have been raised, and this is a cool feature, so I'm going to go ahead and merge! (it will be great to have this for 0.4)

astrofrog added a commit that referenced this pull request Jun 3, 2014
Adding "hide prompt and output" feature for docs codeblocks
@astrofrog astrofrog merged commit dc4d2af into astropy:master Jun 3, 2014
@astrofrog astrofrog modified the milestone: 0.4.0 Jun 2, 2016
astrofrog added a commit to astropy/astropy-sphinx-theme that referenced this pull request Jan 20, 2018
…prompt_and_output

Adding "hide prompt and output" feature for docs codeblocks
astrofrog added a commit to astropy/astropy-sphinx-theme that referenced this pull request Jan 24, 2018
…prompt_and_output

Adding "hide prompt and output" feature for docs codeblocks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants