diff --git a/404.html b/404.html index f23146a..1ff0b70 100644 --- a/404.html +++ b/404.html @@ -296,8 +296,8 @@
./static(as path /static) and
-
+
diff --git a/docs/index.html b/docs/index.html
index f3fefde..2b51d61 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -302,8 +302,8 @@
-
- PluginSystem
+
+ Plugin System
@@ -435,7 +435,7 @@ installed, pipenv install --dev, then you can use the following com
diff --git a/extensions/index.html b/extensions/index.html
index eafdd36..b483596 100644
--- a/extensions/index.html
+++ b/extensions/index.html
@@ -311,8 +311,8 @@
-
- PluginSystem
+
+ Plugin System
diff --git a/index.html b/index.html
index d11d62c..ec184b1 100644
--- a/index.html
+++ b/index.html
@@ -347,8 +347,8 @@
-
- PluginSystem
+
+ Plugin System
diff --git a/install-with-docker/index.html b/install-with-docker/index.html
index 06a8ec1..ed3caa3 100644
--- a/install-with-docker/index.html
+++ b/install-with-docker/index.html
@@ -311,8 +311,8 @@
-
- PluginSystem
+
+ Plugin System
diff --git a/license/index.html b/license/index.html
index 4390956..562df1e 100644
--- a/license/index.html
+++ b/license/index.html
@@ -302,8 +302,8 @@
-
- PluginSystem
+
+ Plugin System
diff --git a/passwords/index.html b/passwords/index.html
index 0df764f..6f20246 100644
--- a/passwords/index.html
+++ b/passwords/index.html
@@ -302,8 +302,8 @@
-
- PluginSystem
+
+ Plugin System
diff --git a/plugin-system/index.html b/plugin-system/index.html
index fa92f53..59d3d98 100644
--- a/plugin-system/index.html
+++ b/plugin-system/index.html
@@ -42,7 +42,7 @@
- PluginSystem - Pinry Docs
+ Plugin System - Pinry Docs
@@ -119,7 +119,7 @@
- PluginSystem
+ Plugin System
@@ -310,8 +310,8 @@
-
- PluginSystem
+
+ Plugin System
@@ -408,14 +408,33 @@
New plugin system for Pinry¶
-New plugin system is under development.
-Now you could access it via project example plugin file pinry_plugins/batteries/plugin_example.py.
-You could create a simple plugin which has a class which owns methods named:
-
-- process_image_pre_creation
-- process_thumbnail_pre_creation
-
-And, add the plugin class to local_settings.py as:
+New plugin system is under development and a naive version has been released.
+A PinryPlugin is a python class or object which is callable.
+The plugin loader will call the plugin argument only once and use the plugin
+instance after specified events triggered just like the way django-middleware works.
+You could create a plugin as python-package with content:
+from core.models import Image
+from django_images.models import Thumbnail
+
+
+class Plugin:
+
+ def __init__(self):
+ # do something you want, just be called only
+ pass
+
+ def process_image_pre_creation(self, django_settings, image_instance: Image):
+ pass
+
+ def process_thumbnail_pre_creation(self, django_settings, thumbnail_instance: Thumbnail):
+ pass
+
+
+
+You could make some changes on Image object and Thumbnail object
+before they actually be saved (for example, add water-mark to them).
+You could access example plugin via pinry_plugins/batteries/plugin_example.py.
+After all, enable the plugin in local_settings.py:
ENABLED_PLUGINS = [
'pinry_plugins.batteries.plugin_example.Plugin',
]
@@ -423,6 +442,20 @@
Now the plugin will work like a charm!
+List of Available Plugins¶
+left blank to fill, coming soon...
+Install Plugin in Docker¶
+If you have some plugin which named hello.py and a have a Plugin class inside.
+You could just copy them to directory pinry_plugins/batteries.
+Now add config to local_settings.py
+ENABLED_PLUGINS = [
+ 'pinry_plugins.batteries.hello.Plugin',
+]
+
+
+
+Then, rebuild your docker image, the plugin will work
+if no further python dependencies required.
diff --git a/screenshots/index.html b/screenshots/index.html
index d38296e..7310606 100644
--- a/screenshots/index.html
+++ b/screenshots/index.html
@@ -381,8 +381,8 @@
-
- PluginSystem
+
+ Plugin System
diff --git a/search/search_index.json b/search/search_index.json
index fb012ff..2bf7ff1 100644
--- a/search/search_index.json
+++ b/search/search_index.json
@@ -1 +1 @@
-{"config":{"lang":["en"],"prebuild_index":false,"separator":"[\\s\\-]+"},"docs":[{"location":"","text":"Pinry, the open-source tiling image board. \u00b6 The open-source core of Pinry, a tiling image board system for people who want to save, tag, and share images, videos and webpages in an easy to skim through format. Demo Site \u00b6 We currently have a few demos up at: https://pin.37soloist.com/ https://pinry-demo.lapo.it/ If you'd like to showcase your Pinry website toss us a link! As Seen On \u00b6","title":"Home"},{"location":"#pinry-the-open-source-tiling-image-board","text":"The open-source core of Pinry, a tiling image board system for people who want to save, tag, and share images, videos and webpages in an easy to skim through format.","title":"Pinry, the open-source tiling image board."},{"location":"#demo-site","text":"We currently have a few demos up at: https://pin.37soloist.com/ https://pinry-demo.lapo.it/ If you'd like to showcase your Pinry website toss us a link!","title":"Demo Site"},{"location":"#as-seen-on","text":"","title":"As Seen On"},{"location":"assets/","text":"Assets \u00b6 Logos \u00b6 Pinry has two logos, a light and dark variant:","title":"Assets"},{"location":"assets/#assets","text":"","title":"Assets"},{"location":"assets/#logos","text":"Pinry has two logos, a light and dark variant:","title":"Logos"},{"location":"contributing/","text":"Contributing \u00b6 We welcome any and all types of contributions, even if it's just fixing a single small spelling mistake.","title":"Contributing"},{"location":"contributing/#contributing","text":"We welcome any and all types of contributions, even if it's just fixing a single small spelling mistake.","title":"Contributing"},{"location":"development/","text":"Developing Pinry \u00b6 Pinry currently has two major requirements: Python 3.6+ Node 10+ For minor requirements you need two have installed two package managers that are not the defaults for these languages: Python, pipenv Node, yarn To install these is pretty simple, you can just run: cd pinry pip install pipenv npm install -g yarn After that you can install this project with: pipenv install --dev cd pinry-spa; yarn install You will need to run two separate items as of right now, the SPA and the backend: pipenv run python manage.py migrate pipenv run python manage.py runserver And from another terminal: cd pinry-spa; yarn serve Testing \u00b6 We have many tests built into Pinry to ensure that changes don't break anything. If you are live dangerously and have cutting edge new Pinry features first you can use our master branch for your own instance. We recommend using our tags/versions though. To run Pinry's tests inside the Pinry repo run: pipenv run python manage.py test Docker \u00b6 Follow the steps below to install Pinry locally or on any server. This process installs the minimal requirements to run Pinry. For development requirements and procedures, see testing above. Current docker configuration will just mount source code directory to docker app directory and run any codes existed in current git branch, you may also add \"local_settings.py\" to customize settings without changing settings file in pinry/settings . Install the requirements: Docker Docker Compose Set any custom configuration options you need and run:: cp docker-compose.example.yml docker-compose.yml # edit docker-compose.yml and change the secret-key, # don't forget to backup this config file. # You should build frontend first docker-compose up build_frontend # then start the backend server docker-compose up -d web If you want to run Pinry with current user in docker:: ./start_docker_with_current_user.sh [-d] Bootstrap the database(optional):: docker-compose exec web python3 manage.py migrate --settings=pinry.settings.docker Note : No static file server configured, your should configure nginx or other server to serve static files from ./static (as path /static ) and ./pinry-spa/dist (as html root / )","title":"Development"},{"location":"development/#developing-pinry","text":"Pinry currently has two major requirements: Python 3.6+ Node 10+ For minor requirements you need two have installed two package managers that are not the defaults for these languages: Python, pipenv Node, yarn To install these is pretty simple, you can just run: cd pinry pip install pipenv npm install -g yarn After that you can install this project with: pipenv install --dev cd pinry-spa; yarn install You will need to run two separate items as of right now, the SPA and the backend: pipenv run python manage.py migrate pipenv run python manage.py runserver And from another terminal: cd pinry-spa; yarn serve","title":"Developing Pinry"},{"location":"development/#testing","text":"We have many tests built into Pinry to ensure that changes don't break anything. If you are live dangerously and have cutting edge new Pinry features first you can use our master branch for your own instance. We recommend using our tags/versions though. To run Pinry's tests inside the Pinry repo run: pipenv run python manage.py test","title":"Testing"},{"location":"development/#docker","text":"Follow the steps below to install Pinry locally or on any server. This process installs the minimal requirements to run Pinry. For development requirements and procedures, see testing above. Current docker configuration will just mount source code directory to docker app directory and run any codes existed in current git branch, you may also add \"local_settings.py\" to customize settings without changing settings file in pinry/settings . Install the requirements: Docker Docker Compose Set any custom configuration options you need and run:: cp docker-compose.example.yml docker-compose.yml # edit docker-compose.yml and change the secret-key, # don't forget to backup this config file. # You should build frontend first docker-compose up build_frontend # then start the backend server docker-compose up -d web If you want to run Pinry with current user in docker:: ./start_docker_with_current_user.sh [-d] Bootstrap the database(optional):: docker-compose exec web python3 manage.py migrate --settings=pinry.settings.docker Note : No static file server configured, your should configure nginx or other server to serve static files from ./static (as path /static ) and ./pinry-spa/dist (as html root / )","title":"Docker"},{"location":"docs/","text":"Docs \u00b6 Pinry's docs are built with mkdocs . If you have dev dependencies installed, pipenv install --dev , then you can use the following commands: make docs-serve for testing make docs-build to build the files make docs-publish to publish to github","title":"Docs"},{"location":"docs/#docs","text":"Pinry's docs are built with mkdocs . If you have dev dependencies installed, pipenv install --dev , then you can use the following commands: make docs-serve for testing make docs-build to build the files make docs-publish to publish to github","title":"Docs"},{"location":"extensions/","text":"Browser Extensions \u00b6 Lapo Luchini has been kind enough to create extensions for both Chrome and Firefox. You can find his repo for these extensions at: https://github.com/lapo-luchini/browser-pinry If you'd like to install either extension they are available at: https://chrome.google.com/webstore/detail/jmhdcnmfkglikfjafdmdikoonedgijpa/ https://addons.mozilla.org/it/firefox/addon/add-to-pinry/","title":"Extensions"},{"location":"extensions/#browser-extensions","text":"Lapo Luchini has been kind enough to create extensions for both Chrome and Firefox. You can find his repo for these extensions at: https://github.com/lapo-luchini/browser-pinry If you'd like to install either extension they are available at: https://chrome.google.com/webstore/detail/jmhdcnmfkglikfjafdmdikoonedgijpa/ https://addons.mozilla.org/it/firefox/addon/add-to-pinry/","title":"Browser Extensions"},{"location":"install-with-docker/","text":"Pinry Docker \u00b6 A nice and easy way to get a Pinry instance up and running using docker. For help on getting started with docker see the official getting started guide at the end of this page. Getting Pinry Docker \u00b6 Running this will get the latest version of pinry itself git clone https://github.com/pinry/pinry cd pinry/docker ./build_docker.sh Now you can start your container by command like this # this is where your database, local_settings and pins located mkdir data # use absolute path for docker to avoid using default data-volume (we use directory instead) ./start_docker.sh `readlink -f data` Please visit http://your-ip to visit your instance and register a new account, enjoy it. Configuring docker-pinry \u00b6 Enable signups for new users by editing pinry/local_settings.py ALLOW_NEW_REGISTRATIONS = True Building docker-pinry again (with latest version) \u00b6 Running this will build you a docker image with the latest version of pinry git pull --rebase cd ./docker/ ./build_docker.sh Backup \u00b6 Just copy data folder's content to an safe place, enjoy :) Why include nginx and not just map to gunicorn directly? \u00b6 Because gunicorn/django can't serve static files very well and it is unwise to do so for security reasons. I built this so that people can have a full hosted solution in a container. If you have a host machine running nginx then of course there is no point to run nginx in the container as well, you can simply disable nginx, map gunicorn to a port and then set your host machine's nginx to display your media and static files since that directory is shared between the container and host. Why use sqlite3? \u00b6 Because it has a very low resource cost and most pinry websites are small personal ones. Why have a full on database for that? If you need more power than you can easily modify the data/local_settings.py to point to a stronger database solution. Links \u00b6 official getting started guide additional pinry configuration settings","title":"Install with Docker"},{"location":"install-with-docker/#pinry-docker","text":"A nice and easy way to get a Pinry instance up and running using docker. For help on getting started with docker see the official getting started guide at the end of this page.","title":"Pinry Docker"},{"location":"install-with-docker/#getting-pinry-docker","text":"Running this will get the latest version of pinry itself git clone https://github.com/pinry/pinry cd pinry/docker ./build_docker.sh Now you can start your container by command like this # this is where your database, local_settings and pins located mkdir data # use absolute path for docker to avoid using default data-volume (we use directory instead) ./start_docker.sh `readlink -f data` Please visit http://your-ip to visit your instance and register a new account, enjoy it.","title":"Getting Pinry Docker"},{"location":"install-with-docker/#configuring-docker-pinry","text":"Enable signups for new users by editing pinry/local_settings.py ALLOW_NEW_REGISTRATIONS = True","title":"Configuring docker-pinry"},{"location":"install-with-docker/#building-docker-pinry-again-with-latest-version","text":"Running this will build you a docker image with the latest version of pinry git pull --rebase cd ./docker/ ./build_docker.sh","title":"Building docker-pinry again (with latest version)"},{"location":"install-with-docker/#backup","text":"Just copy data folder's content to an safe place, enjoy :)","title":"Backup"},{"location":"install-with-docker/#why-include-nginx-and-not-just-map-to-gunicorn-directly","text":"Because gunicorn/django can't serve static files very well and it is unwise to do so for security reasons. I built this so that people can have a full hosted solution in a container. If you have a host machine running nginx then of course there is no point to run nginx in the container as well, you can simply disable nginx, map gunicorn to a port and then set your host machine's nginx to display your media and static files since that directory is shared between the container and host.","title":"Why include nginx and not just map to gunicorn directly?"},{"location":"install-with-docker/#why-use-sqlite3","text":"Because it has a very low resource cost and most pinry websites are small personal ones. Why have a full on database for that? If you need more power than you can easily modify the data/local_settings.py to point to a stronger database solution.","title":"Why use sqlite3?"},{"location":"install-with-docker/#links","text":"official getting started guide additional pinry configuration settings","title":"Links"},{"location":"license/","text":"License \u00b6 The BSD 2-Clause License \u00b6 Copyright (c) 2019 , Pinry's Contributors All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.","title":"License"},{"location":"license/#license","text":"","title":"License"},{"location":"license/#the-bsd-2-clause-license","text":"Copyright (c) 2019 , Pinry's Contributors All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.","title":"The BSD 2-Clause License"},{"location":"passwords/","text":"Updating Passwords \u00b6 Currently we don't have a good \"forgot my password\" method on Pinry since that generally requries an email to be sent. The current method for changing passwords involves: Create a new super user pipenv run python manage.py createsuperuser Login to your admin panel {your_website_url}/admin/ Go to the users section, select the user, change their password. Note: If you use that command to create superuser inside docker , please add --settings=pinry.settings.docker to command like, just like python manage.py createsuperuser --settings=pinry.settings.docker","title":"Passwords"},{"location":"passwords/#updating-passwords","text":"Currently we don't have a good \"forgot my password\" method on Pinry since that generally requries an email to be sent. The current method for changing passwords involves: Create a new super user pipenv run python manage.py createsuperuser Login to your admin panel {your_website_url}/admin/ Go to the users section, select the user, change their password. Note: If you use that command to create superuser inside docker , please add --settings=pinry.settings.docker to command like, just like python manage.py createsuperuser --settings=pinry.settings.docker","title":"Updating Passwords"},{"location":"plugin-system/","text":"New plugin system for Pinry \u00b6 New plugin system is under development. Now you could access it via project example plugin file pinry_plugins/batteries/plugin_example.py . You could create a simple plugin which has a class which owns methods named: process_image_pre_creation process_thumbnail_pre_creation And, add the plugin class to local_settings.py as: ENABLED_PLUGINS = [ 'pinry_plugins.batteries.plugin_example.Plugin', ] Now the plugin will work like a charm!","title":"PluginSystem"},{"location":"plugin-system/#new-plugin-system-for-pinry","text":"New plugin system is under development. Now you could access it via project example plugin file pinry_plugins/batteries/plugin_example.py . You could create a simple plugin which has a class which owns methods named: process_image_pre_creation process_thumbnail_pre_creation And, add the plugin class to local_settings.py as: ENABLED_PLUGINS = [ 'pinry_plugins.batteries.plugin_example.Plugin', ] Now the plugin will work like a charm!","title":"New plugin system for Pinry"},{"location":"screenshots/","text":"Screenshots \u00b6 Due to the constant design iterations this is a very incomplete page. There will be more screenshots in the future. You could always try our demo that we mention on the first page of the docs. Home \u00b6 Boards \u00b6 Pins \u00b6 Create Pin \u00b6 Pin large-view \u00b6 Search/Filter \u00b6","title":"Screenshots"},{"location":"screenshots/#screenshots","text":"Due to the constant design iterations this is a very incomplete page. There will be more screenshots in the future. You could always try our demo that we mention on the first page of the docs.","title":"Screenshots"},{"location":"screenshots/#home","text":"","title":"Home"},{"location":"screenshots/#boards","text":"","title":"Boards"},{"location":"screenshots/#pins","text":"","title":"Pins"},{"location":"screenshots/#create-pin","text":"","title":"Create Pin"},{"location":"screenshots/#pin-large-view","text":"","title":"Pin large-view"},{"location":"screenshots/#searchfilter","text":"","title":"Search/Filter"},{"location":"theories/","text":"Theories \u00b6 Our general thought process for why we have implemented features the way we have. Boards & Tags \u00b6 Boards are for overall themes and tags are for specification. An example of this is \"Cars\" and \"Car Types\". A board could be \"Cars\" and then some tags on a pin in that board would be \"Mustang\", \"Sports Car\", \"Sudan\", etc. You would also like to share pins via \"board\" (designed only for a single user) instead of \"tag\" which designed for all users.","title":"Theories"},{"location":"theories/#theories","text":"Our general thought process for why we have implemented features the way we have.","title":"Theories"},{"location":"theories/#boards-tags","text":"Boards are for overall themes and tags are for specification. An example of this is \"Cars\" and \"Car Types\". A board could be \"Cars\" and then some tags on a pin in that board would be \"Mustang\", \"Sports Car\", \"Sudan\", etc. You would also like to share pins via \"board\" (designed only for a single user) instead of \"tag\" which designed for all users.","title":"Boards & Tags"}]}
\ No newline at end of file
+{"config":{"lang":["en"],"prebuild_index":false,"separator":"[\\s\\-]+"},"docs":[{"location":"","text":"Pinry, the open-source tiling image board. \u00b6 The open-source core of Pinry, a tiling image board system for people who want to save, tag, and share images, videos and webpages in an easy to skim through format. Demo Site \u00b6 We currently have a few demos up at: https://pin.37soloist.com/ https://pinry-demo.lapo.it/ If you'd like to showcase your Pinry website toss us a link! As Seen On \u00b6","title":"Home"},{"location":"#pinry-the-open-source-tiling-image-board","text":"The open-source core of Pinry, a tiling image board system for people who want to save, tag, and share images, videos and webpages in an easy to skim through format.","title":"Pinry, the open-source tiling image board."},{"location":"#demo-site","text":"We currently have a few demos up at: https://pin.37soloist.com/ https://pinry-demo.lapo.it/ If you'd like to showcase your Pinry website toss us a link!","title":"Demo Site"},{"location":"#as-seen-on","text":"","title":"As Seen On"},{"location":"assets/","text":"Assets \u00b6 Logos \u00b6 Pinry has two logos, a light and dark variant:","title":"Assets"},{"location":"assets/#assets","text":"","title":"Assets"},{"location":"assets/#logos","text":"Pinry has two logos, a light and dark variant:","title":"Logos"},{"location":"contributing/","text":"Contributing \u00b6 We welcome any and all types of contributions, even if it's just fixing a single small spelling mistake.","title":"Contributing"},{"location":"contributing/#contributing","text":"We welcome any and all types of contributions, even if it's just fixing a single small spelling mistake.","title":"Contributing"},{"location":"development/","text":"Developing Pinry \u00b6 Pinry currently has two major requirements: Python 3.6+ Node 10+ For minor requirements you need two have installed two package managers that are not the defaults for these languages: Python, pipenv Node, yarn To install these is pretty simple, you can just run: cd pinry pip install pipenv npm install -g yarn After that you can install this project with: pipenv install --dev cd pinry-spa; yarn install You will need to run two separate items as of right now, the SPA and the backend: pipenv run python manage.py migrate pipenv run python manage.py runserver And from another terminal: cd pinry-spa; yarn serve Testing \u00b6 We have many tests built into Pinry to ensure that changes don't break anything. If you are live dangerously and have cutting edge new Pinry features first you can use our master branch for your own instance. We recommend using our tags/versions though. To run Pinry's tests inside the Pinry repo run: pipenv run python manage.py test Docker \u00b6 Follow the steps below to install Pinry locally or on any server. This process installs the minimal requirements to run Pinry. For development requirements and procedures, see testing above. Current docker configuration will just mount source code directory to docker app directory and run any codes existed in current git branch, you may also add \"local_settings.py\" to customize settings without changing settings file in pinry/settings . Install the requirements: Docker Docker Compose Set any custom configuration options you need and run:: cp docker-compose.example.yml docker-compose.yml # edit docker-compose.yml and change the secret-key, # don't forget to backup this config file. # You should build frontend first docker-compose up build_frontend # then start the backend server docker-compose up -d web If you want to run Pinry with current user in docker:: ./start_docker_with_current_user.sh [-d] Bootstrap the database(optional):: docker-compose exec web python3 manage.py migrate --settings=pinry.settings.docker Note : No static file server configured, your should configure nginx or other server to serve static files from ./static (as path /static ) and ./pinry-spa/dist (as html root / )","title":"Development"},{"location":"development/#developing-pinry","text":"Pinry currently has two major requirements: Python 3.6+ Node 10+ For minor requirements you need two have installed two package managers that are not the defaults for these languages: Python, pipenv Node, yarn To install these is pretty simple, you can just run: cd pinry pip install pipenv npm install -g yarn After that you can install this project with: pipenv install --dev cd pinry-spa; yarn install You will need to run two separate items as of right now, the SPA and the backend: pipenv run python manage.py migrate pipenv run python manage.py runserver And from another terminal: cd pinry-spa; yarn serve","title":"Developing Pinry"},{"location":"development/#testing","text":"We have many tests built into Pinry to ensure that changes don't break anything. If you are live dangerously and have cutting edge new Pinry features first you can use our master branch for your own instance. We recommend using our tags/versions though. To run Pinry's tests inside the Pinry repo run: pipenv run python manage.py test","title":"Testing"},{"location":"development/#docker","text":"Follow the steps below to install Pinry locally or on any server. This process installs the minimal requirements to run Pinry. For development requirements and procedures, see testing above. Current docker configuration will just mount source code directory to docker app directory and run any codes existed in current git branch, you may also add \"local_settings.py\" to customize settings without changing settings file in pinry/settings . Install the requirements: Docker Docker Compose Set any custom configuration options you need and run:: cp docker-compose.example.yml docker-compose.yml # edit docker-compose.yml and change the secret-key, # don't forget to backup this config file. # You should build frontend first docker-compose up build_frontend # then start the backend server docker-compose up -d web If you want to run Pinry with current user in docker:: ./start_docker_with_current_user.sh [-d] Bootstrap the database(optional):: docker-compose exec web python3 manage.py migrate --settings=pinry.settings.docker Note : No static file server configured, your should configure nginx or other server to serve static files from ./static (as path /static ) and ./pinry-spa/dist (as html root / )","title":"Docker"},{"location":"docs/","text":"Docs \u00b6 Pinry's docs are built with mkdocs . If you have dev dependencies installed, pipenv install --dev , then you can use the following commands: make docs-serve for testing make docs-build to build the files make docs-publish to publish to github","title":"Docs"},{"location":"docs/#docs","text":"Pinry's docs are built with mkdocs . If you have dev dependencies installed, pipenv install --dev , then you can use the following commands: make docs-serve for testing make docs-build to build the files make docs-publish to publish to github","title":"Docs"},{"location":"extensions/","text":"Browser Extensions \u00b6 Lapo Luchini has been kind enough to create extensions for both Chrome and Firefox. You can find his repo for these extensions at: https://github.com/lapo-luchini/browser-pinry If you'd like to install either extension they are available at: https://chrome.google.com/webstore/detail/jmhdcnmfkglikfjafdmdikoonedgijpa/ https://addons.mozilla.org/it/firefox/addon/add-to-pinry/","title":"Extensions"},{"location":"extensions/#browser-extensions","text":"Lapo Luchini has been kind enough to create extensions for both Chrome and Firefox. You can find his repo for these extensions at: https://github.com/lapo-luchini/browser-pinry If you'd like to install either extension they are available at: https://chrome.google.com/webstore/detail/jmhdcnmfkglikfjafdmdikoonedgijpa/ https://addons.mozilla.org/it/firefox/addon/add-to-pinry/","title":"Browser Extensions"},{"location":"install-with-docker/","text":"Pinry Docker \u00b6 A nice and easy way to get a Pinry instance up and running using docker. For help on getting started with docker see the official getting started guide at the end of this page. Getting Pinry Docker \u00b6 Running this will get the latest version of pinry itself git clone https://github.com/pinry/pinry cd pinry/docker ./build_docker.sh Now you can start your container by command like this # this is where your database, local_settings and pins located mkdir data # use absolute path for docker to avoid using default data-volume (we use directory instead) ./start_docker.sh `readlink -f data` Please visit http://your-ip to visit your instance and register a new account, enjoy it. Configuring docker-pinry \u00b6 Enable signups for new users by editing pinry/local_settings.py ALLOW_NEW_REGISTRATIONS = True Building docker-pinry again (with latest version) \u00b6 Running this will build you a docker image with the latest version of pinry git pull --rebase cd ./docker/ ./build_docker.sh Backup \u00b6 Just copy data folder's content to an safe place, enjoy :) Why include nginx and not just map to gunicorn directly? \u00b6 Because gunicorn/django can't serve static files very well and it is unwise to do so for security reasons. I built this so that people can have a full hosted solution in a container. If you have a host machine running nginx then of course there is no point to run nginx in the container as well, you can simply disable nginx, map gunicorn to a port and then set your host machine's nginx to display your media and static files since that directory is shared between the container and host. Why use sqlite3? \u00b6 Because it has a very low resource cost and most pinry websites are small personal ones. Why have a full on database for that? If you need more power than you can easily modify the data/local_settings.py to point to a stronger database solution. Links \u00b6 official getting started guide additional pinry configuration settings","title":"Install with Docker"},{"location":"install-with-docker/#pinry-docker","text":"A nice and easy way to get a Pinry instance up and running using docker. For help on getting started with docker see the official getting started guide at the end of this page.","title":"Pinry Docker"},{"location":"install-with-docker/#getting-pinry-docker","text":"Running this will get the latest version of pinry itself git clone https://github.com/pinry/pinry cd pinry/docker ./build_docker.sh Now you can start your container by command like this # this is where your database, local_settings and pins located mkdir data # use absolute path for docker to avoid using default data-volume (we use directory instead) ./start_docker.sh `readlink -f data` Please visit http://your-ip to visit your instance and register a new account, enjoy it.","title":"Getting Pinry Docker"},{"location":"install-with-docker/#configuring-docker-pinry","text":"Enable signups for new users by editing pinry/local_settings.py ALLOW_NEW_REGISTRATIONS = True","title":"Configuring docker-pinry"},{"location":"install-with-docker/#building-docker-pinry-again-with-latest-version","text":"Running this will build you a docker image with the latest version of pinry git pull --rebase cd ./docker/ ./build_docker.sh","title":"Building docker-pinry again (with latest version)"},{"location":"install-with-docker/#backup","text":"Just copy data folder's content to an safe place, enjoy :)","title":"Backup"},{"location":"install-with-docker/#why-include-nginx-and-not-just-map-to-gunicorn-directly","text":"Because gunicorn/django can't serve static files very well and it is unwise to do so for security reasons. I built this so that people can have a full hosted solution in a container. If you have a host machine running nginx then of course there is no point to run nginx in the container as well, you can simply disable nginx, map gunicorn to a port and then set your host machine's nginx to display your media and static files since that directory is shared between the container and host.","title":"Why include nginx and not just map to gunicorn directly?"},{"location":"install-with-docker/#why-use-sqlite3","text":"Because it has a very low resource cost and most pinry websites are small personal ones. Why have a full on database for that? If you need more power than you can easily modify the data/local_settings.py to point to a stronger database solution.","title":"Why use sqlite3?"},{"location":"install-with-docker/#links","text":"official getting started guide additional pinry configuration settings","title":"Links"},{"location":"license/","text":"License \u00b6 The BSD 2-Clause License \u00b6 Copyright (c) 2019 , Pinry's Contributors All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.","title":"License"},{"location":"license/#license","text":"","title":"License"},{"location":"license/#the-bsd-2-clause-license","text":"Copyright (c) 2019 , Pinry's Contributors All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.","title":"The BSD 2-Clause License"},{"location":"passwords/","text":"Updating Passwords \u00b6 Currently we don't have a good \"forgot my password\" method on Pinry since that generally requries an email to be sent. The current method for changing passwords involves: Create a new super user pipenv run python manage.py createsuperuser Login to your admin panel {your_website_url}/admin/ Go to the users section, select the user, change their password. Note: If you use that command to create superuser inside docker , please add --settings=pinry.settings.docker to command like, just like python manage.py createsuperuser --settings=pinry.settings.docker","title":"Passwords"},{"location":"passwords/#updating-passwords","text":"Currently we don't have a good \"forgot my password\" method on Pinry since that generally requries an email to be sent. The current method for changing passwords involves: Create a new super user pipenv run python manage.py createsuperuser Login to your admin panel {your_website_url}/admin/ Go to the users section, select the user, change their password. Note: If you use that command to create superuser inside docker , please add --settings=pinry.settings.docker to command like, just like python manage.py createsuperuser --settings=pinry.settings.docker","title":"Updating Passwords"},{"location":"plugin-system/","text":"New plugin system for Pinry \u00b6 New plugin system is under development and a naive version has been released. A PinryPlugin is a python class or object which is callable. The plugin loader will call the plugin argument only once and use the plugin instance after specified events triggered just like the way django-middleware works. You could create a plugin as python-package with content: from core.models import Image from django_images.models import Thumbnail class Plugin : def __init__ ( self ): # do something you want, just be called only pass def process_image_pre_creation ( self , django_settings , image_instance : Image ): pass def process_thumbnail_pre_creation ( self , django_settings , thumbnail_instance : Thumbnail ): pass You could make some changes on Image object and Thumbnail object before they actually be saved (for example, add water-mark to them). You could access example plugin via pinry_plugins/batteries/plugin_example.py . After all, enable the plugin in local_settings.py: ENABLED_PLUGINS = [ 'pinry_plugins.batteries.plugin_example.Plugin', ] Now the plugin will work like a charm! List of Available Plugins \u00b6 left blank to fill, coming soon... Install Plugin in Docker \u00b6 If you have some plugin which named hello.py and a have a Plugin class inside. You could just copy them to directory pinry_plugins/batteries . Now add config to local_settings.py ENABLED_PLUGINS = [ 'pinry_plugins.batteries.hello.Plugin', ] Then, rebuild your docker image, the plugin will work if no further python dependencies required.","title":"Plugin System"},{"location":"plugin-system/#new-plugin-system-for-pinry","text":"New plugin system is under development and a naive version has been released. A PinryPlugin is a python class or object which is callable. The plugin loader will call the plugin argument only once and use the plugin instance after specified events triggered just like the way django-middleware works. You could create a plugin as python-package with content: from core.models import Image from django_images.models import Thumbnail class Plugin : def __init__ ( self ): # do something you want, just be called only pass def process_image_pre_creation ( self , django_settings , image_instance : Image ): pass def process_thumbnail_pre_creation ( self , django_settings , thumbnail_instance : Thumbnail ): pass You could make some changes on Image object and Thumbnail object before they actually be saved (for example, add water-mark to them). You could access example plugin via pinry_plugins/batteries/plugin_example.py . After all, enable the plugin in local_settings.py: ENABLED_PLUGINS = [ 'pinry_plugins.batteries.plugin_example.Plugin', ] Now the plugin will work like a charm!","title":"New plugin system for Pinry"},{"location":"plugin-system/#list-of-available-plugins","text":"left blank to fill, coming soon...","title":"List of Available Plugins"},{"location":"plugin-system/#install-plugin-in-docker","text":"If you have some plugin which named hello.py and a have a Plugin class inside. You could just copy them to directory pinry_plugins/batteries . Now add config to local_settings.py ENABLED_PLUGINS = [ 'pinry_plugins.batteries.hello.Plugin', ] Then, rebuild your docker image, the plugin will work if no further python dependencies required.","title":"Install Plugin in Docker"},{"location":"screenshots/","text":"Screenshots \u00b6 Due to the constant design iterations this is a very incomplete page. There will be more screenshots in the future. You could always try our demo that we mention on the first page of the docs. Home \u00b6 Boards \u00b6 Pins \u00b6 Create Pin \u00b6 Pin large-view \u00b6 Search/Filter \u00b6","title":"Screenshots"},{"location":"screenshots/#screenshots","text":"Due to the constant design iterations this is a very incomplete page. There will be more screenshots in the future. You could always try our demo that we mention on the first page of the docs.","title":"Screenshots"},{"location":"screenshots/#home","text":"","title":"Home"},{"location":"screenshots/#boards","text":"","title":"Boards"},{"location":"screenshots/#pins","text":"","title":"Pins"},{"location":"screenshots/#create-pin","text":"","title":"Create Pin"},{"location":"screenshots/#pin-large-view","text":"","title":"Pin large-view"},{"location":"screenshots/#searchfilter","text":"","title":"Search/Filter"},{"location":"theories/","text":"Theories \u00b6 Our general thought process for why we have implemented features the way we have. Boards & Tags \u00b6 Boards are for overall themes and tags are for specification. An example of this is \"Cars\" and \"Car Types\". A board could be \"Cars\" and then some tags on a pin in that board would be \"Mustang\", \"Sports Car\", \"Sudan\", etc. You would also like to share pins via \"board\" (designed only for a single user) instead of \"tag\" which designed for all users.","title":"Theories"},{"location":"theories/#theories","text":"Our general thought process for why we have implemented features the way we have.","title":"Theories"},{"location":"theories/#boards-tags","text":"Boards are for overall themes and tags are for specification. An example of this is \"Cars\" and \"Car Types\". A board could be \"Cars\" and then some tags on a pin in that board would be \"Mustang\", \"Sports Car\", \"Sudan\", etc. You would also like to share pins via \"board\" (designed only for a single user) instead of \"tag\" which designed for all users.","title":"Boards & Tags"}]}
\ No newline at end of file
diff --git a/sitemap.xml.gz b/sitemap.xml.gz
index c7224d7..9d86965 100644
Binary files a/sitemap.xml.gz and b/sitemap.xml.gz differ
diff --git a/theories/index.html b/theories/index.html
index 54c1ee7..c516688 100644
--- a/theories/index.html
+++ b/theories/index.html
@@ -340,8 +340,8 @@
-
- PluginSystem
+
+ Plugin System