Skip to content

Commit

Permalink
Fix qgis#88 disable flickr harvest by default
Browse files Browse the repository at this point in the history
  • Loading branch information
timlinux committed Jan 16, 2023
1 parent 45610ae commit e7a4d9a
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 8 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,18 @@ There is a github action that will run the tests automatically on PR submission,

See ```.github/workflows/e2e.yml```

## Content Harvesting

You can harvest data from various feeds using the fetch_feeds.py script. By default
flickr harvesting is disabled in this script so run it manually and review the content
to see if it is suitable for publication on our site.

```bash
./fetch_feeds.py --flickr=yes
```

This script is run nightly as a github action (see .github/workflows/update-feeds.yml).

## Search Functionality
The search functionality uses both [FuseJS](https://fusejs.io/) and [MarkJS](https://markjs.io/).

Expand Down
29 changes: 21 additions & 8 deletions fetch_feeds.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# (c) Tim Sutton, 2023

import requests
import argparse
import json
import shutil
import os
Expand Down Expand Up @@ -168,16 +169,28 @@ def fetch_blog_feed(showcase_type, rss_url):
print(f"Writing: {image_filename}")
del response


parser = argparse.ArgumentParser(description='Import items from various feeds.')
parser.add_argument(
"--flickr",
help="Import flickr items (defaults to no)",
default="no",
type=bool,
required=False)
parser.parse_args()
args = parser.parse_args()

fetch_funders()

fetch_flickr_screenshots(
showcase_type="map",
rss_url = "https://api.flickr.com/services/feeds/groups_pool.gne?id=2244553@N22&lang=en-us&format=atom"
)
fetch_flickr_screenshots(
showcase_type="screenshot",
rss_url = "https://api.flickr.com/services/feeds/groups_pool.gne?id=2327386@N22&lang=en-us&format=atom"
)
if args.flickr:
fetch_flickr_screenshots(
showcase_type="map",
rss_url = "https://api.flickr.com/services/feeds/groups_pool.gne?id=2244553@N22&lang=en-us&format=atom"
)
fetch_flickr_screenshots(
showcase_type="screenshot",
rss_url = "https://api.flickr.com/services/feeds/groups_pool.gne?id=2327386@N22&lang=en-us&format=atom"
)

# Planet blog aggregator
fetch_blog_feed(
Expand Down

0 comments on commit e7a4d9a

Please sign in to comment.