{"id":19270182,"url":"https://github.com/arturfriedrich/linux_project","last_synced_at":"2026-06-10T20:31:00.789Z","repository":{"id":171589528,"uuid":"644820837","full_name":"arturfriedrich/linux_project","owner":"arturfriedrich","description":"Terminál alapú időjárás előrejelző - Ez a projekt a Széchenyi István Egyetem Linux ismeretek tárgyra készült féléves projektként.","archived":false,"fork":false,"pushed_at":"2023-06-06T07:30:05.000Z","size":48,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-23T20:14:16.399Z","etag":null,"topics":["openweathermap-api","shell","szegyetem"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/arturfriedrich.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-05-24T10:23:24.000Z","updated_at":"2023-11-15T22:41:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"84520a5b-9fe6-4fe4-8d51-29b31a4628ba","html_url":"https://github.com/arturfriedrich/linux_project","commit_stats":null,"previous_names":["arturfriedrich/linux_project"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/arturfriedrich/linux_project","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arturfriedrich%2Flinux_project","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arturfriedrich%2Flinux_project/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arturfriedrich%2Flinux_project/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arturfriedrich%2Flinux_project/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arturfriedrich","download_url":"https://codeload.github.com/arturfriedrich/linux_project/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arturfriedrich%2Flinux_project/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34170162,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-10T02:00:07.152Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["openweathermap-api","shell","szegyetem"],"created_at":"2024-11-09T20:23:40.561Z","updated_at":"2026-06-10T20:31:00.772Z","avatar_url":"https://github.com/arturfriedrich.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Terminál alapú időjárás előrejelző\n\nEz a projekt a Széchenyi István Egyetem Linux ismeretek (GKNB_MSTM028) tárgy beadandó feladata.\n\n## A program célja\n\nA program célja egy egyszerű és könnyen használható terminál alapú időjárás-előrejelző program létrehozása, amely képes helyadatok alapján megjeleníteni az aktuális és a várható időjárási adatokat. Az adatokat az OpenWeatherMap API segítségével kapja meg a felhasználó. A program lehetővé teszi további beállításokat, mint például a lokáció megváltoztatása, részletesebb adatok kijelzése, megjelenítendő napok száma és mértékegységek beállítása. A program a karakteres rajzok segítségével egyszerűbbé teszi az információk feldolgozását a felhasználó számára.\n\n## Telepítés és használat\n\n1. A program futtatásához használja a `./main.sh` parancsot.\n2. Ha először használja a programot, meg kell adnia az API kulcsot, amelyet [itt](https://openweathermap.org/api) generálhat bejelentkezés után.\n3. Adjon meg egy várost.\n4. Választhat a következő lehetőségek közül: \"c\" - jelenlegi időjárás, \"f\" - 5 napos előrejelzés.\n\n## Információk\n\nAz alábbi képen látható, hogy az egyes információk mit jelentenek:\n\n\u003cimg width=\"615\" alt=\"image\" src=\"https://github.com/arturfriedrich/linux_project/assets/67378210/d58ad88c-bfe3-44ee-b48a-a2eec14c9f45\"\u003e\n\nA programot macOS 5.2.12 verzió alatt és Linuxon 5.1.4 verzió alatt teszteltem.\n\n## Fejlesztői dokumentáció\n\nA fejlesztés során a programot komponensekre bontottam a jobb átláthatóság és a fejlesztés megkönnyítése érdekében. A következő fájlok tartalmazzák a különböző részegységeket:\n\n- `main.sh`: Ez a fájl tartalmazza a főbb részeket, például az API kulcs bekérését.\n- `current_weather.sh`: Ez a fájl felelős az aktuális időjárás lekérdezéséért.\n- `forecast.sh`: Ez a fájl felelős az időjárás előrejelzéséért.\n- `printer.sh`: Ez a fájl felelős az időjárás kijelzéséért a konzolon.\n\nAz API kulcs bekérésének példa kódrészlete az `main.sh` fájlban található:\n\n```bash\n# Set OpenWeatherMap API key, write your own API key here\napi_key_file=\"apikeyfile.txt\"\n\n# Check if the apikey file already exists\nif [[ ! -e $api_key_file ]]; then\n    # Prompt the user to enter an API key\n    read -p \"Enter your API key: \" api_key\n\n    # Write the API key to the file\n    echo \"$api_key\" \u003e \"$api_key_file\"\n\n    echo \"API key has been saved to $api_key_file.\"\nfi\n\napikey=$(cat apikeyfile.txt)\nAPI_KEY=$apikey\n```\n\nEzután a program bekéri a felhasználótól a város nevét illetve a kiválasztott módot:\n```bash\n# Prompt user to enter a location\nread -p \"Enter a location: \" location\n\n# Prompt user to choose display mode: current weather (c) or forecast (f)\nread -p \"Do you want to display the current weather or the forecast for 5 days: (c/f) \" display_mode\n```\n\nA kiválasztott módnak megfelelőn pedig kijelzi az eredményt a konzolra:\n```bash\n# Check the value of display_mode and take appropriate action\nif [ \"$display_mode\" = \"c\" ]; then\n    # Display current weather information\n    get_weather_information \"$location\"\nelif [ \"$display_mode\" = \"f\" ]; then\n    # Display weather forecast for 5 days\n    get_weather_forecast \"$location\"\nelse\n    echo \"Invalid input!\"\nfi\n```\n\nA jelenlegi időjárának (current_weather.sh) valamint az időjárás előrejelzésnek (furecast.sh) külön fájlt hoztam létre, mivel nagyban különbözik az API válasza, így egyszerűbb volt ezeket így feldolgozni.\n```bash\n# Call OpenWeatherMap API and retrieve weather data\nweather_data=$(curl -s \"http://api.openweathermap.org/data/2.5/weather?q=${location}\u0026appid=${API_KEY}\")\n```\n\nA printer.sh egyszerűen csak kijelzi a kapott értékek alapján az időjárást. Igyekeztem minél több lehetőséget megadni a rajzoknál, viszont lehetnek olyan időjárási körülmények, melyekhez nem tartozik kép, ezt később könnyen pótolni lehet.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farturfriedrich%2Flinux_project","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farturfriedrich%2Flinux_project","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farturfriedrich%2Flinux_project/lists"}