{"id":15510609,"url":"https://github.com/kortirso/galnora","last_synced_at":"2025-03-15T19:26:02.481Z","repository":{"id":62429758,"uuid":"202876708","full_name":"kortirso/galnora","owner":"kortirso","description":null,"archived":false,"fork":false,"pushed_at":"2019-08-21T11:07:43.000Z","size":32,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-23T02:37:38.776Z","etag":null,"topics":["elixir","elixir-lang","elixir-library"],"latest_commit_sha":null,"homepage":null,"language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kortirso.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-08-17T12:13:31.000Z","updated_at":"2019-08-21T11:07:45.000Z","dependencies_parsed_at":"2022-11-01T20:09:47.767Z","dependency_job_id":null,"html_url":"https://github.com/kortirso/galnora","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kortirso%2Fgalnora","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kortirso%2Fgalnora/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kortirso%2Fgalnora/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kortirso%2Fgalnora/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kortirso","download_url":"https://codeload.github.com/kortirso/galnora/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243779406,"owners_count":20346715,"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":["elixir","elixir-lang","elixir-library"],"created_at":"2024-10-02T09:49:49.072Z","updated_at":"2025-03-15T19:26:02.445Z","avatar_url":"https://github.com/kortirso.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Galnora\n\nGenServer for translating words or phrases in background mode with Elixir.\nYou can use this server as separate application or include it in your Phoenix project.\n\n## Installation\n\nIf [available in Hex](https://hex.pm/docs/publish), the package can be installed\nby adding `galnora` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:galnora, \"~\u003e 0.1.4\"}\n  ]\nend\n\ndef application do\n  [\n    extra_applications: [..., :galnora]\n  ]\nend\n```\n\n## Mnesia Setup\n\nTo persist messages across application restarts, specify the DB path in your `config.exs`:\n\n```elixir\nconfig :mnesia, dir: '.mnesia/#{Mix.env}/#{node()}' # Notice the single quotes\n```\n\nAnd run the following mix task:\n\n```bash\nmix galnora.setup\n\nMIX_ENV=test mix galnora.setup\n```\n\n## Usage\n\n### Add job to Galnora server\n\nBy adding job to server you starts separate process as background job.\n\n```elixir\nGalnora.Server.add_job(sentences, job_attrs)\n```\n\n#### Options\n\n    sentences - list of tuples for translation, like [{uid, input}, ...]\n        uid - identificator, string\n        input - text for translation, string\n    job_attrs - attributes for job as map\n        uid - identificator, string\n        type - type of translating service, atom, available [:systran]\n        from - source language, ISO 639-1 format (like \"en\"), string\n        to - target language, ISO 639-1 format (like \"ru\"), string\n        keys - map for keys, for example, for Systran - %{key: \"API_KEY\"}\n\n\n### Get job from Galnora server by uid\n\nGet job information from server. Status of job can be active, completed or failed.\n\n```elixir\nGalnora.Server.get_job(job_uid)\n```\n\n#### Options\n\n    job_uid - identificator for job\n\n\n### Get job's sentences from Galnora server by job's uid\n\nYou can get results of translation.\n\n```elixir\nGalnora.Server.get_job_with_sentences(job_uid)\n```\n\n#### Options\n\n    job_uid - identificator for job\n\n\n### Delete job from Galnora server by uid\n\nIf job is completed or failed you can just delete it with all sentences.\n\n```elixir\nGalnora.Server.delete_job(job_uid)\n```\n\n#### Options\n\n    job_uid - identificator for job\n\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/kortirso/galnora.\n\n## License\n\nThe package is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n\n## Disclaimer\n\nUse this package at your own peril and risk.\n\n## Documentation\n\nDocumentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc)\nand published on [HexDocs](https://hexdocs.pm). Once published, the docs can\nbe found at [https://hexdocs.pm/galnora](https://hexdocs.pm/galnora).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkortirso%2Fgalnora","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkortirso%2Fgalnora","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkortirso%2Fgalnora/lists"}