Skip to content
Permalink
866df25378
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
113 lines (77 sloc) 2.82 KB

Installation

Get a copy of the source code from the GithubRepo It doesn't matter if you clone the repository or get the zip file.

Once you have the code navigate to its location using the command line.

=== "Windows"

```
C:\> 
```

=== "Linux"

``` bash
dang@dang-laptop ~/Github$ cd reMarkAble
dang@dang-laptop ~/Github/reMarkAble$
```

!!! tip "Installation in a virtual environment"

Virtual environments (venv) give us a way of sandboxing python software we
install.  It means that they are not installed in the global path.
Personally, as a developer, I prefer this as it means I don't get caught out by
dependencies or clutter up my Python name space with cruft.

We can create a venv

``` bash
python -m venv env
```

Each time we want to use the code we need to access enter the virtual environment.
We can do this in Linux / mac with

``` bash
$ source env/bin/activate
```

or Windows
``` cmd
C:\> env\Scripts\activate.bat
```

Installing

We can now install the program using the setup script.

(env) dang@dang-laptop ~/Github/reMarkAble$ python setup.py install

running install
running bdist_egg
running egg_info

... <SNIP> ...

Finished processing dependencies for remarkable==0.3.1

And check things have installed correctly:

(env) dang@dang-laptop ~/Github/reMarkAble$ remarkable -h

usage: remarkable [-h] [-t TEMPLATE] [-d TEMPLATEDIR] [-o OUTPUT] [-v] filename

Tool to convert markdown documents into report and make parts of marking less painful

positional arguments:
  filename              File to Convert

optional arguments:
  -h, --help            show this help message and exit
  -t TEMPLATE, --template TEMPLATE
                        Template file to use for rendering
  -d TEMPLATEDIR, --templatedir TEMPLATEDIR
                        Local template directory
  -o OUTPUT, --output OUTPUT
                        Name of output file
  -v, --verbose         Log level verbosity. (-vv = Pink Lady Mode)

Optional: Run the Unit-tests

$ python setup.py test
running pytest

... <SNIP> ...
====================== test session starts ======================
platform linux -- Python 3.8.3, pytest-5.4.3, py-1.9.0, pluggy-0.13.1
rootdir: /home/dang/Github/reMarkAble
collected 66 items                                              

test/test_controller.py ......                            [  9%]
test/test_markdown.py ........................            [ 45%]
test/test_parser.py ...............                       [ 68%]
test/test_render.py ...........                           [ 84%]
test/test_sections.py ..........                          [100%]

====================== 66 passed in 0.29s =======================

If any tests fail, drop me a message so I can try to work out what has happened.