fdroid-server/fdroidserver
Hans-Christoph Steiner 0183592526
update: insert donation links based on FUNDING.yml
GitHub has specified FUNDING.yml, a file to include in a git repo for
pointing people to donation links.  Since F-Droid also points people
to donation links, this parses them to fill out Donate:
and OpenCollective:.  Specifying those in the metadata file takes
precedence over the FUNDING.yml.  This follows the same pattern as how
`fdroid update` includes Fastlane/Triple-T metadata.  This lets the
git repo maintain those specific donations links themselves.

https://help.github.com/en/articles/displaying-a-sponsor-button-in-your-repository#about-funding-files

The test file was generated using:

```python
import os, re, yaml

found = dict()
for root, dirs, files in os.walk('.'):
    for f in files:
        if f == 'FUNDING.yml':
            with open(os.path.join(root, f)) as fp:
                data = yaml.safe_load(fp)
            for k, v in data.items():
                if k not in found:
                    found[k] = set()
                if not v:
                    continue
                if isinstance(v, list):
                    for i in v:
                        found[k].add(i)
                else:
                    found[k].add(v)

            with open('gather-funding-names.yaml', 'w') as fp:
                output = dict()
                for k, v in found.items():
                    output[k] = sorted(v)
                yaml.dump(output, fp, default_flow_style=False)
```
2020-06-16 15:35:26 +02:00
..
asynchronousfilereader Add asynchronous filereader, fix python3 lockups 2015-09-20 20:57:53 +02:00
__init__.py fix egg-link and easy_install support for Python3 2017-10-19 23:28:13 +02:00
__main__.py implement plugin system review suggestsions 2020-06-10 18:43:23 +02:00
btlog.py use defusedxml to avoid DoS attacks while loading XML 2018-08-29 17:44:54 +02:00
build.py scanner: add a simple scan for blacklisted classes after build step 2020-06-15 18:03:19 +00:00
checkupdates.py checkupdates: write status JSON 2020-02-18 23:45:52 +01:00
common.py scanner: add a simple scan for blacklisted classes after build step 2020-06-15 18:03:19 +00:00
exception.py checkupdates: don't fail when we can't init submodules 2017-12-04 16:30:37 +01:00
gpgsign.py gpgsign: write status JSON 2020-02-19 14:50:26 +01:00
import.py Detect .gitmodules and add submodules build line 2020-06-11 16:36:54 +03:00
index.py index: xml.dom.minidom no longer sorts attribs 2020-04-15 21:53:39 +02:00
init.py logging.warn() was deprecated in Python 3.3, use logging.warning() 2020-05-27 08:35:14 +02:00
install.py logging.warn() was deprecated in Python 3.3, use logging.warning() 2020-05-27 08:35:14 +02:00
lint.py lint: fix pyflakes 2020-06-02 22:05:18 +02:00
metadata.py update: insert donation links based on FUNDING.yml 2020-06-16 15:35:26 +02:00
mirror.py mirror: make .asc downloading opt-in with --pgp-signatures 2020-01-31 15:38:02 +01:00
net.py set F-Droid HTTP Headers globally 2020-03-11 13:41:13 +01:00
nightly.py Fix nightly --archive-older command line option 2020-05-11 10:23:26 -03:00
publish.py publish: write status JSON 2020-02-19 14:50:24 +01:00
readmeta.py all: make newer pycodestyle happy 2016-11-15 20:55:06 +00:00
rewritemeta.py rewritemeta: refactor supported list to module variable SUPPORTED_FORMATS 2019-08-27 15:38:40 +02:00
scanner.py scanner: add a simple scan for blacklisted classes after build step 2020-06-15 18:03:19 +00:00
server.py logging.warn() was deprecated in Python 3.3, use logging.warning() 2020-05-27 08:35:14 +02:00
signatures.py logging.warn() was deprecated in Python 3.3, use logging.warning() 2020-05-27 08:35:14 +02:00
signindex.py signindex: write status JSON 2020-02-19 14:50:30 +01:00
stats.py fix PEP8 W605 invalid escape sequence 2018-05-29 13:51:47 +02:00
tail.py remove redundant open() arg: encoding='utf8' 2018-10-19 15:01:34 +02:00
update.py update: insert donation links based on FUNDING.yml 2020-06-16 15:35:26 +02:00
verify.py update: write status in JSON repo file, using new internal API 2020-02-18 23:45:48 +01:00
vmtools.py logging.warn() was deprecated in Python 3.3, use logging.warning() 2020-05-27 08:35:14 +02:00