{"id":18275547,"url":"https://github.com/nin93/genecode-cr","last_synced_at":"2025-04-09T04:12:42.810Z","repository":{"id":236979028,"uuid":"199894718","full_name":"nin93/genecode-cr","owner":"nin93","description":"Caesar Cipher written in Crystal","archived":false,"fork":false,"pushed_at":"2019-11-23T13:50:03.000Z","size":63,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-14T22:32:17.185Z","etag":null,"topics":["caesar-cipher","crystal","crystal-lang","fun"],"latest_commit_sha":null,"homepage":"","language":"Crystal","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/nin93.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":"2019-07-31T16:46:28.000Z","updated_at":"2020-07-17T19:49:58.000Z","dependencies_parsed_at":"2024-04-29T14:06:53.996Z","dependency_job_id":null,"html_url":"https://github.com/nin93/genecode-cr","commit_stats":null,"previous_names":["nin93/genecode-cr"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nin93%2Fgenecode-cr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nin93%2Fgenecode-cr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nin93%2Fgenecode-cr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nin93%2Fgenecode-cr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nin93","download_url":"https://codeload.github.com/nin93/genecode-cr/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247974731,"owners_count":21026742,"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":["caesar-cipher","crystal","crystal-lang","fun"],"created_at":"2024-11-05T12:13:16.149Z","updated_at":"2025-04-09T04:12:42.792Z","avatar_url":"https://github.com/nin93.png","language":"Crystal","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\n# genecode-cr\n\nGenecode XY is a command-line Caesar Cipher developed in Crystal which turns texts into [DNA](https://en.wikipedia.org/wiki/DNA.)-[RNA](https://en.wikipedia.org/wiki/RNA) sections.\nYou can use the command `genecode-cr --encode \"text here\"` to codify an ordinary text, or decode DNA-RNA coded texts like \"TCTGCCUCGUCTGTUUGCAACTCTUATUATAUGUGA\".\n\nYou will need a key to both encode or decode a text. Crypted texts have unique key, of course, but you can choose one from 0 up to 121 for encoding with `--key` option or leave it random by omitting it.\n\nThe wise says:\n\n  *\"This program is for you, those little nerds who want*\n\n  *to explore the beautiful amount of uselessness of talking*\n\n  *whith other little nerds like you in an imaginary language\"*.\n\n  Are you not convinced yet? Give it a try and have fun!\n\n## Installation\n\nInstall [crystal](https://crystal-lang.org/reference/installation) compiler.\n\nThen:\n```bash\ngit clone https://github.com/nin93/genecode-cr.git\ncd genecode-cr\nshards build --release --no-debug\n# Optional: your binary is in bin/\nsudo cp ./bin/genecode-cr /usr/local/bin/\n```\n\n## Usage\n```\ngenecode-cr [-l|-u|-w] [(-e|-d) [-k \u003cKEY\u003e] [TEXT1 TEXT2 ...]]\n```\nMultiple text are allowed.\n\nStandard input is read if no TEXT is given:\n```\n$ echo \"foo\" \"bar\" | genecode-cr -e -k 11\nTUCTCUTCUUGCTUGTACTTTGGTUAG\n```\n\n### Encoding\n\nYou can encode a text without specifying the key, genecode-cr will provide it in that case.\n```\n$ genecode-cr --encode \"I'm encoding with a random key!\"\n[key: 3]\nAGUCACTTCUTATCTGAGTGCGATTCGTTGGAGTCUUTAGUCTTGGUTTCCUTATGAUTAGACTGAGAGTCGGATTTCUTATTATCTGGTUTUUGA\n```\nEvery ASCII printable character is allowed, even newline char. For complete list type `genecode-cr --list`. You can nevertheless go ahead and skip text parsing by including `--unsafe` option.\n\n**NOTE**: key shows up in standard error output.\n\n### Decoding\n\nDecoding is as simple as encoding.\nYou must provide a key in order to decode a text:\n```\n$ genecode-cr --decode -k 17 CTCUUATGTTAATAATATUUAATUUUATUUTAATTAUUUUAA\nI need a key\n```\nHere text format is highly restricted and so do the error parsing, but you won't worry about that if texts come out from genecode-cr itself.\n\n### Error handling\nInvalid characters will cause an exception raise.\n```\n$ genecode-cr -e \"I'm a beautiful text\" \"but I can'ŧ handłe ev€ry cħaractær\"\ngenecode-cr: Invalid characters for text to convert:\nI'm a beautiful text\nbut I can'ŧ handłe ev€ry cħaractær\nProgram ended with exit code 16\n```\nErrors will appear in red:\n![](src/img/error.png)\n\nUse `--unsafe` option avoid exception raising, but output might be broken:\n* Encoding\n```\n$ genecode-cr -e --unsafe \"I can'ŧ handłe ev€ry cħaractær\"\n[key: 46]\nUTGGATCTTCCCAUAGUUGATAATCCCAUACTACTUGATCTUACGAGTACUGATCTTCCCAGTCCCCTTAGUAGTUAG\n```\n```\n$ genecode-cr -d -k 46 UTGGATCTTCCCAUAGUUGATAATCCCAUACTACTUGATCTUACGAGTACUGATCTTCCCAGTCCCCTTAGUAGTUAG\nI can' hande evry caractr\n```\n* Decoding\n```\n$ genecode-cr -d --unsafe -k 59 UCCCTGCTGCTGCooopsTGCTGCTTCTCUAG\nUooo!!+%\n```\nIt was:\n```\n$ genecode-cr -e -k 59 Uooooops\nUCCCTGCTGCTGCTGCTGCTTCTCUAG\n```\n\n## Contributing\n\n1. Fork it (\u003chttps://github.com/nin93/genecode-cr/fork\u003e)\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request\n\n## Contributors\n\n- [Elia Franzella](https://github.com/nin93) - creator and maintainer\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnin93%2Fgenecode-cr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnin93%2Fgenecode-cr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnin93%2Fgenecode-cr/lists"}