Lint markdown files

This commit is contained in:
Pierre Rudloff 2017-12-20 11:21:36 +01:00
parent 17df0b63cb
commit b74a092700
6 changed files with 81 additions and 17 deletions

View file

@ -10,4 +10,5 @@ Before opening a new issue, make sure that:
## Translation
If you want to help translating Alltube in your language, you can join our [POEditor project](https://poeditor.com/join/project/GJmE0wN7Xw).
If you want to help translating Alltube in your language,
you can join our [POEditor project](https://poeditor.com/join/project/GJmE0wN7Xw).

View file

@ -111,7 +111,12 @@ module.exports = function (grunt) {
css: {
src: 'css/*'
}
}
},
markdownlint: {
doc: {
src: ['README.md', 'CONTRIBUTING.md', 'resources/*.md']
}
}
}
);
@ -128,9 +133,10 @@ module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-fixpack');
grunt.loadNpmTasks('grunt-potomo');
grunt.loadNpmTasks('grunt-contrib-csslint');
grunt.loadNpmTasks('grunt-markdownlint');
grunt.registerTask('default', ['cssmin', 'potomo']);
grunt.registerTask('lint', ['csslint', 'fixpack', 'jsonlint', 'phpcs']);
grunt.registerTask('lint', ['csslint', 'fixpack', 'jsonlint', 'markdownlint', 'phpcs']);
grunt.registerTask('test', ['phpunit']);
grunt.registerTask('doc', ['phpdocumentor']);
grunt.registerTask('release', ['default', 'githash', 'compress']);

View file

@ -14,7 +14,8 @@ You just have to unzip it on your server and it should be ready to use.
### From Git
In order to get AllTube working, you need to use [Yarn](https://yarnpkg.com/) and [Composer](https://getcomposer.org/):
In order to get AllTube working,
you need to use [Yarn](https://yarnpkg.com/) and [Composer](https://getcomposer.org/):
```bash
yarn install
@ -23,7 +24,9 @@ composer install
This will download all the required dependencies.
(Note that it will download the ffmpeg binary for 64-bits Linux. If you are on another platform, you might want to specify the path to avconv/ffmpeg in your config file.)
(Note that it will download the ffmpeg binary for 64-bits Linux.
If you are on another platform,
you might want to specify the path to avconv/ffmpeg in your config file.)
You should also ensure that the *templates_c* folder has the right permissions:
@ -31,7 +34,8 @@ You should also ensure that the *templates_c* folder has the right permissions:
chmod 777 templates_c/
```
If your web server is Apache, you need to set the `AllowOverride` setting to `All` or `FileInfo`.
If your web server is Apache,
you need to set the `AllowOverride` setting to `All` or `FileInfo`.
#### Update
@ -126,7 +130,8 @@ server {
## Other dependencies
You need [avconv](https://libav.org/avconv.html) and [rtmpdump](http://rtmpdump.mplayerhq.hu/) in order to enable conversions.
You need [avconv](https://libav.org/avconv.html) and [rtmpdump](http://rtmpdump.mplayerhq.hu/)
in order to enable conversions.
If you don't want to enable conversions, you can disable it in `config.yml`.
On Debian-based systems:
@ -135,7 +140,8 @@ On Debian-based systems:
sudo apt-get install libav-tools rtmpdump
```
You also probably need to edit the `avconv` variable in `config.yml` so that it points to your ffmpeg/avconv binary (`/usr/bin/avconv` on Debian/Ubuntu).
You also probably need to edit the `avconv` variable in `config.yml`
so that it points to your ffmpeg/avconv binary (`/usr/bin/avconv` on Debian/Ubuntu).
## Use as library

View file

@ -19,6 +19,7 @@
"grunt-githash": "~0.1.3",
"grunt-jslint": "~1.1.15",
"grunt-jsonlint": "~1.1.0",
"grunt-markdownlint": "~1.0.43",
"grunt-phpcs": "~0.4.0",
"grunt-phpdocumentor": "~0.4.1",
"grunt-phpunit": "~0.3.6"

View file

@ -4,7 +4,8 @@
## My browser plays the video. How do I download it?
Most recent browsers automatically play a video if it is a format they know how to play.
Most recent browsers automatically play a video
if it is a format they know how to play.
You can ususally download the video by doing *File > Save to* or *ctrl + S*.
## How do I change config parameters?
@ -56,13 +57,16 @@ Then push the code to Heroku and it should work out of the box.
## Why can't I download videos from some websites (e.g. Dailymotion)
Some websites generate an unique video URL for each IP address. When using Alltube, the URL is generated for our server's IP address and your computer is not allowed to use it.
Some websites generate an unique video URL for each IP address.
When using Alltube, the URL is generated for our server's IP address
and your computer is not allowed to use it.
There are two known workarounds:
* You can run Alltube locally on your computer.
* You can enable streaming videos through the server (see below).
Please note that this can use a lot of resources on the server (which is why we won't enable it on alltubedownload.net).
Please note that this can use a lot of resources on the server
(which is why we won't enable it on alltubedownload.net).
## CSS and JavaScript files are missing
@ -74,7 +78,8 @@ You need to either:
## I get a 404 error on every page except the index
This is probably because your server does not have mod_rewrite or AllowOverride is disabled.
This is probably because your server does not have mod_rewrite
or AllowOverride is disabled.
You can work around this by adding this to your `config.yml` file:
```yaml
@ -101,7 +106,8 @@ Alltube can rename videos automatically if you enable streaming (see above).
## I want to download a video that isn't available in my country
If the video is available in the server's country, you can download it if you enable streaming (see above).
If the video is available in the server's country,
you can download it if you enable streaming (see above).
## How do I run the Docker image?
@ -114,7 +120,9 @@ docker run -p 8080:80 rudloff/alltube
You should be able to use `heroku local` like this:
```bash
sudo APACHE_LOCK_DIR=. APACHE_PID_FILE=./pid APACHE_RUN_USER=www-data APACHE_RUN_GROUP=www-data APACHE_LOG_DIR=. heroku local
sudo APACHE_LOCK_DIR=. APACHE_PID_FILE=./pid APACHE_RUN_USER=www-data \
APACHE_RUN_GROUP=www-data APACHE_LOG_DIR=. \
heroku local
```
You might need to create some symlinks before that:
@ -124,7 +132,8 @@ ln -s /usr/sbin/apache2 /usr/sbin/httpd
ln -s /usr/sbin/php-fpm7.0 /usr/sbin/php-fpm
```
And you probably need to run this in another terminal after `heroku local` has finished launching `php-fpm`:
And you probably need to run this in another terminal
after `heroku local` has finished launching `php-fpm`:
```bash
chmod 0667 /tmp/heroku.fcgi.5000.sock
@ -137,4 +146,5 @@ So Alltube will offer you video-only and audio-only formats in the format list.
You then need to merge them together with a tool like ffmpeg.
You can also enable the experimental remux mode that will merge the best video and the best audio format on the fly.
You can also enable the experimental remux mode
that will merge the best video and the best audio format on the fly.

View file

@ -74,7 +74,7 @@ are-we-there-yet@~1.1.2:
delegates "^1.0.0"
readable-stream "^2.0.6"
argparse@^1.0.2:
argparse@^1.0.2, argparse@^1.0.7:
version "1.0.9"
resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.9.tgz#73d83bc263f86e97f8cc4f6bae1b0e90a7d22c86"
dependencies:
@ -403,6 +403,10 @@ end-of-stream@^1.0.0, end-of-stream@^1.1.0:
dependencies:
once "^1.4.0"
entities@~1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.1.tgz#6e5c2d0a5621b5dadaecef80b90edfb5cd7772f0"
error-ex@^1.2.0:
version "1.3.1"
resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.1.tgz#f855a86ce61adc4e8621c3cda21e7a7612c3a8dc"
@ -717,6 +721,12 @@ grunt-legacy-util@~1.0.0:
underscore.string "~3.2.3"
which "~1.2.1"
grunt-markdownlint@~1.0.43:
version "1.0.43"
resolved "https://registry.yarnpkg.com/grunt-markdownlint/-/grunt-markdownlint-1.0.43.tgz#afcd3bbab5a5a293bf0050010a7fa9fdea38eca6"
dependencies:
markdownlint "^0.6.1"
grunt-phpcs@~0.4.0:
version "0.4.0"
resolved "https://registry.yarnpkg.com/grunt-phpcs/-/grunt-phpcs-0.4.0.tgz#a08d625fc64465e453b2bd93f810b2a81e94bdaa"
@ -972,6 +982,12 @@ lazystream@^1.0.0:
dependencies:
readable-stream "^2.0.5"
linkify-it@^2.0.0:
version "2.0.3"
resolved "https://registry.yarnpkg.com/linkify-it/-/linkify-it-2.0.3.tgz#d94a4648f9b1c179d64fa97291268bdb6ce9434f"
dependencies:
uc.micro "^1.0.1"
livereload-js@^2.2.0:
version "2.2.2"
resolved "https://registry.yarnpkg.com/livereload-js/-/livereload-js-2.2.2.tgz#6c87257e648ab475bc24ea257457edcc1f8d0bc2"
@ -1009,6 +1025,22 @@ map-obj@^1.0.0, map-obj@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-1.0.1.tgz#d933ceb9205d82bdcf4886f6742bdc2b4dea146d"
markdown-it@8.3.2:
version "8.3.2"
resolved "https://registry.yarnpkg.com/markdown-it/-/markdown-it-8.3.2.tgz#df4b86530d17c3bc9beec3b68d770b92ea17ae96"
dependencies:
argparse "^1.0.7"
entities "~1.1.1"
linkify-it "^2.0.0"
mdurl "^1.0.1"
uc.micro "^1.0.3"
markdownlint@^0.6.1:
version "0.6.4"
resolved "https://registry.yarnpkg.com/markdownlint/-/markdownlint-0.6.4.tgz#7fa77e0d8c1b1c3ed7978761ce664bd23e7328ef"
dependencies:
markdown-it "8.3.2"
maxmin@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/maxmin/-/maxmin-1.1.0.tgz#71365e84a99dd8f8b3f7d5fde2f00d1e7f73be61"
@ -1027,6 +1059,10 @@ maxmin@^2.1.0:
gzip-size "^3.0.0"
pretty-bytes "^3.0.0"
mdurl@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/mdurl/-/mdurl-1.0.1.tgz#fe85b2ec75a59037f2adfec100fd6c601761152e"
media-typer@0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748"
@ -1666,6 +1702,10 @@ typedarray@^0.0.6:
version "0.0.6"
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
uc.micro@^1.0.1, uc.micro@^1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-1.0.3.tgz#7ed50d5e0f9a9fb0a573379259f2a77458d50192"
uglify-js@~3.2.0:
version "3.2.2"
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.2.2.tgz#870e4b34ed733d179284f9998efd3293f7fd73f6"