{"id":15561042,"url":"https://github.com/nilsding/questiongenerator","last_synced_at":"2025-04-23T21:45:58.017Z","repository":{"id":24343365,"uuid":"27741193","full_name":"nilsding/questiongenerator","owner":"nilsding","description":"A simple question generator.","archived":false,"fork":false,"pushed_at":"2023-01-31T22:17:09.000Z","size":31,"stargazers_count":5,"open_issues_count":0,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-04-23T23:46:59.324Z","etag":null,"topics":["generator","justask","question","retrospring","ruby"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nilsding.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-12-08T23:58:23.000Z","updated_at":"2023-02-06T11:54:43.000Z","dependencies_parsed_at":"2023-02-16T23:30:36.045Z","dependency_job_id":null,"html_url":"https://github.com/nilsding/questiongenerator","commit_stats":null,"previous_names":["retrospring/questiongenerator"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nilsding%2Fquestiongenerator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nilsding%2Fquestiongenerator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nilsding%2Fquestiongenerator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nilsding%2Fquestiongenerator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nilsding","download_url":"https://codeload.github.com/nilsding/questiongenerator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250522293,"owners_count":21444509,"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":["generator","justask","question","retrospring","ruby"],"created_at":"2024-10-02T16:05:01.706Z","updated_at":"2025-04-23T21:45:57.956Z","avatar_url":"https://github.com/nilsding.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# questiongenerator\n\nA simple question generator, used by Retrospring (formerly justask).\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n    gem 'questiongenerator'\n\nIf you're feeling _edgy_, you can add this line instead:\n\n    gem 'questiongenerator', git: 'https://github.com/nilsding/questiongenerator.git'\n\n## Usage\n\n``` ruby\nrequire 'questiongenerator'\n\n# Configure it\nQuestionGenerator.question_base_path = '/home/nilsding/questions'\nQuestionGenerator.default_locale = :en\n\n# Compile the questions for increased randomness\nQuestionGenerator.compile\n\n# Get some questions\nputs QuestionGenerator.generate\n# =\u003e \"What is the best thing about the internet?\"\n\n# You can also specify the locale, if you want to\nputs QuestionGenerator.generate locale: :de\n# =\u003e \"Was war das letzte, das du gegessen hast?\"\n\n# You can also specify an own prefix or suffix:\nputs QuestionGenerator.generate locale: :fr, prefix: '[FR] ', suffix: ' ?'\n# =\u003e \"[FR] Quelle est la personne la plus célèbre que vous avez rencontrée ?\"\n```\n\n## How it works\n\nThe question generator uses a simple branching structure inside the specified locale to generate questions from it, here is a quick example:\n\n```yml\nCan:\n  you:\n    - swim\n    - speak:\n      - different:\n        - languages\n    - play:\n      - any:\n        - sports\n      - the:\n        - piano\n        - guitar\n        - trumpet\n      - baseball\n    - ski\n    - cook\n    - dance\n\n# The following example outputs:\n# Can you swim?\n# Can you speak different languages?\n# Can you play any sports?\n# Can you play the piano?\n#               ...guitar?\n#               ...trumpet?\n# Can you play baseball?\n# Can you ski?\n# Can you cook?\n# Can you dance?\n```\n\nIf you can't break sentences in parts in your language, you can also specify the entire question in one line.\n```yml\n- Can you swim\n\n# The following example outputs:\n# Can you swim?\n```\n\n## Contributing\n\nThe files for questions are located in `lib/questions/`\n\nIf you want to add a new language, create a new file and name it with the [ISO-639-1 language code](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) of it (just like `en.yml`)\n\n1. Fork it ( https://github.com/nilsding/questiongenerator/fork )\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\nPlease don't add harassing, scaring or upsetting content to the questions or content that otherwise violates the [Retrospring Terms of Service](https://retrospring.net/terms).\n\nIf you add questions in another language to the questiongenerator and purposely add wrong translations, further Pull Requests will be ignored.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnilsding%2Fquestiongenerator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnilsding%2Fquestiongenerator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnilsding%2Fquestiongenerator/lists"}