Latest edit at 2021/04/18 (yyyy/mm/dd). May be outdated. Don’t forget to use your brain.
Typing conventions:
text for buttons you need to press, commands you need to enter in command line, etc.
<text> for the stuff you need to replace by
{button} for pressing keyboard button
[text] for optional stuff
credentials.json for your Google account following the separate instructions here (thanks, Google, for making the process harder, sigh).zip if needed). Place the credentials.json there as well.cmd, press {Enter}) and go to that directory. cd <path> is the usual command for that (i.e. cd c:\rustfoil. On Windows you may need to change the active drive first by entering it, i.e. d:{Enter}cd d:\rustfoil).rustfoil.exe)Please direct your browser to <URL> and follow the instructions displayed there. promptAdvanced and Go to <project name from step 2> (unsafe) (i.e. Go to Quickstart (unsafe))Allow until you get You may now close this window. messageIf you run rustfoil on remote machine (i.e. over SSH):
--headless flag to rustfoil invocation (i.e. rustfoil --headless)Please direct your browser to <URL>, follow the instructions and enter the code displayed here: promptAdvanced and Go to <project name from step 2> (unsafe) (i.e. Go to Quickstart (unsafe))Allow until you get Please copy this code, switch to your application and paste it there: messageAfter you complete that, rustfoil should show [Info] Generated index successfully and create token.json file in the folder you run it from.
https://drive.google.com/drive/folders/ when you open said folder).rustfoil <flags> <ID1> [<ID2> <ID3> ...] (i.e. rustfoil 0ABcDE1FghIJKLm2PVA; or rusftoil 0ABcDE1FghIJKLm2PVA 1GHcDE1FghIJKLm2PVA for two folders). You should get
/ Scanned 226 files 5
[Info] Generated index successfully
and index.tfl file should appear in the folder with rustfoil.
If you’ve got no error messages and index.tfl file is there - you’re good to go.
| flag | meaning |
|---|---|
--help |
list all available flags |
-V |
show rustfoil version. Make sure to update to latest one in case you encounter any problems. |
--headless |
allow for remote (headless) OAuth |
--share-files |
share all indexed files to “Anyone with a link” |
--tinfoil-auth |
create Google auth files for Tinfoil |
--tinfoil-auth-path |
change path to where --tinfoil-auth creates files |
| uploading index to gdrive | |
--upload-my-drive |
upload the generated index to personal gdrive of account you run rustfoil with |
--upload-to-folder-id <id> |
upload the generated index to the gdrive folder with specified ID |
--share-index |
share the uploaded index file to “Anyone with a link” |
| encryption | |
--public-key <keyfile> |
encrypt index with public key. You can get one here. Store in folder with rustfoil, add --public-key public.key to invocation |
Windows:
run.bat), place rustfoil invocation there (i.e. rustfoil.exe --public-key public.key <FolderID>), run it with double-click. Removes the need to print the commands by hand. Makes runs repeatable (and automatable). You can even make a single .bat to run, say, rclone and then rustfoil. Keywords to google for additional info: windows bat scripttaskschd.msc, press OK or Enter.windows scheduled tasks.Possible keywords to google for similar effect on linux: create shell script, create cron task
Use rustfoil with --tinfoil-auth flag to create the files needed to set up google auth in Tinfoil (i.e. just run rustfoil --tinfoil-auth once).
By default it will create “COPY_TO_SD” folder where you run (can be altered with --tinfoil-auth-path). With the proper folder structure.
Just copy its contents to the root of your SD (the whole “switch” folder, replacing files if you’re asked to). Or go to “COPY_TO_SD\switch\tinfoil" and just copy credentials.json and gdrive.token files from there.
Then add a souce in Tinfoil’s File Browser with protocol gdrive: and empty path. It will make Tinfoil use said credentials at startup (and refresh if needed).
--upload-my-drive --share-index flags to rustfoil invocation.[Info] Shared Index File, accessible at https://drive.google.com/uc?id=1abc4eF_GhjKlmKJ0RqUabCde_68ABCDE line in it. Get the link from there.