From e5242d68b4ced02cdfb1f62f78815d8a8f69bcf0 Mon Sep 17 00:00:00 2001 From: Stefan Tatschner Date: Fri, 29 May 2015 10:36:31 +0200 Subject: [PATCH] Change .. code:: to .. code-block:: Sphinx uses .. code-block:: directives to enable highlighting: http://sphinx-doc.org/markup/code.html#directive-code-block Use for i in *.rst; do sed -i 's/code::/code-block::/g' $i done to update these strings to enable proper highlighting. Note: A have disabled the windows "bash" one, because the highlighting is broken anyway... --- dev/building.rst | 4 ++-- dev/release.rst | 2 +- events/configsaved.rst | 2 +- events/deviceconnected.rst | 2 +- events/devicedisconnected.rst | 2 +- events/devicediscovered.rst | 2 +- events/devicerejected.rst | 2 +- events/downloadprogress.rst | 2 +- events/foldercompletion.rst | 2 +- events/folderrejected.rst | 2 +- events/foldersummary.rst | 2 +- events/itemfinished.rst | 4 ++-- events/itemstarted.rst | 2 +- events/localindexupdated.rst | 2 +- events/ping.rst | 2 +- events/remoteindexupdated.rst | 2 +- events/starting.rst | 2 +- events/startupcomplete.rst | 2 +- events/statechanged.rst | 2 +- rest/db-browse-get.rst | 2 +- rest/db-completion-get.rst | 2 +- rest/db-file-get.rst | 2 +- rest/db-ignores-get.rst | 2 +- rest/db-need-get.rst | 2 +- rest/db-prio-post.rst | 2 +- rest/db-scan-post.rst | 2 +- rest/db-status-get.rst | 2 +- rest/stats-device-get.rst | 2 +- rest/stats-folder-get.rst | 2 +- rest/svc-deviceid-get.rst | 2 +- rest/svc-lang-get.rst | 2 +- rest/svc-report-get.rst | 2 +- rest/system-config-get.rst | 2 +- rest/system-config-insync-get.rst | 2 +- rest/system-connections-get.rst | 2 +- rest/system-discovery-get.rst | 2 +- rest/system-discovery-hint-post.rst | 2 +- rest/system-error-get.rst | 2 +- rest/system-ping-get.rst | 2 +- rest/system-status-get.rst | 2 +- rest/system-upgrade-get.rst | 2 +- rest/system-version-get.rst | 2 +- users/config.rst | 2 +- users/faq.rst | 6 +++--- 44 files changed, 48 insertions(+), 48 deletions(-) diff --git a/dev/building.rst b/dev/building.rst index 8af8e0744..36ab4b043 100644 --- a/dev/building.rst +++ b/dev/building.rst @@ -41,7 +41,7 @@ Building (Unix) - Install the prerequisites. - Open a terminal. -.. code:: bash +.. code-block:: bash # This should output "go version go1.3" or higher. $ go version @@ -69,7 +69,7 @@ Building (Windows) - Install the prerequisites. - Open a ``cmd`` Window. -.. code:: bash +:: # This should output "go version go1.3" or higher. > go version diff --git a/dev/release.rst b/dev/release.rst index c48257bb6..f0b6aadc9 100644 --- a/dev/release.rst +++ b/dev/release.rst @@ -29,7 +29,7 @@ happening that should be fixed - requires investigation). Create a new, signed tag on master, with the version as comment, and push it: -.. code:: bash +.. code-block:: bash $ git tag -a -s -u release@syncthing.net -m v0.10.15 v0.10.15 $ git push --tags diff --git a/events/configsaved.rst b/events/configsaved.rst index 3d1ac8e3a..69be3d8eb 100644 --- a/events/configsaved.rst +++ b/events/configsaved.rst @@ -4,7 +4,7 @@ ConfigSaved Emitted after the config has been saved by the user or by Syncthing itself. -.. code:: json +.. code-block:: json { "id": 50, diff --git a/events/deviceconnected.rst b/events/deviceconnected.rst index 6471f3ef1..c75235a87 100644 --- a/events/deviceconnected.rst +++ b/events/deviceconnected.rst @@ -3,7 +3,7 @@ DeviceConnected Generated each time a connection to a device has been established. -.. code:: json +.. code-block:: json { "id": 2, diff --git a/events/devicedisconnected.rst b/events/devicedisconnected.rst index 6dc653da9..fe55386ba 100644 --- a/events/devicedisconnected.rst +++ b/events/devicedisconnected.rst @@ -3,7 +3,7 @@ DeviceDisconnected Generated each time a connection to a device has been terminated. -.. code:: json +.. code-block:: json { "id": 48, diff --git a/events/devicediscovered.rst b/events/devicediscovered.rst index 89430aa47..e72f79616 100644 --- a/events/devicediscovered.rst +++ b/events/devicediscovered.rst @@ -3,7 +3,7 @@ DeviceDiscovered Emitted when a new device is discovered using local discovery. -.. code:: json +.. code-block:: json { "id": 13, diff --git a/events/devicerejected.rst b/events/devicerejected.rst index 3c1621c97..e39c7fa9d 100644 --- a/events/devicerejected.rst +++ b/events/devicerejected.rst @@ -4,7 +4,7 @@ DeviceRejected Emitted when there is a connection from a device we are not configured to talk to. -.. code:: json +.. code-block:: json { "id": 24, diff --git a/events/downloadprogress.rst b/events/downloadprogress.rst index 3afbb1af1..801873f4f 100644 --- a/events/downloadprogress.rst +++ b/events/downloadprogress.rst @@ -5,7 +5,7 @@ Emitted during file downloads for each folder for each file. By default only a single file in a folder is handled at the same time, but custom configuration can cause multiple files to be shown. -.. code:: json +.. code-block:: json { "id": 221, diff --git a/events/foldercompletion.rst b/events/foldercompletion.rst index 2a2992a8c..39f283228 100644 --- a/events/foldercompletion.rst +++ b/events/foldercompletion.rst @@ -6,7 +6,7 @@ contents for a folder changes. It contains the completion percentage for a given remote device and is emitted once per currently connected remote device. -.. code:: json +.. code-block:: json { "id": 84, diff --git a/events/folderrejected.rst b/events/folderrejected.rst index 6b538cec3..6a7ed5dfc 100644 --- a/events/folderrejected.rst +++ b/events/folderrejected.rst @@ -4,7 +4,7 @@ FolderRejected Emitted when a device sends index information for a folder we do not have, or have but do not share with the device in question. -.. code:: json +.. code-block:: json { "id": 27, diff --git a/events/foldersummary.rst b/events/foldersummary.rst index f6e2d563c..461107258 100644 --- a/events/foldersummary.rst +++ b/events/foldersummary.rst @@ -5,7 +5,7 @@ The FolderSummary event is emitted when folder contents have changed locally. This can be used to calculate the current local completion state. -.. code:: json +.. code-block:: json { "id": 16, diff --git a/events/itemfinished.rst b/events/itemfinished.rst index 68750a80c..dd9249c2a 100644 --- a/events/itemfinished.rst +++ b/events/itemfinished.rst @@ -4,7 +4,7 @@ ItemFinished Generated when Syncthing ends synchronizing a file to a newer version. A successful operation: -.. code:: json +.. code-block:: json { "id": 93, @@ -21,7 +21,7 @@ successful operation: An unsuccessful operation: -.. code:: json +.. code-block:: json { "id": 44, diff --git a/events/itemstarted.rst b/events/itemstarted.rst index 253591790..173eb7ca6 100644 --- a/events/itemstarted.rst +++ b/events/itemstarted.rst @@ -3,7 +3,7 @@ ItemStarted Generated when Syncthing begins synchronizing a file to a newer version. -.. code:: json +.. code-block:: json { "id": 93, diff --git a/events/localindexupdated.rst b/events/localindexupdated.rst index 880a89da0..961386926 100644 --- a/events/localindexupdated.rst +++ b/events/localindexupdated.rst @@ -5,7 +5,7 @@ Generated when the local index information has changed, due to synchronizing one or more items from the cluster or discovering local changes during a scan. -.. code:: json +.. code-block:: json { "id": 59, diff --git a/events/ping.rst b/events/ping.rst index bffd054e2..14e0cbfa7 100644 --- a/events/ping.rst +++ b/events/ping.rst @@ -5,7 +5,7 @@ The Ping event is generated automatically every 60 seconds. This means that even in the absence of any other activity, the event polling HTTP request will return within a minute. -.. code:: json +.. code-block:: json { "id": 46, diff --git a/events/remoteindexupdated.rst b/events/remoteindexupdated.rst index a100659a3..cd8a78828 100644 --- a/events/remoteindexupdated.rst +++ b/events/remoteindexupdated.rst @@ -3,7 +3,7 @@ RemoteIndexUpdated Generated each time new index information is received from a device. -.. code:: json +.. code-block:: json { "id": 44, diff --git a/events/starting.rst b/events/starting.rst index 4313b5157..7244c93a6 100644 --- a/events/starting.rst +++ b/events/starting.rst @@ -4,7 +4,7 @@ Starting Emitted exactly once, when Syncthing starts, before parsing configuration etc. -.. code:: json +.. code-block:: json { "id": 1, diff --git a/events/startupcomplete.rst b/events/startupcomplete.rst index 030c37ced..8890ed298 100644 --- a/events/startupcomplete.rst +++ b/events/startupcomplete.rst @@ -4,7 +4,7 @@ StartupCompleted Emitted exactly once, when initialization is complete and Syncthing is ready to start exchanging data with other devices. -.. code:: json +.. code-block:: json { "id": 1, diff --git a/events/statechanged.rst b/events/statechanged.rst index d52961a3c..7c19ea100 100644 --- a/events/statechanged.rst +++ b/events/statechanged.rst @@ -7,7 +7,7 @@ the number of seconds the folder spent in state ``from``. In the example below, the folder ``default`` was in state ``scanning`` for 0.198 seconds and is now in state ``idle``. -.. code:: json +.. code-block:: json { "id": 8, diff --git a/rest/db-browse-get.rst b/rest/db-browse-get.rst index 3b010d7c4..e84c8f501 100644 --- a/rest/db-browse-get.rst +++ b/rest/db-browse-get.rst @@ -12,7 +12,7 @@ tree we want to dwell down (0 based, defaults to unlimited depth) Optional parameter ``prefix`` defines a prefix within the tree where to start building the structure. -.. code:: bash +.. code-block:: bash $ curl -s http://localhost:8384/rest/db/browse?folder=default | json_pp { diff --git a/rest/db-completion-get.rst b/rest/db-completion-get.rst index 90a527c4d..b8115a2f3 100644 --- a/rest/db-completion-get.rst +++ b/rest/db-completion-get.rst @@ -4,7 +4,7 @@ GET /rest/db/completion Returns the completion percentage (0 to 100) for a given device and folder.Takes ``device`` and ``folder`` parameters. -.. code:: json +.. code-block:: json { "completion": 0 diff --git a/rest/db-file-get.rst b/rest/db-file-get.rst index 0e741fec6..38a0cc637 100644 --- a/rest/db-file-get.rst +++ b/rest/db-file-get.rst @@ -4,7 +4,7 @@ GET /rest/db/file Returns most data available about a given file, including version and availability. -.. code:: json +.. code-block:: json { "availability": [ diff --git a/rest/db-ignores-get.rst b/rest/db-ignores-get.rst index 55a5513c2..a6508a28b 100644 --- a/rest/db-ignores-get.rst +++ b/rest/db-ignores-get.rst @@ -7,7 +7,7 @@ provides a compiled version of all included ignore patterns in the form of regular expressions. Excluded items in the ``patterns`` field have a nonstandard ``(?exclude)`` marker in front of the regular expression. -.. code:: json +.. code-block:: json { "ignore": [ diff --git a/rest/db-need-get.rst b/rest/db-need-get.rst index cff154001..d6e49e2eb 100644 --- a/rest/db-need-get.rst +++ b/rest/db-need-get.rst @@ -4,7 +4,7 @@ GET /rest/db/need Takes one parameter, ``folder``, and returns lists of files which are needed by this device in order for it to become in sync. -.. code:: bash +.. code-block:: bash { # Files currently being downloaded diff --git a/rest/db-prio-post.rst b/rest/db-prio-post.rst index 415acade7..e8e2adf27 100644 --- a/rest/db-prio-post.rst +++ b/rest/db-prio-post.rst @@ -3,7 +3,7 @@ POST /rest/db/prio Moves the file to the top of the download queue. -.. code:: bash +.. code-block:: bash curl -X POST http://127.0.0.1:8384/rest/db/prio?folder=default&file=foo/bar diff --git a/rest/db-scan-post.rst b/rest/db-scan-post.rst index 7260a3b8d..f66f19b4f 100644 --- a/rest/db-scan-post.rst +++ b/rest/db-scan-post.rst @@ -16,6 +16,6 @@ question. Returns status 200 and no content upon success, or status 500 and a plain text error if an error occurred during scanning. -.. code:: bash +.. code-block:: bash curl -X POST http://127.0.0.1:8384/rest/db/scan?folder=default&sub=foo/bar diff --git a/rest/db-status-get.rst b/rest/db-status-get.rst index cbe18e2c0..498c36e39 100644 --- a/rest/db-status-get.rst +++ b/rest/db-status-get.rst @@ -5,7 +5,7 @@ Returns information about the current status of a folder. Parameters: ``folder``, the ID of a folder. -.. code:: bash +.. code-block:: bash { # latest version according to cluster: diff --git a/rest/stats-device-get.rst b/rest/stats-device-get.rst index ac4c9103d..657eccf06 100644 --- a/rest/stats-device-get.rst +++ b/rest/stats-device-get.rst @@ -4,7 +4,7 @@ GET /rest/stats/device Returns general statistics about devices. Currently, only contains the time the device was last seen. -.. code:: bash +.. code-block:: bash $ curl -s http://localhost:8384/rest/stats/device | json { diff --git a/rest/stats-folder-get.rst b/rest/stats-folder-get.rst index 3f13d1d9a..4aad42e0a 100644 --- a/rest/stats-folder-get.rst +++ b/rest/stats-folder-get.rst @@ -4,7 +4,7 @@ GET /rest/stats/folder Returns general statistics about folders. Currently, only contains the last synced file. -.. code:: bash +.. code-block:: bash $ curl -s http://localhost:8384/rest/stats/folder | json { diff --git a/rest/svc-deviceid-get.rst b/rest/svc-deviceid-get.rst index 3f09a6600..c169c94cd 100644 --- a/rest/svc-deviceid-get.rst +++ b/rest/svc-deviceid-get.rst @@ -6,7 +6,7 @@ Verifies and formats a device ID. Accepts all currently valid formats with trivial substitutions). Takes one parameter, ``id``, and returns either a valid device ID in modern format, or an error. -.. code:: bash +.. code-block:: bash $ curl -s http://localhost:8384/rest/svc/deviceid?id=1234 | json { diff --git a/rest/svc-lang-get.rst b/rest/svc-lang-get.rst index 815d3d697..0ec86932c 100644 --- a/rest/svc-lang-get.rst +++ b/rest/svc-lang-get.rst @@ -4,6 +4,6 @@ GET /rest/svc/lang Returns a list of canonicalized localization codes, as picked up from the ``Accept-Language`` header sent by the browser. -.. code:: json +.. code-block:: json ["sv_sv","sv","en_us","en"] diff --git a/rest/svc-report-get.rst b/rest/svc-report-get.rst index 7f3a1c977..0459c8938 100644 --- a/rest/svc-report-get.rst +++ b/rest/svc-report-get.rst @@ -3,7 +3,7 @@ GET /rest/svc/report Returns the data sent in the anonymous usage report. -.. code:: json +.. code-block:: json { "folderMaxFiles": 42106, diff --git a/rest/system-config-get.rst b/rest/system-config-get.rst index c79af7bda..f21caf7a5 100644 --- a/rest/system-config-get.rst +++ b/rest/system-config-get.rst @@ -3,7 +3,7 @@ GET /rest/system/config Returns the current configuration. -.. code:: bash +.. code-block:: bash { # etc diff --git a/rest/system-config-insync-get.rst b/rest/system-config-insync-get.rst index 532981f01..632a25ca0 100644 --- a/rest/system-config-insync-get.rst +++ b/rest/system-config-insync-get.rst @@ -4,7 +4,7 @@ GET /rest/system/config/insync Returns whether the config is in sync, i.e. whether the running configuration is the same as that on disk. -.. code:: json +.. code-block:: json { "configInSync": true diff --git a/rest/system-connections-get.rst b/rest/system-connections-get.rst index b75c94e4a..d0164d2fa 100644 --- a/rest/system-connections-get.rst +++ b/rest/system-connections-get.rst @@ -4,7 +4,7 @@ GET /rest/system/connections Returns the list of current connections and some metadata associated with the connection/peer. -.. code:: json +.. code-block:: json { "connections": { diff --git a/rest/system-discovery-get.rst b/rest/system-discovery-get.rst index 1b8e9216f..8b3a027d4 100644 --- a/rest/system-discovery-get.rst +++ b/rest/system-discovery-get.rst @@ -3,7 +3,7 @@ GET /rest/system/discovery Returns the contents of the local discovery cache. -.. code:: json +.. code-block:: json { "LGFPDIT7SKNNJVJZA4FC7QNCRKCE753K72BW5QD2FOZ7FRFEP57Q": [ diff --git a/rest/system-discovery-hint-post.rst b/rest/system-discovery-hint-post.rst index e95ceee64..ecc19c380 100644 --- a/rest/system-discovery-hint-post.rst +++ b/rest/system-discovery-hint-post.rst @@ -4,7 +4,7 @@ POST /rest/system/discovery/hint Post with the query parameters ``device`` and ``addr`` to add entries to the discovery cache. -.. code:: bash +.. code-block:: bash curl -X POST http://127.0.0.1:8384/rest/system/discovery/hint?device=LGFPDIT7SKNNJVJZA4FC7QNCRKCE753K72BW5QD2FOZ7FRFEP57Q\&addr=192.162.129.11:22000 # Or with the X-API-Key header: diff --git a/rest/system-error-get.rst b/rest/system-error-get.rst index ca377dea1..a3bcf6cbc 100644 --- a/rest/system-error-get.rst +++ b/rest/system-error-get.rst @@ -3,7 +3,7 @@ GET /rest/system/error Returns the list of recent errors. -.. code:: json +.. code-block:: json { "errors": [ diff --git a/rest/system-ping-get.rst b/rest/system-ping-get.rst index e56176df8..319af5f6c 100644 --- a/rest/system-ping-get.rst +++ b/rest/system-ping-get.rst @@ -3,7 +3,7 @@ GET /rest/system/ping Returns a ``{"ping": "pong"}`` object. -.. code:: json +.. code-block:: json { "ping": "pong" diff --git a/rest/system-status-get.rst b/rest/system-status-get.rst index fb114a469..ee80a57d1 100644 --- a/rest/system-status-get.rst +++ b/rest/system-status-get.rst @@ -3,7 +3,7 @@ GET /rest/system/status Returns information about current system status and resource usage. -.. code:: json +.. code-block:: json { "alloc": 30618136, diff --git a/rest/system-upgrade-get.rst b/rest/system-upgrade-get.rst index 8a4af46f4..03f5feefd 100644 --- a/rest/system-upgrade-get.rst +++ b/rest/system-upgrade-get.rst @@ -4,7 +4,7 @@ GET /rest/system/upgrade Checks for a possible upgrade and returns an object describing the newest version and upgrade possibility. -.. code:: json +.. code-block:: json { "latest": "v0.10.27", diff --git a/rest/system-version-get.rst b/rest/system-version-get.rst index 93782530b..c017361b2 100644 --- a/rest/system-version-get.rst +++ b/rest/system-version-get.rst @@ -3,7 +3,7 @@ GET /rest/system/version Returns the current Syncthing version information. -.. code:: json +.. code-block:: json { "arch": "amd64", diff --git a/users/config.rst b/users/config.rst index 588759926..4a1433612 100644 --- a/users/config.rst +++ b/users/config.rst @@ -31,7 +31,7 @@ Config File Format The following is an example default configuration file: -.. code:: xml +.. code-block:: xml diff --git a/users/faq.rst b/users/faq.rst index 1fa2696fe..4baaaea54 100644 --- a/users/faq.rst +++ b/users/faq.rst @@ -193,14 +193,14 @@ the GUI from the same machine. Change the ``GUI listen address`` through the web UI from ``127.0.0.1:8384`` to ``0.0.0.0:8384`` or change the config.xml: -.. code:: xml +.. code-block:: xml
127.0.0.1:8384
to -.. code:: xml +.. code-block:: xml
0.0.0.0:8384
@@ -212,7 +212,7 @@ If both your computers are Unixy (Linux, Mac, etc) You can also leave the GUI settings at default and use an ssh port forward to access it. For example, -.. code:: bash +.. code-block:: bash $ ssh -L 9090:127.0.0.1:8384 user@othercomputer.example.com