.. meta:: :description lang=en: Description and examples of some hidden features of Bitbucket :description lang=fr: Page décrivant des fonctionnalités peu connues de Bitbucket ############################################################### Examples of concrete use of some hidden features of Bitbucket ############################################################### .. include:: .javascript.en.rst --------------------------------------------------------------------- About this page --------------- This page demonstrates some hidden features of the awesome website `Bitbucket `_ (you know, the Australian concurrent of `GitHub `_, to which `I participated in his French translation `_ and that I enjoy very much). --------------------------------------------------------------------- Direct links ------------ Complete historic for a file ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ For example: for my script `bin/PDFCompress `_. To a specific line ^^^^^^^^^^^^^^^^^^ For example: for my file `.bashrc `_, directly to the line 441. Direct file ^^^^^^^^^^^ For example: for my script `bin/series.sh `_. Include a file with ``?t=embed`` -------------------------------- How does it work? ^^^^^^^^^^^^^^^^^ Pattern ~~~~~~~ `Bitbucket.org `_ allows to include a file (with syntax coloring) easily, with the following piece of ``HTML`` code: .. code-block:: html Example ~~~~~~~ You have to replace: #. ``NAME`` by your Bitbucket username (for me, it is `lbesson `_); #. ``REPOSITORY`` by the name of the repository (for instance, for me, `bin `_); #. ``PATH`` by the complete path to the file (for instance, `pdflatex `_ which is also `here bin/pdflatex localement `_). And so, in the example below, the ``HTML`` code embedded is: .. code-block:: html In reStructuredText ~~~~~~~~~~~~~~~~~~~ And finally, we can include this in a webpage generated with Sphinx thanks to the following piece of ``rST`` code: .. code-block:: rst .. raw:: html Examples ^^^^^^^^ bin/pdflatex ~~~~~~~~~~~~ .. raw:: html A rST file (the source code of this page!) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. raw:: html .. (c) Lilian Besson, 2011-2021, https://bitbucket.org/lbesson/web-sphinx/