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

Add a README.md file to the backup directory #70

Conversation

personalizedrefrigerator
Copy link
Contributor

@personalizedrefrigerator personalizedrefrigerator commented Feb 7, 2024

Summary

Adds a README.md file to the root backup directory that links to Simple Backup's README.

Example directory structure:
all_notebooks, profile, and README all in the same folder

Example README content:

# Joplin Backup

This folder contains one or more backups of data from the Joplin note taking application. The most recent backup was created on 2/14/2024, 4:31:21 PM.

See the [Simple Backup documentation](https://joplinapp.org/plugins/plugin/io.github.jackgruber.backup/#restore) for information about how to restore from this backup.

Notes

  • Does not commit changes to package.json
  • Should adding a README file to the backup directory be a setting?

@@ -86,6 +86,7 @@
"description": "Execute command when backup is finished"
}
},
"backupReadme": "# Joplin Backup\n\nThe backups in this folder were created with the Simple Backup plugin for Joplin. The most recent backup was created on %s.\n\nSee the [Simple Backup documentation](https://joplinapp.org/plugins/plugin/io.github.jackgruber.backup/#restore) for information about how to restore from this backup.",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Alternatively, to link to GitHub:

Suggested change
"backupReadme": "# Joplin Backup\n\nThe backups in this folder were created with the Simple Backup plugin for Joplin. The most recent backup was created on %s.\n\nSee the [Simple Backup documentation](https://joplinapp.org/plugins/plugin/io.github.jackgruber.backup/#restore) for information about how to restore from this backup.",
"backupReadme": "# Joplin Backup\n\nThe backups in this folder were created with the Simple Backup plugin for Joplin. The most recent backup was created on %s.\n\nSee the [Simple Backup documentation](https://github.com/JackGruber/joplin-plugin-backup?tab=readme-ov-file#restore) for information about how to restore from this backup.",

@JackGruber
Copy link
Owner

We should then also write a test for the revisions and the README.md location

src/Backup.ts Outdated
@@ -477,6 +477,7 @@ class Backup {
await this.backupNotebooks();

const backupDst = await this.makeBackupSet();
await this.writeReadme(backupDst);
Copy link
Owner

Choose a reason for hiding this comment

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

I think we should use this.backupBasePath otherwise the README.md is in subfolders if there are several revisions.

@JackGruber JackGruber merged commit a3e46fb into JackGruber:develop Feb 18, 2024
1 check passed
@JackGruber
Copy link
Owner

Thanks, I have added the German translation and removed the timestamp from the README, as this information is not meaningful if several profiles are backuped.

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.

2 participants