mirror of
https://github.com/kemayo/leech
synced 2026-04-11 15:12:56 +02:00
Set up for Travis
This commit is contained in:
parent
24f7137929
commit
86e36715f1
8 changed files with 38 additions and 2 deletions
15
.editorconfig
Normal file
15
.editorconfig
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
root = true
|
||||
|
||||
[*]
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[*.py]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
charset = utf-8
|
||||
|
||||
[{package.json,.travis.yml}]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
7
.flake8
Normal file
7
.flake8
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
[flake8]
|
||||
ignore =
|
||||
# E128 continuation line under-indented for visual indent
|
||||
# E128,
|
||||
# E501 line too long
|
||||
E501
|
||||
exclude = .git,__pycache__,venv
|
||||
12
.travis.yml
Normal file
12
.travis.yml
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
language: python
|
||||
python:
|
||||
- "3.3"
|
||||
|
||||
install:
|
||||
- pip install -r requirements.txt
|
||||
- pip install flake8
|
||||
- npm install eclint
|
||||
|
||||
script:
|
||||
- flake8 .
|
||||
- eclint check .
|
||||
1
cover.py
1
cover.py
|
|
@ -28,6 +28,7 @@ def make_cover(title, author, width=600, height=800, fontname="Helvetica", fonts
|
|||
output.seek(0)
|
||||
return output
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
f = make_cover('Test of a Title which is quite long and will require multiple lines', 'Some Dude')
|
||||
with open('output.png', 'wb') as out:
|
||||
|
|
|
|||
1
epub.py
1
epub.py
|
|
@ -148,5 +148,6 @@ def make_epub(filename, html_files, meta, extra_files=False, compress=True):
|
|||
|
||||
return filename
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
make_epub('test.epub', [('Chapter 1', 'test/a.html'), ('Chapter 2', 'test/b.html')], {})
|
||||
|
|
|
|||
1
leech.py
1
leech.py
|
|
@ -5,7 +5,6 @@ import sys
|
|||
import json
|
||||
import datetime
|
||||
import http.cookiejar
|
||||
import collections
|
||||
|
||||
import sites
|
||||
import epub
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
import datetime
|
||||
import re
|
||||
from . import register, Site, SiteException, Section, Chapter
|
||||
from . import register, Site, Section, Chapter
|
||||
|
||||
|
||||
@register
|
||||
|
|
|
|||
|
|
@ -75,6 +75,7 @@ class FanFictionNet(Site):
|
|||
|
||||
return text.prettify()
|
||||
|
||||
|
||||
@register
|
||||
class FictionPress(FanFictionNet):
|
||||
@staticmethod
|
||||
|
|
|
|||
Loading…
Reference in a new issue