diff --git a/.python-version b/.python-version deleted file mode 100644 index 0f44168..0000000 --- a/.python-version +++ /dev/null @@ -1 +0,0 @@ -3.6.4 diff --git a/Makefile b/Makefile index 5a11c6f..8cd177c 100644 --- a/Makefile +++ b/Makefile @@ -21,3 +21,9 @@ shell: pipenv run python manage.py shell flake8: pipenv run flake8 +docs-serve: + pipenv run mkdocs serve +docs-build: + pipenv run mkdocs build +docs-publish: + pipenv run mkdocs publish diff --git a/Pipfile b/Pipfile index 8991f92..5b9c40c 100644 --- a/Pipfile +++ b/Pipfile @@ -3,10 +3,15 @@ url = "https://pypi.python.org/simple" name = "pypi" verify_ssl = true +[requires] +python_version = "3.6" + [dev-packages] "flake8" = "*" qrcode = "*" django-extensions = "*" +mkdocs = "*" +mkdocs-material = "*" [packages] django = ">=1.11,<1.12" diff --git a/Pipfile.lock b/Pipfile.lock index 16a589d..4acf7f4 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,10 +1,12 @@ { "_meta": { "hash": { - "sha256": "5a500e687d991a6083783ad2d4192fc1e21c081495aef0dd4235648081b57f7e" + "sha256": "c60fe4609b1150e7a9a9b797cc2c40a54f4d422394454e524c1bed1d7a7ce460" }, "pipfile-spec": 6, - "requires": {}, + "requires": { + "python_version": "3.6" + }, "sources": [ { "name": "pypi", @@ -84,11 +86,11 @@ }, "django-taggit": { "hashes": [ - "sha256:01bf163f66f385de3777378f43338aba93aae8673891d8ba9a20695b2ffb8e10", - "sha256:c13dfc1808a3084b64898e591af1d2f49b672d108388654804b170ee0ac5caf0" + "sha256:4186a6ce1e1e9af5e2db8dd3479c5d31fa11a87d216a2ce5089ba3afde24a2c5", + "sha256:bd1ec80b813d60adadaa94dcce4bfd971cb4ae717b07e69fedbd38d417deb6e9" ], "index": "pypi", - "version": "==1.1.0" + "version": "==1.2.0" }, "djangorestframework": { "hashes": [ @@ -312,6 +314,13 @@ } }, "develop": { + "click": { + "hashes": [ + "sha256:2335065e6395b9e67ca716de5f7526736bfa6ceead690adf616d925bdc622b13", + "sha256:5b94b49521f6456670fdb30cd82a4eca9412788a93fa6dd6df72c94d5a8ff2d7" + ], + "version": "==7.0" + }, "django-extensions": { "hashes": [ "sha256:a9db7c56a556d244184f589f2437b4228de86ee45e5ebb837fb20c6d54e95ea5", @@ -335,6 +344,75 @@ "index": "pypi", "version": "==3.7.9" }, + "htmlmin": { + "hashes": [ + "sha256:1eab7cc34bb15042489b5cd579853f6032b62674575e4834b8b342a09371360f", + "sha256:50c1ef4630374a5d723900096a961cff426dff46b48f34d194a81bbe14eca178" + ], + "version": "==0.1.12" + }, + "jinja2": { + "hashes": [ + "sha256:74320bb91f31270f9551d46522e33af46a80c3d619f4a4bf42b3164d30b5911f", + "sha256:9fe95f19286cfefaa917656583d020be14e7859c6b0252588391e47db34527de" + ], + "version": "==2.10.3" + }, + "jsmin": { + "hashes": [ + "sha256:8d61145d1fcea57458ce99b4aaa6ccd9ed8aca175ed18b19b030993c27c3f0c3", + "sha256:b6df99b2cd1c75d9d342e4335b535789b8da9107ec748212706ef7bbe5c2553b" + ], + "version": "==2.2.2" + }, + "livereload": { + "hashes": [ + "sha256:78d55f2c268a8823ba499305dcac64e28ddeb9a92571e12d543cd304faf5817b", + "sha256:89254f78d7529d7ea0a3417d224c34287ebfe266b05e67e51facaf82c27f0f66" + ], + "version": "==2.6.1" + }, + "markdown": { + "hashes": [ + "sha256:2e50876bcdd74517e7b71f3e7a76102050edec255b3983403f1a63e7c8a41e7a", + "sha256:56a46ac655704b91e5b7e6326ce43d5ef72411376588afa1dd90e881b83c7e8c" + ], + "index": "pypi", + "version": "==3.1.1" + }, + "markupsafe": { + "hashes": [ + "sha256:00bc623926325b26bb9605ae9eae8a215691f33cae5df11ca5424f06f2d1f473", + "sha256:09027a7803a62ca78792ad89403b1b7a73a01c8cb65909cd876f7fcebd79b161", + "sha256:09c4b7f37d6c648cb13f9230d847adf22f8171b1ccc4d5682398e77f40309235", + "sha256:1027c282dad077d0bae18be6794e6b6b8c91d58ed8a8d89a89d59693b9131db5", + "sha256:24982cc2533820871eba85ba648cd53d8623687ff11cbb805be4ff7b4c971aff", + "sha256:29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b", + "sha256:43a55c2930bbc139570ac2452adf3d70cdbb3cfe5912c71cdce1c2c6bbd9c5d1", + "sha256:46c99d2de99945ec5cb54f23c8cd5689f6d7177305ebff350a58ce5f8de1669e", + "sha256:500d4957e52ddc3351cabf489e79c91c17f6e0899158447047588650b5e69183", + "sha256:535f6fc4d397c1563d08b88e485c3496cf5784e927af890fb3c3aac7f933ec66", + "sha256:62fe6c95e3ec8a7fad637b7f3d372c15ec1caa01ab47926cfdf7a75b40e0eac1", + "sha256:6dd73240d2af64df90aa7c4e7481e23825ea70af4b4922f8ede5b9e35f78a3b1", + "sha256:717ba8fe3ae9cc0006d7c451f0bb265ee07739daf76355d06366154ee68d221e", + "sha256:79855e1c5b8da654cf486b830bd42c06e8780cea587384cf6545b7d9ac013a0b", + "sha256:7c1699dfe0cf8ff607dbdcc1e9b9af1755371f92a68f706051cc8c37d447c905", + "sha256:88e5fcfb52ee7b911e8bb6d6aa2fd21fbecc674eadd44118a9cc3863f938e735", + "sha256:8defac2f2ccd6805ebf65f5eeb132adcf2ab57aa11fdf4c0dd5169a004710e7d", + "sha256:98c7086708b163d425c67c7a91bad6e466bb99d797aa64f965e9d25c12111a5e", + "sha256:9add70b36c5666a2ed02b43b335fe19002ee5235efd4b8a89bfcf9005bebac0d", + "sha256:9bf40443012702a1d2070043cb6291650a0841ece432556f784f004937f0f32c", + "sha256:ade5e387d2ad0d7ebf59146cc00c8044acbd863725f887353a10df825fc8ae21", + "sha256:b00c1de48212e4cc9603895652c5c410df699856a2853135b3967591e4beebc2", + "sha256:b1282f8c00509d99fef04d8ba936b156d419be841854fe901d8ae224c59f0be5", + "sha256:b2051432115498d3562c084a49bba65d97cf251f5a331c64a12ee7e04dacc51b", + "sha256:ba59edeaa2fc6114428f1637ffff42da1e311e29382d81b339c1817d37ec93c6", + "sha256:c8716a48d94b06bb3b2524c2b77e055fb313aeb4ea620c8dd03a105574ba704f", + "sha256:cd5df75523866410809ca100dc9681e301e3c27567cf498077e8551b6d20e42f", + "sha256:e249096428b3ae81b08327a63a485ad0878de3fb939049038579ac0ef61e17e7" + ], + "version": "==1.1.1" + }, "mccabe": { "hashes": [ "sha256:ab8a6258860da4b6677da4bd2fe5dc2c659cff31b3ee4f7f5d64e79735b80d42", @@ -342,6 +420,36 @@ ], "version": "==0.6.1" }, + "mkdocs": { + "hashes": [ + "sha256:17d34329aad75d5de604b9ed4e31df3a4d235afefdc46ce7b1964fddb2e1e939", + "sha256:8cc8b38325456b9e942c981a209eaeb1e9f3f77b493ad755bfef889b9c8d356a" + ], + "index": "pypi", + "version": "==1.0.4" + }, + "mkdocs-material": { + "hashes": [ + "sha256:307d76239ad7aa126ec7b2f6aa751f22bcabafdbe7679451b08ffe0bc005e22c", + "sha256:e11d89d236b2ea62e0a645ff3f55f64d66e9d4c3426771ffaeb24600521166b1" + ], + "index": "pypi", + "version": "==4.5.1" + }, + "mkdocs-minify-plugin": { + "hashes": [ + "sha256:3000a5069dd0f42f56a8aaf7fd5ea1222c67487949617e39585d6b6434b074b6", + "sha256:d54fdd5be6843dd29fd7af2f7fdd20a9eb4db46f1f6bed914e03b2f58d2d488e" + ], + "version": "==0.2.1" + }, + "pep562": { + "hashes": [ + "sha256:58cb1cc9ee63d93e62b4905a50357618d526d289919814bea1f0da8f53b79395", + "sha256:d2a48b178ebf5f8dd31709cc26a19808ef794561fa2fe50ea01ea2bad4d667ef" + ], + "version": "==1.0" + }, "pycodestyle": { "hashes": [ "sha256:95a2219d12372f05704562a14ec30bc76b05a5b297b21a5dfe3f6fac3491ae56", @@ -356,6 +464,36 @@ ], "version": "==2.1.1" }, + "pygments": { + "hashes": [ + "sha256:2a3fe295e54a20164a9df49c75fa58526d3be48e14aceba6d6b1e8ac0bfd6f1b", + "sha256:98c8aa5a9f778fcd1026a17361ddaf7330d1b7c62ae97c3bb0ae73e0b9b6b0fe" + ], + "version": "==2.5.2" + }, + "pymdown-extensions": { + "hashes": [ + "sha256:27953f071d37b63d418738f75d847d824c0e4430e93f085cfdd9f8dc08a8c5c3", + "sha256:328b9e114925729e0789558a94325be8e7ca9e0323ed2a2b705d9bc1de4d2716" + ], + "version": "==6.2" + }, + "pyyaml": { + "hashes": [ + "sha256:0e7f69397d53155e55d10ff68fdfb2cf630a35e6daf65cf0bdeaf04f127c09dc", + "sha256:2e9f0b7c5914367b0916c3c104a024bb68f269a486b9d04a2e8ac6f6597b7803", + "sha256:35ace9b4147848cafac3db142795ee42deebe9d0dad885ce643928e88daebdcc", + "sha256:38a4f0d114101c58c0f3a88aeaa44d63efd588845c5a2df5290b73db8f246d15", + "sha256:483eb6a33b671408c8529106df3707270bfacb2447bf8ad856a4b4f57f6e3075", + "sha256:4b6be5edb9f6bb73680f5bf4ee08ff25416d1400fbd4535fe0069b2994da07cd", + "sha256:7f38e35c00e160db592091751d385cd7b3046d6d51f578b29943225178257b31", + "sha256:8100c896ecb361794d8bfdb9c11fce618c7cf83d624d73d5ab38aef3bc82d43f", + "sha256:c0ee8eca2c582d29c3c2ec6e2c4f703d1b7f1fb10bc72317355a746057e7346c", + "sha256:e4c015484ff0ff197564917b4b4246ca03f411b9bd7f16e02a2f586eb48b6d04", + "sha256:ebc4ed52dcc93eeebeae5cf5deb2ae4347b3a81c3fa12b0b8c976544829396a4" + ], + "version": "==5.2" + }, "qrcode": { "hashes": [ "sha256:3996ee560fc39532910603704c82980ff6d4d5d629f9c3f25f34174ce8606cf5", @@ -370,6 +508,18 @@ "sha256:30f610279e8b2578cab6db20741130331735c781b56053c59c4076da27f06b66" ], "version": "==1.13.0" + }, + "tornado": { + "hashes": [ + "sha256:349884248c36801afa19e342a77cc4458caca694b0eda633f5878e458a44cb2c", + "sha256:398e0d35e086ba38a0427c3b37f4337327231942e731edaa6e9fd1865bbd6f60", + "sha256:4e73ef678b1a859f0cb29e1d895526a20ea64b5ffd510a2307b5998c7df24281", + "sha256:559bce3d31484b665259f50cd94c5c28b961b09315ccd838f284687245f416e5", + "sha256:abbe53a39734ef4aba061fca54e30c6b4639d3e1f59653f0da37a0003de148c7", + "sha256:c845db36ba616912074c5b1ee897f8e0124df269468f25e4fe21fe72f6edd7a9", + "sha256:c9399267c926a4e7c418baa5cbe91c7d1cf362d505a1ef898fde44a07c9dd8a5" + ], + "version": "==6.0.3" } } } diff --git a/doc/upgrade_from_1.x.md b/doc/upgrade_from_1.x.md deleted file mode 100644 index ee8d598..0000000 --- a/doc/upgrade_from_1.x.md +++ /dev/null @@ -1,59 +0,0 @@ -Guide of Upgrade from 1.x to 2.x ---------------------------------------- - -If you have Pinry installed by srouce code, it's easy for -you to upgrade from 1.x to 2.x, just follow these steps. - -At first you should checkout the old branch. - -```bash -# it is not required if you are currently the old version -git checkout 1.x version - -# install and enter the shell -pipenv install -pipenv shell - -# Upgrade to lastest version of django-images - -pip install -U git+https://github.com/mirumee/django-images.git -python manage.py makemigrations -python manage.py migrate --fake-initial - -# clean action -pip uninstall django-images - -# It will ask if you want to remove an extra file named like -# Uninstalling django-images-0.4.3: -# ------------------------------------------- -# Would remove: -# /path_to_your_python_packages/django_images-0.4.3.dist-info/* -# /path_to_your_python_packages/django_images/* -# Would not remove (might be manually added): -# /path_to_your_python_packages/django_images/migrations/0002_auto_20180826_0845.py -# Proceed (y/n)? -# ------------------------------------------ -# Please remove the file it by hand if possible (this operation is optional) -rm /path_to_your_python_packages/django_images/migrations/0002_auto_20180826_0845.py - -# exit pipenv's virtualenv -exit -``` - -Ant then you should checkout to version 2.x (our current master) - -```bash -# If you are not the lastest version ,just call "git pull --rebase" -# to upgrade to lastest version of Pinry (2.x) -git checkout master -make install -make migrate - -# Try to run as development server -make serve - -# If no error occurs, just enjoy it - -``` - -And now, you can just run your server in the way you like. diff --git a/docs/src/CNAME b/docs/src/CNAME new file mode 100644 index 0000000..cb4dd84 --- /dev/null +++ b/docs/src/CNAME @@ -0,0 +1 @@ +docs.getpinry.com diff --git a/docs/src/contributing.md b/docs/src/contributing.md new file mode 100644 index 0000000..661997e --- /dev/null +++ b/docs/src/contributing.md @@ -0,0 +1,4 @@ +# Contributing + +We welcome any and all types of contributions, even if it's just fixing a single +small spelling mistake. diff --git a/docs/src/docs.md b/docs/src/docs.md new file mode 100644 index 0000000..6cda985 --- /dev/null +++ b/docs/src/docs.md @@ -0,0 +1,8 @@ +# Docs + +Timestrap's docs are built with `mkdocs`. If you have dev dependencies +installed, `pipenv install --dev`, then you can use the following commands: + +- `gulp docs:serve` for testing +- `gulp docs:build` to build the files +- `gulp docs:publish` to publish to github diff --git a/docs/src/imgs/screenshot.png b/docs/src/imgs/screenshot.png new file mode 100644 index 0000000..e75b5b0 Binary files /dev/null and b/docs/src/imgs/screenshot.png differ diff --git a/docs/src/index.md b/docs/src/index.md new file mode 100644 index 0000000..7a07101 --- /dev/null +++ b/docs/src/index.md @@ -0,0 +1,5 @@ +# Pinry + +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. diff --git a/docs/src/license.md b/docs/src/license.md new file mode 100644 index 0000000..419a306 --- /dev/null +++ b/docs/src/license.md @@ -0,0 +1,27 @@ +# License + +## The BSD 2-Clause License + +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: + +1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + +2. 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. diff --git a/docs/src/screenshots.md b/docs/src/screenshots.md new file mode 100644 index 0000000..fb13e67 --- /dev/null +++ b/docs/src/screenshots.md @@ -0,0 +1,9 @@ +# Screenshots + +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. + +## Timesheet + +![Timesheet](imgs/screenshot.png) diff --git a/mkdocs.yml b/mkdocs.yml new file mode 100644 index 0000000..a89e64a --- /dev/null +++ b/mkdocs.yml @@ -0,0 +1,46 @@ +# Project information +site_name: 'Pinry Docs' +site_description: 'Docs for the Pinry project.' +site_author: 'Pinry\'s Contributors'' +site_url: 'https://docs.getpinry.com/' + +# Repository +repo_name: 'pinry/pinry' +repo_url: 'https://github.com/pinry/pinry' + +# Copyright +copyright: 'Copyright © 2019 Pinry\'s Contributors' + +# Navigation +nav: + - Home: 'index.md' + - Screenshots: 'screenshots.md' + - Docs: 'docs.md' + - Contributing: 'contributing.md' + - License: 'license.md' + +# Configuration +docs_dir: 'docs/src' +site_dir: 'docs/dist' +edit_uri: 'edit/master/docs/src/' +theme: + name: 'material' + language: 'en' + palette: + primary: 'indigo' + accent: 'indigo' + font: + text: 'Roboto' + code: 'Roboto Mono' + +# Customization +extra: + manifest: 'manifest.webmanifest' + social: + - type: 'github' + link: 'https://github.com/pinry' + +markdown_extensions: + - codehilite + - toc: + permalink: true