Update username

Yudi
2021-04-24 16:46:49 -03:00
parent ad597e6440
commit 5fcc394293
+16 -16
@@ -79,7 +79,7 @@ fi
exit 0
```
**4.** Replace:<br/>
**4.** Replace:
`tokenhere` with your [Token](https://github.com/Tyrrrz/DiscordChatExporter/wiki/Obtaining-Token-and-Channel-IDs)
`bot/user` If it's a bot token, replace it with `bot`. If it's from a user, `user`
@@ -94,9 +94,9 @@ exit 0
`formathere` with one of the available export formats
<br/>
To quickly get file or folder paths, select the file/folder, then hit Command+I (⌘I) and copy what's after `Where:`.<br/>
To quickly get file or folder paths, select the file/folder, then hit Command+I (⌘I) and copy what's after `Where:`.
After copying and pasting, make sure the file/folder name is not missing. If a folder has spaces in its name, add `\` before the spaces, like in the example below:
* `Discord\ Exports` - Wrong ✗
* `/Users/user/Documents` - Wrong ✗
@@ -108,7 +108,7 @@ After copying and pasting, make sure the file/folder name is not missing. If a f
![](https://i.imgur.com/29u6Nyx.png)
<br/>
**5.** Save the file as `filename.sh`, not `.txt`
@@ -133,9 +133,9 @@ Open TextEdit, make a Plain Text (⇧⌘T) and then paste the following into it:
* The `Program` string is the path to the script. Replace `/path/to/filename.sh` between the `<string>` with the path of the previously created script.
* Replace the `REPLACEME` with the content presented in the following sections according to <u>when</u> you want to export.<br/>
* Replace the `REPLACEME` with the content presented in the following sections according to <u>when</u> you want to export.
When you're done, save the file with the same name as the `Label` and with the `.plist` extension (not `.txt`), like `local.discordchatexporter.plist`.<br/>
When you're done, save the file with the same name as the `Label` and with the `.plist` extension (not `.txt`), like `local.discordchatexporter.plist`.
### Exporting on System Boot/User Login
@@ -183,10 +183,10 @@ Key | Integer
Replace the template's `0`s according to the desired times.
You can delete the `<key>`s you don't need, don't forget to remove the `<integer>0</integer>` under it.<br/>
You can delete the `<key>`s you don't need, don't forget to remove the `<integer>0</integer>` under it.
Omitted keys are interpreted as wildcards, for example, if you delete the Minute key, the script will run at every minute, delete the Weekday key and it'll run at every weekday, and so on.
Be aware that if you set the day to '31', the script will only run on months that have the 31th day.
Be aware that if you set the day to '31', the script will only run on months that have the 31st day.
**Check the examples below ([or skip to step 3 (loading the file)](https://github.com/Tyrrrz/DiscordChatExporter/wiki/Scheduling-exports-on-macOS#3-loading-the-plist-into-launchctl)):**
@@ -240,16 +240,16 @@ Every Sunday at midnight and every Wednesday full hour (xx:00). Notice the inclu
**1.** Copy your `filename.plist` file to one of these folders according to how you want it to run:
* `~/Library/LaunchAgents` runs as the current logged in user.
* `~/Library/LaunchAgents` runs as the current logged-in user.
* `/Library/LaunchDaemons` runs as the system "_administrator_" (root).
* If macOS has a single user:
* If you want to export only when the user is logged in, choose the first one.<br/>
* If you want the script to always run on System Startup, choose the second one.<br/>
* If you want to export only when the user is logged in, choose the first one.
* If you want the script to always run on System Startup, choose the second one.
* If macOS has multiple users:
* If you want the script to run only when a certain user is logged in, choose the first one.<br/>
* If you want the script to always run on System Startup, choose the second one.<br/>
* If you want the script to run only when a certain user is logged in, choose the first one.
* If you want the script to always run on System Startup, choose the second one.
To quickly go to these directories, open Finder and press Command+Shift+G (⌘⇧G), then paste the path into the text box.
@@ -267,11 +267,11 @@ launchctl unload /path/to/Library/LaunchAgents/local.discordchatexporter.plist
launchctl list
```
**Check if a specific job is enabled**<br/>
**Check if a specific job is enabled**
You can also see error codes (2nd number) by running this command.
```
launchctl list | grep local.discordchatexporter
```
#
Further reading: [Script management with launchd in Terminal on Mac](https://support.apple.com/guide/terminal/script-management-with-launchd-apdc6c1077b-5d5d-4d35-9c19-60f2397b2369/mac) and [launchd.info](https://launchd.info/).<br/>
Special thanks to [@RenanYudi](https://github.com/RenanYudi)
Further reading: [Script management with launchd in Terminal on Mac](https://support.apple.com/guide/terminal/script-management-with-launchd-apdc6c1077b-5d5d-4d35-9c19-60f2397b2369/mac) and [launchd.info](https://launchd.info/).
Special thanks to [@Yudi](https://github.com/Yudi)