Skip to content

Commit 2b01de0

Browse files
committed
loris2 => loris
1 parent 36b4486 commit 2b01de0

File tree

10 files changed

+32
-32
lines changed

10 files changed

+32
-32
lines changed

bin/loris-cache_clean.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# CAUTION - This script deletes files. Be careful where you point it!
99
#
1010

11-
LOG="/var/log/loris2/cache_clean.log"
11+
LOG="/var/log/loris/cache_clean.log"
1212

1313
echo -ne "$(date +[%c]) " >> $LOG
1414
echo "starting" >> $LOG

doc/apache.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ ExpiresDefault "access plus 5184000 seconds"
2727
2828
AllowEncodedSlashes On
2929
30-
WSGIDaemonProcess loris2 user=loris group=loris processes=10 threads=15 maximum-requests=10000
31-
WSGIScriptAlias /loris /var/www/loris2/loris2.wsgi
32-
WSGIProcessGroup loris2
30+
WSGIDaemonProcess loris user=loris group=loris processes=10 threads=15 maximum-requests=10000
31+
WSGIScriptAlias /loris /var/www/loris/loris.wsgi
32+
WSGIProcessGroup loris
3333
```
3434

3535
Explanation:

doc/configuration.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Configuration and Options
22
=========================
33

4-
See `etc/loris2.conf`.
4+
See `etc/loris.conf`.
55

66
In addition to a bunch of directory paths (items that end with `_dp`) which should be self-explanatory and the [transformation options explained below](#image-transformations), there are some options:
77

@@ -76,4 +76,4 @@ To use this option, you need to install Pillow/PIL with [Little CMS](http://www.
7676

7777
Proceed to [Cache Maintenance](cache_maintenance.md) or go [Back to README](../README.md)
7878

79-
[string interpolation]: http://www.voidspace.org.uk/python/configobj.html#string-interpolation
79+
[string interpolation]: http://www.voidspace.org.uk/python/configobj.html#string-interpolation

doc/develop.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ config = {
3232

3333
which is then available in the `config` attribute of the application. The sub-dictionaries are then used to configure other objects, by passing the values of individual entries or just the entire dict, depending on how complex the situation is. Generally, the naming conventions and principals behind how this is intended to work should be clear.
3434

35-
__N.B.:__ When developing or extending, i.e., instantiating the application instance in debug mode (by calling `webapp.create_app(debug=True)`), __some properties in `etc/loris.conf` are overridden in the `create_app` function__. This is done so that we can calculate some locations based on the application directory. Therefore, if you need to add additional configuration, e.g. in your resolver or transformations, you may need to add/set them in two places if you want an option to be different when developing/running tests: in `etc/loris2.conf` and in the first `if` block of `webapp.create_app`.
35+
__N.B.:__ When developing or extending, i.e., instantiating the application instance in debug mode (by calling `webapp.create_app(debug=True)`), __some properties in `etc/loris.conf` are overridden in the `create_app` function__. This is done so that we can calculate some locations based on the application directory. Therefore, if you need to add additional configuration, e.g. in your resolver or transformations, you may need to add/set them in two places if you want an option to be different when developing/running tests: in `etc/loris.conf` and in the first `if` block of `webapp.create_app`.
3636

3737
Running Tests
3838
-------------
@@ -69,11 +69,11 @@ Using the Development Server
6969

7070
Image Transformations
7171
---------------------
72-
Loris is designed to make it possible for you to implement image transformations using any libraries or utilities you choose. The transformers are loaded dynamically at startup, and are configured in `etc/loris2.conf`. See `transforms.py` for details. Transformers for JPEG, TIFF, GIF, and JP2 (JP2 as long as you provide the Kakadu dependencies) using Pillow are provided.
72+
Loris is designed to make it possible for you to implement image transformations using any libraries or utilities you choose. The transformers are loaded dynamically at startup, and are configured in `etc/loris.conf`. See `transforms.py` for details. Transformers for JPEG, TIFF, GIF, and JP2 (JP2 as long as you provide the Kakadu dependencies) using Pillow are provided.
7373

7474
More about this. Every `_AbstractTransformer` implementation must implement a `transform()` method that receives the path to the source file (`src_fp`), the path to where the output file should go (`target_fp`), and an instance of an `img.ImageRequest` object. This object should contain all of the attributes you could ever possbily need for working with an image library. See `img.ImageRequest.__slots__` for details.
7575

76-
`[transforms][[{fmt}]]` is the naming convention for of these sections in `etc/loris2.conf`. This MUST be followed, and {fmy} MUST be one of the extension strings listed in the IIIF Image API specification.
76+
`[transforms][[{fmt}]]` is the naming convention for of these sections in `etc/loris.conf`. This MUST be followed, and {fmy} MUST be one of the extension strings listed in the IIIF Image API specification.
7777

7878
Every section requires an `impl` key, and any other options provided will be automatically be available to the impl in its config dictionary.
7979

doc/nginx.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,14 @@ Just before the closing of the last '}' bracket, add:
3838

3939
This will load the reverse-proxy configuration stored in the loris.conf you created.
4040

41-
Create a new file called `loris.wsgi` and place it, for instance, inside the `/var/www/loris2` folder. Open it with your editor of choice, and populate it with the following code:
41+
Create a new file called `loris.wsgi` and place it, for instance, inside the `/var/www/loris` folder. Open it with your editor of choice, and populate it with the following code:
4242

4343
```
4444
#!/your/python/path python
4545
#-*- coding: utf-8 -*-
4646
4747
from loris.webapp import create_app
48-
application = create_app(debug=False, config_file_path='/root/python_ve/loris/etc/loris2.conf')
48+
application = create_app(debug=False, config_file_path='/root/python_ve/loris/etc/loris.conf')
4949
```
5050

5151
Now create a new file called `uwsgi.ini` and place it wherever you want. Its content will be:
@@ -54,7 +54,7 @@ Now create a new file called `uwsgi.ini` and place it wherever you want. Its con
5454
[uwsgi]
5555
http-socket = :8888
5656
processes = 16
57-
wsgi-file = /var/www/loris2/loris.wsgi # or wherever your loris.wsgi is.
57+
wsgi-file = /var/www/loris/loris.wsgi # or wherever your loris.wsgi is.
5858
```
5959

6060
Now you're ready to launch your application:

doc/setup.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Create a user that will own the loris application, e.g.:
77
$ sudo adduser loris
88
```
99

10-
This user needs to have a home directory (unless you want to override it in the WSGI [`home=` directive](https://code.google.com/p/modwsgi/wiki/ConfigurationDirectives#WSGIDaemonProcess)) and the user and group name should match the `run_as_user` and `run_as_group` options in the `[loris.Loris]` section of `loris2.conf` and the `--loris-owner` and `--loris-group` options that you pass to `setup.py` (see below).
10+
This user needs to have a home directory (unless you want to override it in the WSGI [`home=` directive](https://code.google.com/p/modwsgi/wiki/ConfigurationDirectives#WSGIDaemonProcess)) and the user and group name should match the `run_as_user` and `run_as_group` options in the `[loris.Loris]` section of `loris.conf` and the `--loris-owner` and `--loris-group` options that you pass to `setup.py` (see below).
1111

1212
Finally, from the `loris` (not `loris/loris`) directory, run
1313

@@ -25,13 +25,13 @@ There are a bunch of flags that can be passed to `setup.py install` to customize
2525
```
2626
--kdu-expand Path to the Kakadu executable [Default: /usr/local/bin/kdu_expand]
2727
--libkdu Path to __the directory that contains__ libkdu.so [Default: /usr/local/lib]
28-
--image-cache Path to image cache directory [Default: /var/cache/loris2]
29-
--tmp-dir Path to temporary directory (loris will make its temporary files and pipes here) [Default: /tmp/loris2]
30-
--www-dir Path to www directory (wsgi and index file will be here) [Default: /var/www/loris2]
31-
--log-dir Path to directory for logs [Default: /var/log/loris2]
28+
--image-cache Path to image cache directory [Default: /var/cache/loris]
29+
--tmp-dir Path to temporary directory (loris will make its temporary files and pipes here) [Default: /tmp/loris]
30+
--www-dir Path to www directory (wsgi and index file will be here) [Default: /var/www/loris]
31+
--log-dir Path to directory for logs [Default: /var/log/loris]
3232
--source-images Path to source images directory [Default: /usr/local/share/images]
33-
--config-dir Where to put the config file. loris2.conf will be here after install. [Default: /etc/loris2]
34-
--info-cache Path to info cache directory [Default: /var/cache/loris2]
33+
--config-dir Where to put the config file. loris.conf will be here after install. [Default: /etc/loris]
34+
--info-cache Path to info cache directory [Default: /var/cache/loris]
3535
--loris-owner User that will own the application and has permission to write to caches. [Default: loris]
3636
--loris-group Group that will own the application and has permission to write to caches. [Default: loris]
3737
```
@@ -48,7 +48,7 @@ For Ubuntu 20:
4848

4949
$ sudo python3 ./bin/setup_directories.py
5050

51-
The `loris2.wsgi` WSGI file should now have been created and can be found in the directory that is configured as the `www_dp` directory in the `loris2.conf` file (by default: `/var/www/loris2`).
51+
The `loris.wsgi` WSGI file should now have been created and can be found in the directory that is configured as the `www_dp` directory in the `loris.conf` file (by default: `/var/www/loris`).
5252

5353
Note again that __Kakadu is no longer installed__ by the setup script; it didn't work for too many people. You may use the copy that is bundled with Loris, provided you comply with the [terms outlined by NewSouth Innovations](http://www.kakadusoftware.com/index.php?option=com_content&task=view&id=26&Itemid=22) and this version works on your system. Either of these may well not be the case, in which case you will need to obtain a copy of Kakadu 7+ separately and may need to compile it for your system.
5454

doc/two_lorises.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ Deactiveate the virtualenv:
100100
deactivate
101101
```
102102

103-
To /var/www/loris/loris2.wsgi, add:
103+
To /var/www/loris/loris.wsgi, add:
104104

105105
```
106106
# CHANGE /home/jstroop to whatever...
@@ -112,7 +112,7 @@ To the Apache vhost:
112112
```
113113
# Loris 2
114114
AllowEncodedSlashes On
115-
WSGIDaemonProcess loris2 user=loris group=loris processes=5 threads=5 maximum-requests=10000
116-
WSGIScriptAlias /loris2 /var/www/loris/loris2.wsgi
117-
WSGIProcessGroup loris2
115+
WSGIDaemonProcess loris user=loris group=loris processes=5 threads=5 maximum-requests=10000
116+
WSGIScriptAlias /loris /var/www/loris/loris.wsgi
117+
WSGIProcessGroup loris
118118
```

loris/data/loris2.conf renamed to loris/data/loris.conf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# loris2.conf
1+
# loris.conf
22
#
33
# This file is parsed by the ConfigObj library:
44
#
@@ -23,8 +23,8 @@
2323
#
2424

2525
[loris.Loris]
26-
tmp_dp = '/tmp/loris2/tmp' # r--
27-
www_dp = '/var/www/loris2' # r-x
26+
tmp_dp = '/tmp/loris/tmp' # r--
27+
www_dp = '/var/www/loris' # r-x
2828
run_as_user = 'loris'
2929
run_as_group = 'loris'
3030
enable_caching = True
@@ -50,7 +50,7 @@ max_size_above_full = 200
5050
[logging]
5151
log_to = 'file' # 'console'|'file'
5252
log_level = 'INFO' # 'DEBUG'|'INFO'|'WARNING'|'ERROR'|'CRITICAL'
53-
log_dir = '/var/log/loris2' # rw-
53+
log_dir = '/var/log/loris' # rw-
5454
max_size = 5242880 # 5 MB
5555
max_backups = 5
5656
format = '%(asctime)s (%(name)s) [%(levelname)s]: %(message)s'

loris/user_commands.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
from configobj import ConfigObj
55

66

7-
CONFIG_FILE_NAME = 'loris2.conf'
8-
CONFIG_DIR_TARGET_DEFAULT = '/etc/loris2'
9-
WSGI_FILE_NAME = 'loris2.wsgi'
7+
CONFIG_FILE_NAME = 'loris.conf'
8+
CONFIG_DIR_TARGET_DEFAULT = '/etc/loris'
9+
WSGI_FILE_NAME = 'loris.wsgi'
1010

1111

1212
def _data_directory_path():

loris/webapp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def get_debug_config(debug_jp2_transformer):
4545
# change a few things, read the config and set up logging
4646
project_dp = path.dirname(path.dirname(path.realpath(__file__)))
4747
data_directory = path.join(project_dp, 'loris', 'data')
48-
config_file_path = path.join(data_directory, 'loris2.conf')
48+
config_file_path = path.join(data_directory, 'loris.conf')
4949

5050
config = read_config(config_file_path)
5151

0 commit comments

Comments
 (0)