Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: README.rst

Issue 30023558: Noissue - Update R documentation (Closed) Base URL: https://hg.adblockplus.org/python-abp
Patch Set: Created March 5, 2019, 9:54 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 python-abp 1 python-abp
2 ========== 2 ==========
3 3
4 This repository contains a library for working with Adblock Plus filter lists, 4 This repository contains a library for working with Adblock Plus filter lists,
5 a script for rendering diffs between filter lists, and the script that is used 5 a script for rendering diffs between filter lists, and the script that is used
6 for building Adblock Plus filter lists from the form in which they are authored 6 for building Adblock Plus filter lists from the form in which they are authored
7 into the format suitable for consumption by the adblocking software (aka 7 into the format suitable for consumption by the adblocking software (aka
8 rendering). 8 rendering).
9 9
10 .. contents:: 10 .. contents::
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 All public functions, classes and methods should have docstrings compliant with 205 All public functions, classes and methods should have docstrings compliant with
206 `NumPy/SciPy documentation guide <https://github.com/numpy/numpy/blob/master/doc /HOWTO_DOCUMENT.rst.txt>`_. 206 `NumPy/SciPy documentation guide <https://github.com/numpy/numpy/blob/master/doc /HOWTO_DOCUMENT.rst.txt>`_.
207 One exception is the constructors of classes that the user is not expected to 207 One exception is the constructors of classes that the user is not expected to
208 instantiate (such as exceptions). 208 instantiate (such as exceptions).
209 209
210 210
211 Using the library with R 211 Using the library with R
212 ------------------------ 212 ------------------------
213 213
214 ``python-abp`` can be installed directly onto your system, or in a virtual 214 ``python-abp`` can be installed directly onto your system, or in a virtual
215 environment. To install it directly onto your system:: 215 environment. To install it directly onto your system with pip::
216 216
217 $ pip install --upgrade python-abp 217 $ pip install --upgrade python-abp
218 218
219 To install it in a virtual environment:: 219 Or install onto your system from source::
Vasily Kuznetsov 2019/03/06 17:18:19 Perhaps we could make this a bit more comprehensiv
rhowell 2019/03/07 03:59:07 Seems like it's starting to get complicated trying
220
221 $ cd python-abp
222 $ pip install --upgrade .
Vasily Kuznetsov 2019/03/06 17:18:19 A simpler version would be: $ pip install -U
rhowell 2019/03/07 03:59:07 Done.
223
224 To install ``python-abp`` in a virtual environment with pip::
220 225
221 $ virtualenv venv 226 $ virtualenv venv
222 $ venv/bin/pip install --upgrade python-abp 227 $ venv/bin/pip install --upgrade python-abp
223 228
229 Or install from source in a virtualenv::
230
231 $ cd python-abp
232 $ virtualenv venv
233 $ venv/bin/pip install --upgrade .
224 234
225 Then import it with ``reticulate`` in R: 235 Then import it with ``reticulate`` in R:
226 236
227 .. code-block:: R 237 .. code-block:: R
228 238
229 > library(reticulate) 239 > library(reticulate)
230 > use_virtualenv("~/python-abp/env", required=TRUE) # If using virtualenv 240 > use_virtualenv("~/path/to/python-abp/venv", required=TRUE) # If using vir tualenv
231 > abp <- import("abp.filters.rpy") 241 > abp <- import("abp.filters.rpy")
232 242
233 Now you can use the functions with ``abp$functionname``, e.g. 243 Now you can use the functions with ``abp$functionname``, e.g.
234 ``abp.line2dict("@@||g.doubleclick.net/pagead/$subdocument,domain=hon30.org")``. 244 ``abp$line2dict("@@||g.doubleclick.net/pagead/$subdocument,domain=hon30.org")``.
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld