[ 
https://issues.apache.org/jira/browse/SPARK-27557?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Hyukjin Kwon updated SPARK-27557:
---------------------------------
    Description: 
Add a non-intrusive button for python API documentation, which will remove 
">>>" prompts and outputs of code - for easier copying of code.

For example: The below code-snippet in the document is difficult to copy due to 
">>>" prompts

{code}
>>> l = [('Alice', 1)]
>>> spark.createDataFrame(l).collect()
[Row(_1='Alice', _2=1)]
{code}

Becomes this - After the copybutton in the corner of of code-block is pressed - 
which is easier to copy 

{code}
l = [('Alice', 1)]
spark.createDataFrame(l).collect()
{code}

Sample Screenshot for reference: 
[https://screenshots.firefox.com/ZfBXZrpINKdt9QZg/www269.lunapic.com]

This can be easily done only by adding a copybutton.js script in 
python/docs/_static folder and calling it at setup time from 
python/docs/conf.py.

  was:
Add a non-intrusive button for python API documentation, which will remove 
">>>" prompts and outputs of code - for easier copying of code.

 For example: The below code-snippet in the document is difficult to copy due 
to ">>>" prompts

   >>> l = [('Alice', 1)]

   >>> spark.createDataFrame(l).collect()

    [Row(_1='Alice', _2=1)]


Becomes this - After the copybutton in the corner of of code-block is pressed - 
which is easier to copy 


l = [('Alice', 1)]

spark.createDataFrame(l).collect()

Sample Screenshot for reference: 
[https://screenshots.firefox.com/ZfBXZrpINKdt9QZg/www269.lunapic.com]

 

This can be easily done only by adding a copybutton.js script in 
python/docs/_static folder and calling it at setup time from 
python/docs/conf.py.


> Add copybutton to spark Python API docs for easier copying of code-blocks
> -------------------------------------------------------------------------
>
>                 Key: SPARK-27557
>                 URL: https://issues.apache.org/jira/browse/SPARK-27557
>             Project: Spark
>          Issue Type: Documentation
>          Components: Documentation, PySpark
>    Affects Versions: 2.4.2
>            Reporter: Sangram G
>            Priority: Minor
>              Labels: Documentation, PySpark
>   Original Estimate: 0.5h
>  Remaining Estimate: 0.5h
>
> Add a non-intrusive button for python API documentation, which will remove 
> ">>>" prompts and outputs of code - for easier copying of code.
> For example: The below code-snippet in the document is difficult to copy due 
> to ">>>" prompts
> {code}
> >>> l = [('Alice', 1)]
> >>> spark.createDataFrame(l).collect()
> [Row(_1='Alice', _2=1)]
> {code}
> Becomes this - After the copybutton in the corner of of code-block is pressed 
> - which is easier to copy 
> {code}
> l = [('Alice', 1)]
> spark.createDataFrame(l).collect()
> {code}
> Sample Screenshot for reference: 
> [https://screenshots.firefox.com/ZfBXZrpINKdt9QZg/www269.lunapic.com]
> This can be easily done only by adding a copybutton.js script in 
> python/docs/_static folder and calling it at setup time from 
> python/docs/conf.py.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to