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

Manpage #565

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Manpage #565

wants to merge 2 commits into from

Conversation

jn64
Copy link
Contributor

@jn64 jn64 commented Dec 9, 2022

See commit messages for details

Todo:

  • AUTHORS — I took it from the About dialog of Cemu. Some manpages include "and contributors" or similar wording, or simply omit AUTHORS.
    • Actually reading man-pages(7) says this section is strongly discouraged. Will remove unless its wanted
  • Copyright statement ­— I didn't find a definitive copyright statement in README.md or source files. Also optional.
  • BUGS — should be REPORTING BUGS
  • FILES — should list locations of config files (what about portable vs non-portable?)
  • I don't know what the --act-url argument "URL prefix for account server" is (protocol? hostname or part of hostname? fully formed URL?)
  • Do macOS GUI apps include man pages?

While Markdown isn't the best fit for writing manpages,
it's the easiest for future contributions/maintenance.
However, pandoc is a heavy dependency for producing
a single manpage. Other tools [1] could be evaluated.

The only pandoc-isms are the title block [2]
(first 3 lines) which will rarely change,
and the definition lists ':' for options
which is self-explanatory.

The Markdown source is intentionally not hard wrapped.
pandoc automatically hard wraps the roff man output
(which may be further re-wrapped by manpage viewers).

To produce the manpage (outputs a file Cemu.1):

    pandoc -s -f markdown-smart -t man Cemu.1.md -o Cemu.1

Preview from Markdown without writing to file:

    pandoc -s -f markdown-smart -t man Cemu.1.md | man -l -

markdown-smart *disables* the smart typography extension
to avoid mangling '--'. [3]

[1]: https://drewdevault.com/2018/05/13/scdoc.html
[2]: https://pandoc.org/MANUAL.html#extension-pandoc_title_block
[3]: https://pandoc.org/MANUAL.html#extensions
The roff manpage produced by pandoc is included in this commit,
as well as a plaintext preview of what it would look like
when viewed with 'man' in a terminal of 80 width.
Copy link
Contributor

@Tachi107 Tachi107 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of shipping a pre-generated artefact, could you please add a man target to the CMake build system instead?

@Tachi107
Copy link
Contributor

Tachi107 commented Dec 9, 2022

First of all thank you for bringing this up! man pages are underrated :)

  • AUTHORS — I took it from the About dialog of Cemu. Some manpages include "and contributors" or similar wording, or simply omit AUTHORS.

    • Actually reading man-pages(7) says this section is strongly discouraged. Will remove unless its wanted

I personally don't fully agree with the opinion expressed in the man-pages(7) manual, and in fact other manuals such as mdoc(7) or scdoc(5) do not discourage this at all.

  • Copyright statement ­— I didn't find a definitive copyright statement in README.md or source files. Also optional.

Cemu is licensed under the MPL-2.0

  • FILES — should list locations of config files (what about portable vs non-portable?)

I'd only describe the files used in "non portable" mode, and then mention that in portable mode everything is more or less dumped in the binary directory.

@jn64
Copy link
Contributor Author

jn64 commented Dec 9, 2022

Instead of shipping a pre-generated artefact, could you please add a man target to the CMake build system instead?

I'm not including the actual manpage. The 2nd commit is just for preview here.

But I can't do the CMake thing, because

  1. I don't know how, and don't intend to learn, and
  2. As mentioned in the first commit, this would add a build dependency on pandoc (or whatever intermediate format chosen), which should be decided on first.

Cemu is licensed under the MPL-2.0

I know, I was asking for an existing statement (if any) like Copyright (c) XXXX-YYYY Cemu McCemuface

@Tachi107
Copy link
Contributor

Tachi107 commented Dec 9, 2022 via email

@jn64 jn64 marked this pull request as draft December 9, 2022 17:33
@jonbarrow
Copy link
Contributor

jonbarrow commented Jun 22, 2023

I don't know what the --act-url argument "URL prefix for account server" is (protocol? hostname or part of hostname? fully formed URL?)

It's supposed to be a fully formed URL pointing to the NNID API server, such as https://account.nintendo.net

--ecs-url also exists for a similar purpose, for pointing to the eCommerce SOAP server + path, such as https://ecs.wup.shop.nintendo.net/ecs/services/ECommerceSOAP, which used for getting title tickets and other metadata used during title installation

// urls
if (vm.count("act-url"))
{
serviceURL_ACT = vm["act-url"].as<std::string>();
if (serviceURL_ACT.size() > 0 && serviceURL_ACT.back() == '/')
serviceURL_ACT.pop_back();
}
if (vm.count("ecs-url"))
serviceURL_ECS = vm["ecs-url"].as<std::string>();

Though last time I checked these arguments haven't been working for a long time (since before Cemu 2.0 even came out), and seem to have been replaced with other config options?

case NetworkService::Custom:
serviceURL_ACT = GetNetworkConfig().urls.ACT.GetValue();
serviceURL_ECS = GetNetworkConfig().urls.ECS.GetValue();
break;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants