Upload folder using huggingface_hub
Browse files- .gitignore +3 -1
- Taskfile.yml +18 -0
- __pycache__/reshare_odmiany.cpython-314.pyc +0 -0
- __pycache__/reshare_wordgames.cpython-314.pyc +0 -0
- links.json +1 -1
- main.py +13 -1
- pyproject.toml +1 -0
- reshare_odmiany.py +54 -0
- reshare_wordgames.py +54 -0
- sjp.pl_sl_growy.md +33 -0
- uv.lock +20 -0
.gitignore
CHANGED
|
@@ -1 +1,3 @@
|
|
| 1 |
-
.venv
|
|
|
|
|
|
|
|
|
| 1 |
+
.venv
|
| 2 |
+
*.txt
|
| 3 |
+
*.zip
|
Taskfile.yml
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# https://taskfile.dev
|
| 2 |
+
|
| 3 |
+
version: '3'
|
| 4 |
+
|
| 5 |
+
vars:
|
| 6 |
+
GREETING: Hello, World!
|
| 7 |
+
|
| 8 |
+
tasks:
|
| 9 |
+
download_words_variations:
|
| 10 |
+
cmds:
|
| 11 |
+
- uv run python reshare_odmiany.py
|
| 12 |
+
download_game_words:
|
| 13 |
+
cmds:
|
| 14 |
+
- uv run python reshare_wordgames.py
|
| 15 |
+
default:
|
| 16 |
+
cmds:
|
| 17 |
+
- uv run python main.py
|
| 18 |
+
silent: true
|
__pycache__/reshare_odmiany.cpython-314.pyc
ADDED
|
Binary file (2.56 kB). View file
|
|
|
__pycache__/reshare_wordgames.cpython-314.pyc
ADDED
|
Binary file (2.56 kB). View file
|
|
|
links.json
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
[
|
|
|
|
| 1 |
+
["https://www.gnu.org/licenses/old-licenses/gpl-2.0.html", "https://sjp.pl/sl/odmiany/#", "https://creativecommons.org/licenses/by/4.0/", "https://sjp.pl/sl/growe/", "https://sjp.pl/sl/los/", "https://sjp.pl/sl/growy/sjp-20260301.zip", "https://sjp.pl/sl/dp.phtml", "https://sjp.pl/sl/ok.phtml", "https://sjp.pl/sl/lp.phtml?so=3", "https://sjp.pl/sl/po.phtml", "https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html", "https://sjp.pl/sl/growy/#", "https://www.apache.org/licenses/LICENSE-2.0.html", "https://sjp.pl/", "https://sjp.pl/sl/odmiany/sjp-odm-20260301.zip"]
|
main.py
CHANGED
|
@@ -1,6 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
def main():
|
| 2 |
print("Hello from 0316cd20dc99e2cac3989b72a78fe43e!")
|
| 3 |
|
| 4 |
|
| 5 |
if __name__ == "__main__":
|
| 6 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from huggingface_hub import login, upload_folder
|
| 2 |
+
import reshare_odmiany
|
| 3 |
+
import reshare_wordgames
|
| 4 |
+
|
| 5 |
+
|
| 6 |
def main():
|
| 7 |
print("Hello from 0316cd20dc99e2cac3989b72a78fe43e!")
|
| 8 |
|
| 9 |
|
| 10 |
if __name__ == "__main__":
|
| 11 |
+
|
| 12 |
+
login()
|
| 13 |
+
|
| 14 |
+
upload_folder(
|
| 15 |
+
folder_path=".",
|
| 16 |
+
repo_id="Apokryf/SJP",
|
| 17 |
+
repo_type="dataset"
|
| 18 |
+
)
|
pyproject.toml
CHANGED
|
@@ -7,6 +7,7 @@ readme = "README.md"
|
|
| 7 |
requires-python = ">=3.14"
|
| 8 |
dependencies = [
|
| 9 |
"beautifulsoup4>=4.14.3",
|
|
|
|
| 10 |
"huggingface-hub>=1.6.0",
|
| 11 |
"markdownify>=1.2.2",
|
| 12 |
"pyyaml>=6.0.3",
|
|
|
|
| 7 |
requires-python = ">=3.14"
|
| 8 |
dependencies = [
|
| 9 |
"beautifulsoup4>=4.14.3",
|
| 10 |
+
"go-task-bin>=3.49.1",
|
| 11 |
"huggingface-hub>=1.6.0",
|
| 12 |
"markdownify>=1.2.2",
|
| 13 |
"pyyaml>=6.0.3",
|
reshare_odmiany.py
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# code by Sett Sarverott A.A.B. @ 2026
|
| 2 |
+
# Inceptorium Apokryf for SJP
|
| 3 |
+
# on terms of license GNU GPL 2.0
|
| 4 |
+
|
| 5 |
+
|
| 6 |
+
import requests
|
| 7 |
+
import bs4
|
| 8 |
+
import markdownify
|
| 9 |
+
import zipfile
|
| 10 |
+
import urllib
|
| 11 |
+
import json
|
| 12 |
+
|
| 13 |
+
sjpUrl = "https://sjp.pl/sl/odmiany/"
|
| 14 |
+
mdfiedFile ="./sjp.pl_sl_odmiany.md"
|
| 15 |
+
sjpZip = "./sjp.odmiany.zip"
|
| 16 |
+
|
| 17 |
+
sourceserver = requests.get(sjpUrl)
|
| 18 |
+
|
| 19 |
+
with open(mdfiedFile, "w") as sjpPage:
|
| 20 |
+
sjpPage.write(markdownify.markdownify(sourceserver.text))
|
| 21 |
+
|
| 22 |
+
with open("./links.json", "r") as sjpPage:
|
| 23 |
+
links = set(json.loads(sjpPage.read()))
|
| 24 |
+
|
| 25 |
+
# links = set()
|
| 26 |
+
|
| 27 |
+
webpage = bs4.BeautifulSoup(sourceserver.text)
|
| 28 |
+
|
| 29 |
+
for link in webpage.find_all("a"):
|
| 30 |
+
print(link)
|
| 31 |
+
try:
|
| 32 |
+
links.add(
|
| 33 |
+
urllib.parse.urljoin(sjpUrl, str(link.get("href")))
|
| 34 |
+
)
|
| 35 |
+
except Exception as error:
|
| 36 |
+
print("ERROR:", error)
|
| 37 |
+
|
| 38 |
+
|
| 39 |
+
with open("./links.json", "w") as sjpPage:
|
| 40 |
+
sjpPage.write(json.dumps(list(links)))
|
| 41 |
+
|
| 42 |
+
print(links)
|
| 43 |
+
|
| 44 |
+
for link in links:
|
| 45 |
+
print("ZIPTEST", link[-4:], link[-4:]==".zip")
|
| 46 |
+
if link[-4:]==".zip":
|
| 47 |
+
sjpDownload = requests.get(link)
|
| 48 |
+
with open(sjpZip, 'wb') as fd:
|
| 49 |
+
for chunk in sjpDownload.iter_content(chunk_size=128):
|
| 50 |
+
fd.write(chunk)
|
| 51 |
+
|
| 52 |
+
# print(zipfile.ZipInfo("./sjp.zip"))
|
| 53 |
+
|
| 54 |
+
zipfile.ZipFile(sjpZip).extractall()
|
reshare_wordgames.py
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# code by Sett Sarverott A.A.B. @ 2026
|
| 2 |
+
# Inceptorium Apokryf for SJP
|
| 3 |
+
# on terms of license GNU GPL 2.0
|
| 4 |
+
|
| 5 |
+
|
| 6 |
+
import requests
|
| 7 |
+
import bs4
|
| 8 |
+
import markdownify
|
| 9 |
+
import zipfile
|
| 10 |
+
import urllib
|
| 11 |
+
import json
|
| 12 |
+
|
| 13 |
+
sjpUrl = "https://sjp.pl/sl/growy/"
|
| 14 |
+
mdfiedFile ="./sjp.pl_sl_growy.md"
|
| 15 |
+
sjpZip = "./sjp.growy.zip"
|
| 16 |
+
|
| 17 |
+
sourceserver = requests.get(sjpUrl)
|
| 18 |
+
|
| 19 |
+
with open(mdfiedFile, "w") as sjpPage:
|
| 20 |
+
sjpPage.write(markdownify.markdownify(sourceserver.text))
|
| 21 |
+
|
| 22 |
+
with open("./links.json", "r") as sjpPage:
|
| 23 |
+
links = set(json.loads(sjpPage.read()))
|
| 24 |
+
|
| 25 |
+
# links = set()
|
| 26 |
+
|
| 27 |
+
webpage = bs4.BeautifulSoup(sourceserver.text)
|
| 28 |
+
|
| 29 |
+
for link in webpage.find_all("a"):
|
| 30 |
+
print(link)
|
| 31 |
+
try:
|
| 32 |
+
links.add(
|
| 33 |
+
urllib.parse.urljoin(sjpUrl, str(link.get("href")))
|
| 34 |
+
)
|
| 35 |
+
except Exception as error:
|
| 36 |
+
print("ERROR:", error)
|
| 37 |
+
|
| 38 |
+
|
| 39 |
+
with open("./links.json", "w") as sjpPage:
|
| 40 |
+
sjpPage.write(json.dumps(list(links)))
|
| 41 |
+
|
| 42 |
+
print(links)
|
| 43 |
+
|
| 44 |
+
for link in links:
|
| 45 |
+
print("ZIPTEST", link[-4:], link[-4:]==".zip")
|
| 46 |
+
if link[-4:]==".zip":
|
| 47 |
+
sjpDownload = requests.get(link)
|
| 48 |
+
with open(sjpZip, 'wb') as fd:
|
| 49 |
+
for chunk in sjpDownload.iter_content(chunk_size=128):
|
| 50 |
+
fd.write(chunk)
|
| 51 |
+
|
| 52 |
+
# print(zipfile.ZipInfo("./sjp.zip"))
|
| 53 |
+
|
| 54 |
+
zipfile.ZipFile(sjpZip).extractall()
|
sjp.pl_sl_growy.md
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Słownik do gier (literaki, skrable itp.) - Słownik SJP
|
| 2 |
+
|
| 3 |
+
|
| 4 |
+
|
| 5 |
+
[SJP](/)
|
| 6 |
+
sprawdź
|
| 7 |
+
[\*](/sl/los/ "LOSUJ")
|
| 8 |
+
|
| 9 |
+
SŁOWNIK SJP
|
| 10 |
+
|
| 11 |
+
* [słownik języka polskiego sjp](/)
|
| 12 |
+
* [lista](/sl/lp.phtml?so=3)
|
| 13 |
+
* [komentarze](/sl/ok.phtml)
|
| 14 |
+
* [więcej](/sl/po.phtml)
|
| 15 |
+
|
| 16 |
+
---
|
| 17 |
+
|
| 18 |
+
X
|
| 19 |
+
|
| 20 |
+
Słownik do gier
|
| 21 |
+
===============
|
| 22 |
+
|
| 23 |
+
Do pobrania - lista słów do gier typu literaki, skrable itp. [wg zasad](/sl/dp.phtml) dopuszczalności SJP.PL
|
| 24 |
+
|
| 25 |
+
**<sjp-20260301.zip>** (UTF-8)
|
| 26 |
+
|
| 27 |
+
Licencja:
|
| 28 |
+
[GPL 2](https://www.gnu.org/licenses/old-licenses/gpl-2.0.html),
|
| 29 |
+
[CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)
|
| 30 |
+
|
| 31 |
+
AAA, AARONOWY, ABADANKA, ABAJA, ...
|
| 32 |
+
|
| 33 |
+
**[PRZEGLĄDAJ LISTĘ >](/sl/growe/)**
|
uv.lock
CHANGED
|
@@ -109,6 +109,24 @@ wheels = [
|
|
| 109 |
{ url = "https://files.pythonhosted.org/packages/e6/ab/fb21f4c939bb440104cc2b396d3be1d9b7a9fd3c6c2a53d98c45b3d7c954/fsspec-2026.2.0-py3-none-any.whl", hash = "sha256:98de475b5cb3bd66bedd5c4679e87b4fdfe1a3bf4d707b151b3c07e58c9a2437", size = 202505, upload-time = "2026-02-05T21:50:51.819Z" },
|
| 110 |
]
|
| 111 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 112 |
[[package]]
|
| 113 |
name = "h11"
|
| 114 |
version = "0.16.0"
|
|
@@ -329,6 +347,7 @@ version = "0.1.0"
|
|
| 329 |
source = { virtual = "." }
|
| 330 |
dependencies = [
|
| 331 |
{ name = "beautifulsoup4" },
|
|
|
|
| 332 |
{ name = "huggingface-hub" },
|
| 333 |
{ name = "markdownify" },
|
| 334 |
{ name = "pyyaml" },
|
|
@@ -339,6 +358,7 @@ dependencies = [
|
|
| 339 |
[package.metadata]
|
| 340 |
requires-dist = [
|
| 341 |
{ name = "beautifulsoup4", specifier = ">=4.14.3" },
|
|
|
|
| 342 |
{ name = "huggingface-hub", specifier = ">=1.6.0" },
|
| 343 |
{ name = "markdownify", specifier = ">=1.2.2" },
|
| 344 |
{ name = "pyyaml", specifier = ">=6.0.3" },
|
|
|
|
| 109 |
{ url = "https://files.pythonhosted.org/packages/e6/ab/fb21f4c939bb440104cc2b396d3be1d9b7a9fd3c6c2a53d98c45b3d7c954/fsspec-2026.2.0-py3-none-any.whl", hash = "sha256:98de475b5cb3bd66bedd5c4679e87b4fdfe1a3bf4d707b151b3c07e58c9a2437", size = 202505, upload-time = "2026-02-05T21:50:51.819Z" },
|
| 110 |
]
|
| 111 |
|
| 112 |
+
[[package]]
|
| 113 |
+
name = "go-task-bin"
|
| 114 |
+
version = "3.49.1"
|
| 115 |
+
source = { registry = "https://pypi.org/simple" }
|
| 116 |
+
sdist = { url = "https://files.pythonhosted.org/packages/07/a9/60fac355767bc61929b00df6eea020cd03b28a75bce4834970e279ca65cf/go_task_bin-3.49.1.tar.gz", hash = "sha256:71069d60a34430fe7ab98f6382e69a052fe31033e25fd507c5fd76cf85579e89", size = 613277, upload-time = "2026-03-09T01:48:22.118Z" }
|
| 117 |
+
wheels = [
|
| 118 |
+
{ url = "https://files.pythonhosted.org/packages/1e/aa/7ff2322f45915b6b90b0a8d76edfe217624138a22249faaa0480850a2ec2/go_task_bin-3.49.1-py3-none-android_33_arm64_v8a.whl", hash = "sha256:c73a536ee21d46e01b0d7aeebda89c19f1a7789f3d7c0400efa52012c34a2c51", size = 14575143, upload-time = "2026-03-09T01:47:57.956Z" },
|
| 119 |
+
{ url = "https://files.pythonhosted.org/packages/7b/b5/a2ada4b4cd49e7dedfd9a0bd50a6737ec4c483eaed7c4da84f3d72b50a8d/go_task_bin-3.49.1-py3-none-macosx_12_0_arm64.whl", hash = "sha256:2fd465e0e31aff759437a34455f22ef9c3d0ae60722785cd69dbf31ea62c9aba", size = 14317223, upload-time = "2026-03-09T01:48:00.462Z" },
|
| 120 |
+
{ url = "https://files.pythonhosted.org/packages/32/b7/76825c7b2f5d3388efd8706098f0dd5fd6ae449a4a1a92f8f01b82b09425/go_task_bin-3.49.1-py3-none-macosx_12_0_x86_64.whl", hash = "sha256:53d93a383b4ce178b7d90484432ee54b5e2174d8592dd2f09788abd77e60b532", size = 15473006, upload-time = "2026-03-09T01:48:02.806Z" },
|
| 121 |
+
{ url = "https://files.pythonhosted.org/packages/8e/31/2584763dfda3007b69b6fb60148fb2f53db83ebc18cc584d56f38b7c8e0c/go_task_bin-3.49.1-py3-none-manylinux_2_28_aarch64.musllinux_1_2_aarch64.whl", hash = "sha256:8e50355a6297f46f0a73073d5f0514294f4b3aa348334246d7c7e675685a921a", size = 13581432, upload-time = "2026-03-09T01:48:05.461Z" },
|
| 122 |
+
{ url = "https://files.pythonhosted.org/packages/76/51/d94ecc76d33f30d7e391214fb967d8c807a5df856ca8474257dd0ef69435/go_task_bin-3.49.1-py3-none-manylinux_2_28_ppc64le.musllinux_1_2_ppc64le.whl", hash = "sha256:48b1196a9bd6b4a5c983b2bd80fcc69ff562801399157abc041fd7ce8d3fe3b8", size = 13547073, upload-time = "2026-03-09T01:48:08.305Z" },
|
| 123 |
+
{ url = "https://files.pythonhosted.org/packages/c1/44/0da1afa50823daffd7c94e68aba45f7fa092c3428a673f93d745d4d01b92/go_task_bin-3.49.1-py3-none-manylinux_2_28_riscv64.musllinux_1_2_riscv64.whl", hash = "sha256:356dc1f69a210377e1991f1f4492836913f1442f3cf077a65218d64957b9e8fd", size = 14334540, upload-time = "2026-03-09T01:48:10.364Z" },
|
| 124 |
+
{ url = "https://files.pythonhosted.org/packages/ea/36/afb01ef1008de82fdacc918acff01753d3689c63016d11f7836bf825b8af/go_task_bin-3.49.1-py3-none-manylinux_2_28_s390x.musllinux_1_2_s390x.whl", hash = "sha256:14bc5da0ba332353bd42b5075a37b2762b97beceab6f69f47e4c8622b2ce8905", size = 14846826, upload-time = "2026-03-09T01:48:12.697Z" },
|
| 125 |
+
{ url = "https://files.pythonhosted.org/packages/c2/4c/7663fbc1ca71b02d6c11ba550edc55542357a19a4e940501d46a790b47f6/go_task_bin-3.49.1-py3-none-manylinux_2_28_x86_64.musllinux_1_2_x86_64.whl", hash = "sha256:ae2df58e9a5e414b42d43cbad50270eb9dd8a8b0b64446b22582c8ccaeb9bd27", size = 15098241, upload-time = "2026-03-09T01:48:15.125Z" },
|
| 126 |
+
{ url = "https://files.pythonhosted.org/packages/89/a2/2cc17983161ae5bf3ce57052f40088edc0ad9b8032f58630e688956068f9/go_task_bin-3.49.1-py3-none-win_amd64.whl", hash = "sha256:a3852339cf1882301fe3562f1bd57fe417f9cb197fdc871bf241ead27c0eeff7", size = 15461920, upload-time = "2026-03-09T01:48:17.491Z" },
|
| 127 |
+
{ url = "https://files.pythonhosted.org/packages/5f/73/b1c28a904b2e70acf89f01e4c5c436378659cd59fb92c10f6fcbb5f0f678/go_task_bin-3.49.1-py3-none-win_arm64.whl", hash = "sha256:4b7de50ccf0d8eb124603acf5b4ae1816bdebb60b9b573e0f7e8c4c13d82bf04", size = 13718415, upload-time = "2026-03-09T01:48:19.784Z" },
|
| 128 |
+
]
|
| 129 |
+
|
| 130 |
[[package]]
|
| 131 |
name = "h11"
|
| 132 |
version = "0.16.0"
|
|
|
|
| 347 |
source = { virtual = "." }
|
| 348 |
dependencies = [
|
| 349 |
{ name = "beautifulsoup4" },
|
| 350 |
+
{ name = "go-task-bin" },
|
| 351 |
{ name = "huggingface-hub" },
|
| 352 |
{ name = "markdownify" },
|
| 353 |
{ name = "pyyaml" },
|
|
|
|
| 358 |
[package.metadata]
|
| 359 |
requires-dist = [
|
| 360 |
{ name = "beautifulsoup4", specifier = ">=4.14.3" },
|
| 361 |
+
{ name = "go-task-bin", specifier = ">=3.49.1" },
|
| 362 |
{ name = "huggingface-hub", specifier = ">=1.6.0" },
|
| 363 |
{ name = "markdownify", specifier = ">=1.2.2" },
|
| 364 |
{ name = "pyyaml", specifier = ">=6.0.3" },
|