Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accomplish with tldr-pages client specification #6

Open
17 tasks
ivanhercaz opened this issue May 11, 2020 · 0 comments
Open
17 tasks

Accomplish with tldr-pages client specification #6

ivanhercaz opened this issue May 11, 2020 · 0 comments
Labels
enhancement New feature or request priority:high An issue with high priority
Milestone

Comments

@ivanhercaz
Copy link
Collaborator

tldr-pages has a client specification to guide how the clients should/must work. I think to accomplish with this specification will help ExTldr to:

  • Scale better if tldr-pages changes in the future.
  • Standardize how the clients interact with tldr-pages, so if a user begin to use ExTldr after use another client, the transition will be easier.

The next lists are summaries of the requirements specified in the specification, each one, or each group, should have its own issue to document the progress and ease future tasks:

Arguments

  • The first argument must be the page name.
  • Support the page name with spaces instead of a dash (-) is not required, but it will be supported by ExTldr.
  • -v, --version option is required. It must show the current version of the client and the version of the specification.
  • -p, --platform option is required. This one is the one must be used to specify the platform, it must be checked instead of the current platform.
  • -u, --update option is conditional. It updates the cache of pages and must be implemented if cache is supported.
  • -l, --list option is not required. This option should list all the available pages in the current platform, if another one specified, it shows the pages for the specified platform.
  • -L, --language option is not required. This specify the language to return the page overriding the language detection.
  • It should be implemented the long and short version of the options although it isn't required by the specification.
  • The standard output is TTY (important to work in Format the markdown of the output #3).

Directory structure

Translations (#1)

  • It is recommended the support for multilingual pages. The format of the directories is pages.<locale> where is a POSIX Locale Name in the form of <language>_<country> (eg. pages.pt_BR, pages.es).
  • The language must be determined by the environment variables for language. First should be checked LC_MESSAGES, then LANG and finally LANGUAGE; if no one is available must be show in English.
  • The client should offer an option to override the language using configuration files or a command line option, as the one described in the "Arguments** group described above.
  • It is recommended to check first by platform, then by language.

Caching

Many of these are minor changes, but the implementation of the caching system could produce a change in the behavior of the client, so this change will be the last one to implement and it is planned for the v1.0.0.

I will be very thankfully of every feedback given by any users, but specially of the members of the tldr-pages community, the users of tldr-pages and Elixir developers.

@ivanhercaz ivanhercaz added the enhancement New feature or request label May 11, 2020
@ivanhercaz ivanhercaz added this to the v1.0.0 milestone May 11, 2020
@ivanhercaz ivanhercaz pinned this issue May 11, 2020
@ivanhercaz ivanhercaz added the priority:high An issue with high priority label May 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request priority:high An issue with high priority
Projects
None yet
Development

No branches or pull requests

1 participant