Skip to content

Commit

Permalink
Dil dosyaları bulunamadığında indirme eklendi
Browse files Browse the repository at this point in the history
  • Loading branch information
gamerYazilimci45 committed Nov 22, 2024
1 parent c9ee6b6 commit c2454d3
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 13 deletions.
19 changes: 6 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Anka

Anka Browser v1.9
Anka Browser v1.9.5

## What is Anka Browser?

Expand All @@ -12,12 +12,13 @@ You can download and use Anka Browser in every Python installed device.

---

## Anka v1.9 Beta:
## Anka v1.9.5:

- ### Bookmarks Beta:
Now, bookmars added. But beta version.

- ### Better Project Struct

- ### Bookmarks:
Now, bookmars added.

- ### Languages:
Now, Anka Browser is support two language. Türkçe(Turkish) and English. You can change language from settings.

Expand Down Expand Up @@ -46,14 +47,6 @@ You can download and use Anka Browser in every Python installed device.
![Screenshot2](./.github/docs/img/image2.png)
![Screenshot3](./.github/docs/img/image3.png)

## Imported Python libraries in project:

- PyQt6
- sys
- os
- configparser
- json

## How I download Anka Browser?
- Download latest version from Releases.
- And extract it.
Expand Down
29 changes: 29 additions & 0 deletions anka-browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
import configparser
import json
import re
import requests

tr_json_url = "https://raw.githubusercontent.com/gamerYazilimci45/Anka/main/public/browser/languages/tr-TR.json"
en_json_url = "https://raw.githubusercontent.com/gamerYazilimci45/Anka/main/public/browser/languages/en-US.json"

home = os.path.expanduser('~')
config_anka = f"{home}/.config/Anka"
Expand All @@ -16,6 +19,19 @@
os.makedirs(config_anka)

config_path = f"{config_anka}/config.conf"
browser_path = f"{config_anka}/public/browser"


if not os.path.exists(browser_path):
os.makedirs(browser_path)


languages_path = f"{browser_path}/languages"
if not os.path.exists(languages_path):
os.makedirs(languages_path)

tr_json = f"{languages_path}/tr-TR.json"
en_json = f"{languages_path}/en-EN.json"

if not os.path.exists(config_path):
with open(config_path, 'w') as cf:
Expand All @@ -30,6 +46,19 @@
language = tr-TR
""")

if not os.path.exists(tr_json):
response = requests.get(tr_json_url)
response.raise_for_status()

with open(tr_json, 'x', encoding="utf-8") as jsonn:
json.dump(response.json(), jsonn, ensure_ascii=False, indent=4)

if not os.path.exists(en_json):
response = requests.get(en_json_url)
response.raise_for_status()

with open(en_json, 'x', encoding="utf-8") as jsonn:
json.dump(response.json(), jsonn, ensure_ascii=False, indent=4)

config = configparser.ConfigParser()
config.read(config_path)
Expand Down

0 comments on commit c2454d3

Please sign in to comment.