Skip to content

Commit 2766dd8

Browse files
authored
Imagecrawler pr0gramm (#185)
1 parent d18bd53 commit 2766dd8

27 files changed

+458
-64
lines changed

HISTORY.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,15 @@
33

44
## Unreleased
55

6+
### Changes
7+
8+
* class `ImageCrawlerInfo` lost support for positional arguments, supports keyword-arguments only - prepare future extensibility.
9+
* class `Image` lost support for positional arguments, supports keyword-arguments only - prepare future extensibility.
10+
11+
### Added
12+
13+
* added image crawler for [pr0gramm](https://pr0gramm.com) - Read the [docs](./docs/imagecrawlers/pr0gramm.md).
14+
615

716
## 2.2.2
817

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212

1313
_nichtparasoup_ is a hackspaces entertainment system.
1414
It randomly displays images from
15-
[instagram](https://instagram.com) and
15+
[instagram](https://instagram.com),
16+
[pr0gramm](https://pr0gramm.com) and
1617
[reddit](https://reddit.com).
1718
Other crawlers are currently removed, but will be back soon.
1819

docs/imagecrawlers/echo.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ More like an Parrot that is trained to repeat what you tell it to say.
99

1010
## Config
1111

12-
### `image_uri`
12+
### `image_uri`
1313

1414
- the URI to the image to show
1515
- type: string

docs/imagecrawlers/instagram_hashtag.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ A Crawler for hash tag posts of [https://www.instagram.com](https://www.instagra
66

77
## Config
88

9-
### `tag_name`
9+
### `tag_name`
1010

1111
- the HashTag on Instagram
1212
- type: string

docs/imagecrawlers/instagram_profile.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ A Crawler for profile pages of [https://www.instagram.com](https://www.instagram
66

77
## Config
88

9-
### `user_name`
9+
### `user_name`
1010

1111
- the UserName on Instagram
1212
- type: string

docs/imagecrawlers/picsum.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ Returns generic URIs to [https://picsum.photos](https://picsum.photos).
77

88
## Config
99

10-
### `with`
10+
### `with`
1111

1212
- the width of the image in pixels.
1313
- type: integer
1414

15-
### `height`
15+
### `height`
1616

1717
- the height of the image in pixels.
1818
- type: integer

docs/imagecrawlers/pr0gramm.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# ImageCrawler: Pr0gramm
2+
3+
## Purpose
4+
5+
A Crawler for [https://pr0gramm.com](https://pr0gramm.com)
6+
7+
8+
## Config
9+
10+
### `promoted`
11+
12+
- Search only top("beliebt") voted content? Otherwise search anything("neu").
13+
- type: boolean
14+
- default: True
15+
- example: False
16+
17+
### `tags`
18+
19+
- None, or a string that starts with "!" - see the German [docs](https://pr0gramm.com/new/2782197).
20+
- type: None or string
21+
- default: None
22+
- example: '!s:500 kadse -text'

docs/imagecrawlers/reddit.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ A Crawler for an arbitrary SubReddit of [https://www.reddit.com](https://www.red
77

88
## Config
99

10-
### `subreddit`
10+
### `subreddit`
1111

1212
- the SubReddit to crawl
1313
- type: string

examples/config/kadsen.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
## This is a config file for nichtprasoup (v2.3)
2+
## This is an example file. For a better kickStart run: nichtparasoup config --help
3+
4+
webserver:
5+
hostname: "0.0.0.0"
6+
port: 8080
7+
8+
imageserver:
9+
crawler_upkeep: 10
10+
11+
crawlers:
12+
- name: "Pr0gramm"
13+
config:
14+
tags: '!s:500 kadse -text'
15+
promoted: True

nichtparasoup/core/image.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ class Image(object):
4949
5050
"""
5151

52-
def __init__(self, uri: ImageUri, source: SourceUri,
52+
def __init__(self, *,
53+
uri: ImageUri, source: SourceUri,
5354
is_generic: bool = False,
5455
**more: Any) -> None: # pragma: no cover
5556
self.uri = uri

0 commit comments

Comments
 (0)