summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Klichowicz <emkael@tlen.pl>2023-10-06 02:54:56 +0200
committerMichał Klichowicz <emkael@tlen.pl>2023-10-06 02:54:56 +0200
commit1c2497c7d0a2d9d5f58ea1d872bde496f048ffd6 (patch)
tree38f3ed4a61c2d7be624c650ead2403f1663c2d94
parenteb9c5653fc243f41eb353413ad059e53a7516879 (diff)
Ability to force PBN encodingv0.3.1
-rw-r--r--.version8
-rw-r--r--README.md2
-rw-r--r--src/main.py1
3 files changed, 6 insertions, 5 deletions
diff --git a/.version b/.version
index 54f6eb9..0a178b2 100644
--- a/.version
+++ b/.version
@@ -1,8 +1,8 @@
# UTF-8
VSVersionInfo(
ffi=FixedFileInfo(
- filevers=(0, 3, 0, 0),
- prodvers=(0, 3, 0, 0),
+ filevers=(0, 3, 1, 0),
+ prodvers=(0, 3, 1, 0),
# Contains a bitmask that specifies the valid bits 'flags'
mask=0x3f,
# Contains a bitmask that specifies the Boolean attributes of the file.
@@ -26,10 +26,10 @@ VSVersionInfo(
u'040904b0', # 0x0409(1033)= English, 0x04b0(1200)= UTF-8
[StringStruct(u'CompanyName', u'emkael.info'),
StringStruct(u'ProductName', u'teamy_mojzesz'),
- StringStruct(u'ProductVersion', u'0, 3, 0, 0'),
+ StringStruct(u'ProductVersion', u'0, 3, 1, 0'),
StringStruct(u'InternalName', u'teamy_mojzesz'),
StringStruct(u'OriginalFilename', u'mojzesz.exe'),
- StringStruct(u'FileVersion', u'0, 3, 0, 0'),
+ StringStruct(u'FileVersion', u'0, 3, 1, 0'),
StringStruct(
u'FileDescription',
u'LoveBridge tablet PBN import to JFR Teamy events'),
diff --git a/README.md b/README.md
index 1160e8b..7d6dd38 100644
--- a/README.md
+++ b/README.md
@@ -33,7 +33,7 @@ Two main data sources are required to run the script:
* a PBN file accessible via HTTP(S)
* a `mojzesz.json` config file in the current (working) directory
-Sample config file is provided in the repo. `mysql` and `source` sections should be self-explanatory (`auth` section is not required if PBN is not behind HTTP Auth, and `headers` section is just explicitly forwarded to the HTTP(S) request headers).
+Sample config file is provided in the repo. `mysql` and `source` sections should be self-explanatory (`auth` section is not required if PBN is not behind HTTP Auth, and `headers` section is just explicitly forwarded to the HTTP(S) request headers, and `encoding` is optional, to force PBN encoding, defaulting to utf8).
As for `settings` section:
diff --git a/src/main.py b/src/main.py
index 11ad472..8953571 100644
--- a/src/main.py
+++ b/src/main.py
@@ -39,6 +39,7 @@ def get_pbn_source(config):
r = requests.get(config['url'], auth=request_auth, headers=request_headers)
r.raise_for_status()
+ r.encoding = config.get('encoding', 'utf8')
remote_content = r.text
logging.info('Fetched %d bytes', len(remote_content))