mirror of
https://github.com/BobbyWibowo/lolisafe.git
synced 2025-01-18 17:21:33 +00:00
Updates
* Updated README.md to include information about the thumbnails generation script. * Added .markdownlint.json to disable 2 rules from markdownlint.
This commit is contained in:
parent
5c365dc4a8
commit
e204187efc
5
.markdownlint.json
Normal file
5
.markdownlint.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"default": true,
|
||||
"MD013": false,
|
||||
"MD040": false
|
||||
}
|
14
README.md
14
README.md
@ -15,6 +15,20 @@ If you want to use an existing lolisafe database with this branch, make sure to
|
||||
|
||||
Configuration file of lolisafe, `config.js`, is also not 100% compatible with this branch. There are some options that had been renamed and/or restructured. Please make sure your config matches the sample in `config.sample.js` before starting.
|
||||
|
||||
## Missing thumbnails
|
||||
|
||||
Thumbnails will not be automatically generated for files that have been uploaded prior to enabling thumbnails generation in the config file. To generate thumbnails for old files, you can try running `yarn thumbs` (a shortcut to running `node scripts/thumbs.js`).
|
||||
|
||||
```
|
||||
Usage:
|
||||
yarn thumbs <mode=1|2|3> [force=0|1]
|
||||
|
||||
mode : 1 = images only, 2 = videos only, 3 = both images and videos
|
||||
force: 0 = no force (default), 1 = overwrite existing thumbnails
|
||||
```
|
||||
|
||||
For example, if you only want to generate thumbnails for image files, you can do `yarn thumbs 1`.
|
||||
|
||||
## Running
|
||||
|
||||
1. Ensure you have at least version 8.0.0 of node installed
|
||||
|
@ -16,7 +16,8 @@
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"start": "node ./lolisafe.js",
|
||||
"pm2": "pm2 start --name lolisafe ./lolisafe.js"
|
||||
"pm2": "pm2 start --name lolisafe ./lolisafe.js",
|
||||
"thumbs": "node ./scripts/thumbs.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"bcrypt": "^2.0.0",
|
||||
|
@ -38,9 +38,9 @@ thumbs.do = async () => {
|
||||
thumbs.force = parseInt(args[1])
|
||||
if ((isNaN(thumbs.mode) || ![1, 2, 3].includes(thumbs.mode)) ||
|
||||
(!isNaN(thumbs.force) && ![0, 1].includes(thumbs.force))) {
|
||||
console.log('Usage : node THIS_FILE <mode=1|2|3> [force=0|1]')
|
||||
console.log('mode : 1 = images only, 2 = videos only, 3 = both images and videos')
|
||||
console.log('force : 0 = no force (default), 1 = overwrite existing thumbnails')
|
||||
console.log('Usage:\nyarn thumbs <mode=1|2|3> [force=0|1]\n')
|
||||
console.log('mode : 1 = images only, 2 = videos only, 3 = both images and videos')
|
||||
console.log('force: 0 = no force (default), 1 = overwrite existing thumbnails')
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -8,6 +8,7 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block scripts %}
|
||||
<!-- Scripts -->
|
||||
<script type="text/javascript" src="../libs/lazyload/lazyload.min.js?v={{ globals.v3 }}"></script>
|
||||
<script type="text/javascript" src="../js/album.js?v={{ globals.v1 }}"></script>
|
||||
{% endblock %}
|
||||
|
Loading…
Reference in New Issue
Block a user