Nexus-Mods / NexusMods.App

Home of the development of the Nexus Mods App
https://nexus-mods.github.io/NexusMods.App/
GNU General Public License v3.0
913 stars 45 forks source link

Stardew Valley - Allow users to share their SMAPI log directly from the app. #1721

Open Pickysaurus opened 3 months ago

Pickysaurus commented 3 months ago

User story

As a user

I want to get a sharable link to my SMAPI log file

So that I can give it to others who are helping me.

Requirements

We should ensure we append the log with our application name and version so that it's clear they have been using our app to manage the game. Vortex adds this [10:28:12 INFO Vortex] Log exported by Vortex 1.11.7.

How to send the log

SMAPI's log website allows users to submit log files as part of a POST request.

  1. POST https://smapi.io/log with the raw text of the latest SMAPI log passed as x-www-form-urlencoded under the key input.
  2. A HTML page will be returned.
  3. Look for the following section of the HTML document
    <div class="banner success" v-pre>
                <strong>Share this link to let someone else see the log:</strong>
                <code>https://smapi.io/log/8a59751b85d9496ea30483489ac5cea0</code><br />
        (Or <a href="/log">upload a new log</a>.)
            </div>
  4. Extract the link from the HTML and allow users to copy/share it. (Or just open the webpage in their default browser)

Design

(Any designs required for this story)

DOD

(Describe the expected behaviour from the users point of view. Create multiple DoD's if required to fully describe what should happen. Number each DoD)

Scenario 1

Given ___

When ___

Then ___

Pathoschild commented 3 months ago

If it's easier, SMAPI also supports Pastebin IDs. You can upload a file to Pastebin and then pass its ID in the URL (like pastebin.com/vsCY4xtXsmapi.io/log/vsCY4xtX).