{"id":21085471,"url":"https://github.com/falsovsky/anavnet","last_synced_at":"2025-03-14T05:20:23.123Z","repository":{"id":57410252,"uuid":"146151622","full_name":"falsovsky/anavnet","owner":"falsovsky","description":"Client library to the AnavNet website, which provides the current warnings from the Portuguese maritime ports","archived":false,"fork":false,"pushed_at":"2018-08-28T21:48:42.000Z","size":24,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-22T03:45:25.320Z","etag":null,"topics":["beautifulsoup","maritime","ports","portugal","python","requests","warnings"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/anavnet/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/falsovsky.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}},"created_at":"2018-08-26T04:36:18.000Z","updated_at":"2022-09-25T08:27:41.000Z","dependencies_parsed_at":"2022-08-29T08:31:10.583Z","dependency_job_id":null,"html_url":"https://github.com/falsovsky/anavnet","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/falsovsky%2Fanavnet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/falsovsky%2Fanavnet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/falsovsky%2Fanavnet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/falsovsky%2Fanavnet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/falsovsky","download_url":"https://codeload.github.com/falsovsky/anavnet/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243527155,"owners_count":20305168,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["beautifulsoup","maritime","ports","portugal","python","requests","warnings"],"created_at":"2024-11-19T20:33:34.964Z","updated_at":"2025-03-14T05:20:23.084Z","avatar_url":"https://github.com/falsovsky.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AnavNet\n\nClient library to the [AnavNet](http://anavnet.hidrografico.pt/AvisosLocais/AvisosLocais.aspx) website, which provides the current warnings from the Portuguese maritime ports.\n* Includes all the available port names and identifiers.\n* Counts the total messages per port.\n* Extracts all the information from the messages.\n* Includes a console script to consume the library.\n\n### Requirements\n\n* [Beautiful Soup](https://www.crummy.com/software/BeautifulSoup/)\n* [Requests](http://docs.python-requests.org/en/master/)\n\n### Installation\n\n```sh\n$ pip install anavnet\n```\n\n### Usage\n\n#### Library\n\n```python\n\u003e\u003e\u003e from anavnet import AnavNet\n\u003e\u003e\u003e anavnet = AnavNet()\n\u003e\u003e\u003e anavnet.set_port(16)\n\u003e\u003e\u003e anavnet.get_total_messages()\n\u003e\u003e\u003e 12\n\u003e\u003e\u003e anavnet.get_message(1)\n{'num_aviso': '288/18', 'dt_promulgacao': '23-Ago-2018', 'dt_inicio': '24-Ago-2018', 'dt_fim': '05-Set-2018', 'ent_promulgacao': 'Capitania do Porto de Lisboa - CAPIMARLISBOA', 'local': 'Rio Tejo - Cais Militar do Portinho da Costa.', 'assunto': 'Área interdita à navegação', 'descricao': 'No período de 24AGO a 05SET, está interdita a navegação a menos de 50 metros do Cais Militar do Portinho da Costa.', 'dt_cancelamento': 'Data de cancelamento: 05-Set-2018'}\n```\n\n#### Console script:\n\n```sh\n$ anavclient --help\n\nusage: anavclient [-h]\n                  (--list | --total TOTAL | --text TEXT TEXT | --json JSON JSON)\n\noptional arguments:\n  -h, --help        show this help message and exit\n  --list            Lists available ports\n  --total TOTAL     Gets the total of messages. Argument: PORT_ID\n  --text TEXT TEXT  Get message as formatted text. Arguments: PORT_ID, MESSAGE_INDEX\n  --json JSON JSON  Get message as JSON. Arguments: PORT_ID, MESSAGE_INDEX\n```\n \n### Tests\n\n```sh\n$ python -m unittest discover -s tests\n```\n\nLicense\n----\n\nBSD-3-Clause\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffalsovsky%2Fanavnet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffalsovsky%2Fanavnet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffalsovsky%2Fanavnet/lists"}