NXUpdateTracker Switch: Difference between revisions

From GameBrew
(Created page with "{{Infobox Switch Homebrews |title=NXUpdateTracker |image=nxupdatetrackerswitch.png |description=A local HTML page that helps you track the version numbers of [Switch] homebrew applications. |author=F-l-a |lastupdated=2023/10/10 |type=Other Apps |version=2.0 |license=GPL-3.0 |download=https://dlhb.gamebrew.org/switchhomebrews/nxupdatetrackerswitch.7z |website=https://gbatemp.net/threads/nxupdatetracker.640650/ |source=https://github.com/F-l-a/NXUpdateTracker |donation= }}...")
 
No edit summary
 
Line 9: Line 9:
|license=GPL-3.0
|license=GPL-3.0
|download=https://dlhb.gamebrew.org/switchhomebrews/nxupdatetrackerswitch.7z
|download=https://dlhb.gamebrew.org/switchhomebrews/nxupdatetrackerswitch.7z
|website=https://gbatemp.net/threads/nxupdatetracker.640650/
|website=https://github.com/F-l-a/NXUpdateTracker/wiki
|source=https://github.com/F-l-a/NXUpdateTracker
|source=https://github.com/F-l-a/NXUpdateTracker
|donation=
|donation=
}}
}}
NXUpdateTracker is a local HTML page that helps you track the version numbers of [Switch] homebrew applications. Try the demo Version [https://f-l-a.github.io/NXUpdateTracker/ here] (Since it's a demo, it's heavily limited, but it's good to have).
NXUpdateTracker is a local HTML page that helps you track the version numbers of [Switch] homebrew applications.  
 
You can try the demo version [https://f-l-a.github.io/NXUpdateTracker/ here].


==Features==
==Features==
* Lists the latest version number of the supported homebrews
* Lists the latest version number of the supported homebrews.
* Loads the currently installed version number from a JSON file hosted on Github, like [https://github.com/F-l-a/FlaSwitch/blob/main/Versions.json this]
* Loads the currently installed version number from a JSON file hosted on GitHub, like [https://github.com/F-l-a/FlaSwitch/blob/main/Versions.json this].
* Compares the installed and the latest version numbers, with the possibility to only list the outdated apps that have an update available
* Compares the installed and the latest version numbers, with the possibility to only list the outdated apps that have an update available.
* Updates the installed version numbers modifying the JSON directly from the app
* Updates the installed version numbers modifying the JSON directly from the app.
* Hide/Show the homebrews you prefer
* Hide/Show the homebrews you prefer.
* Lists some important files needed by the apps to work properly
* Lists some important files needed by the apps to work properly.
* Accessible everywhere: .nro version for the switch, standalone .html version for every browser
* Accessible everywhere: .nro version for the switch, standalone .html version for every browser.
* Customizable: you can modify the html to include other apps/assets/links
* Customizable: you can modify the html to include other apps/assets/links.
* Does NOT install the updates itself, nor it downloads them
* Does NOT install the updates itself, nor it downloads them.


==Installation==
==Installation==
===Installing NXUpdateTracker===
How to install:
#Download [https://github.com/F-l-a/NXUpdateTracker/releases/latest NXUpdateTracker.zip] from the latest release
*Download [https://github.com/F-l-a/NXUpdateTracker/releases/latest NXUpdateTracker.zip] from the latest release.
#Extract NXUpdateTracker.zip and copy its contents inside the root of your SD card
*Extract NXUpdateTracker.zip and copy its contents inside the root of your SD card.
#To use all the functions of the app, you need to modify '''/switch/NXUpdateTracker/githubInfo.ini'''. Go to Usage Guide
*To use all the functions of the app, you need to modify /switch/NXUpdateTracker/githubInfo.ini. [https://github.com/F-l-a/NXUpdateTracker/wiki/Usage-Guide See usage].
 
How to update:
* Make a backup of the /switch/NXUpdateTracker/githubInfo.ini file contents.
* Download [https://github.com/F-l-a/NXUpdateTracker/releases/latest NXUpdateTracker.zip] from the latest release.
* Extract NXUpdateTracker.zip and copy its contents inside the root of your SD card. Overwrite the previous files if needed.
* Reinsert the info back into /switch/NXUpdateTracker/githubInfo.ini.
 
Folder structure:
sd:\
  |-switch\
  |  |-NXUpdateTracker\
  |  |  |-githubInfo.ini
  |  |  |-NXUpdateTracker.nro


===Updating NXUpdateTracker===
==User guide==
# Make a backup of the '''/switch/NXUpdateTracker/githubInfo.ini''' file contents
The application operates through a simple HTML, JavaScript (JS), and CSS page, which is accessible via the Nintendo Switch's web applet. The HTML page is hosted locally using Mongoose, creating a local web server. This page comprises tables listing various applications, each associated with two version numbers – one for the latest available version and another for the installed version. The latest version is fetched directly from GitHub's official repository, while the installed version is retrieved from a JSON file hosted in a user's GitHub repository. Each user needs to create their repository, and a guide on how to do so is available [https://github.com/F-l-a/NXUpdateTracker/wiki/Usage-Guide here].
# Download [https://github.com/F-l-a/NXUpdateTracker/releases/latest NXUpdateTracker.zip] from the latest release
# Extract '''NXUpdateTracker.zip''' and copy its contents inside the root of your SD card. Overwrite the previous files if needed
# STEP 3: Reinsert the info back into '''/switch/NXUpdateTracker/githubInfo.ini''' ( <- it's the reason you made a backup at
#*IMPORTANT: You can't just keep the old file. I can't guarantee I won't change/add contents to it). Go to Usage Guide if unsure


==Usage==
Example githubInfo.ini content (this is only an example. use your own info):
===Switch Version===
#Create a repository and the Versions.json file -> Follow [https://github.com/F-l-a/NXUpdateTracker/wiki/%5BUSAGE-GUIDE%5D-How-to-create-a-Github-repository How to create a Github repository].
#Get a Github API token -> Follow [https://github.com/F-l-a/NXUpdateTracker/wiki/%5BUSAGE-GUIDE%5D-How-to-generate-a-Github-API-token How to generate a Github API token].
#Download [https://github.com/F-l-a/NXUpdateTracker/releases/latest NXUpdateTracker.zip] from the latest release and extract it (You can skip this step if you already have the latest release).
#Open '''/switch/NXUpdateTracker/githubInfo.ini''' with a text editor (like Notepad) and insert your repository info and your API token. -> Get these in '''STEP 1''' and '''STEP 2'''.


example '''githubInfo.ini''' content (this is only an example. use your own info):
API_TOKEN = qwertyuiopasdfghjklzxcvbnm1234567890
<pre>
OWNER = F-l-a
API_TOKEN = qwertyuiopasdfghjklzxcvbnm1234567890
REPO = NXUpdateTracker
OWNER = F-l-a
FILE_PATH = Versions.json
REPO = NXUpdateTracker
FILE_PATH = Versions.json
</pre>
5: Put the files inside the SD card. Your SD tree needs to be like this:
<pre>
SD  (ROOT)
└──switch  (FOLDER)
  └──NXUpdateTracker  (FOLDER)
      ├──githubInfo.ini  (FILE)
      └──NXUpdateTracker.nro  (FILE)
</pre>
===Browser Version (Pc / Smartphone / KFC Ice Cream Machine)===
# Download [https://github.com/F-l-a/NXUpdateTracker/releases/latest NXUpdateTracker.html] from the latest release.
# Open '''NXUpdateTracker.html''' with a text editor (like Notepad) and insert your repository info and your API token. -> Get these in the SWITCH part (STEP 1 and STEP 2).


https://dlhb.gamebrew.org/switchhomebrews/nxupdatetrackerswitch-03.png
Upon booting the Switch, the app writes the necessary files (HTML, JS) to sdmc:/switch/NXUpdateTracker/, which becomes the server's root folder. These required files are sourced from romfs:/webapp/ and are hardcoded within the .nro. To prevent overwriting existing files, create an empty file named .keep inside /switch/NXUpdateTracker/.  


==Screenshots==
==Screenshots==
Line 87: Line 79:


== External links ==
== External links ==
* Gbatemp - https://gbatemp.net/threads/nxupdatetracker.640650/
* GitHub - https://github.com/F-l-a/NXUpdateTracker
* Github - https://github.com/F-l-a/NXUpdateTracker
* GBAtemp - https://gbatemp.net/threads/nxupdatetracker.640650/

Latest revision as of 12:35, 7 February 2024

NXUpdateTracker
Nxupdatetrackerswitch.png
General
AuthorF-l-a
TypeOther Apps
Version2.0
LicenseGPL-3.0
Last Updated2023/10/10
Links
Download
Website
Source

NXUpdateTracker is a local HTML page that helps you track the version numbers of [Switch] homebrew applications.

You can try the demo version here.

Features

  • Lists the latest version number of the supported homebrews.
  • Loads the currently installed version number from a JSON file hosted on GitHub, like this.
  • Compares the installed and the latest version numbers, with the possibility to only list the outdated apps that have an update available.
  • Updates the installed version numbers modifying the JSON directly from the app.
  • Hide/Show the homebrews you prefer.
  • Lists some important files needed by the apps to work properly.
  • Accessible everywhere: .nro version for the switch, standalone .html version for every browser.
  • Customizable: you can modify the html to include other apps/assets/links.
  • Does NOT install the updates itself, nor it downloads them.

Installation

How to install:

  • Download NXUpdateTracker.zip from the latest release.
  • Extract NXUpdateTracker.zip and copy its contents inside the root of your SD card.
  • To use all the functions of the app, you need to modify /switch/NXUpdateTracker/githubInfo.ini. See usage.

How to update:

  • Make a backup of the /switch/NXUpdateTracker/githubInfo.ini file contents.
  • Download NXUpdateTracker.zip from the latest release.
  • Extract NXUpdateTracker.zip and copy its contents inside the root of your SD card. Overwrite the previous files if needed.
  • Reinsert the info back into /switch/NXUpdateTracker/githubInfo.ini.

Folder structure:

sd:\
 |-switch\
 |  |-NXUpdateTracker\
 |  |  |-githubInfo.ini
 |  |  |-NXUpdateTracker.nro

User guide

The application operates through a simple HTML, JavaScript (JS), and CSS page, which is accessible via the Nintendo Switch's web applet. The HTML page is hosted locally using Mongoose, creating a local web server. This page comprises tables listing various applications, each associated with two version numbers – one for the latest available version and another for the installed version. The latest version is fetched directly from GitHub's official repository, while the installed version is retrieved from a JSON file hosted in a user's GitHub repository. Each user needs to create their repository, and a guide on how to do so is available here.

Example githubInfo.ini content (this is only an example. use your own info):

API_TOKEN = qwertyuiopasdfghjklzxcvbnm1234567890
OWNER = F-l-a
REPO = NXUpdateTracker
FILE_PATH = Versions.json

Upon booting the Switch, the app writes the necessary files (HTML, JS) to sdmc:/switch/NXUpdateTracker/, which becomes the server's root folder. These required files are sourced from romfs:/webapp/ and are hardcoded within the .nro. To prevent overwriting existing files, create an empty file named .keep inside /switch/NXUpdateTracker/.

Screenshots

nxupdatetrackerswitch-01.png

nxupdatetrackerswitch-02.png

Changelog

v2.0

  • A function to hide/show the homebrews. You can save the configuration on your Github repo: follow the Update Guide here. You also need to add a new Visibility.json file to your repo: follow STEP 7 here.
  • Some code reorganization
  • Google Drive links got removed for security reasons

v1.0

  • First Release.

Credits

I would like to thank these people who gave me the possibility to bring this project to you:

  • switchbrew for Libnx Switch
  • BernardoGiordano for nx-spa, the project I partially used as a reference for mine. I used his approach to open a web server with Mongoose and I used some of his files for some parts of the process
  • F-l-a (me) for the html and javascript (and some c++) parts. I learned a lot doing this (and spending half the time on some stupid things because I couldn't get it to work. But that's what the game is about, right?)

External links

Advertising: