diff --git a/.gitignore b/.gitignore index 8f25f03f9..646b3e8df 100755 --- a/.gitignore +++ b/.gitignore @@ -33,4 +33,5 @@ sync_staging.sh *.swp _vieux/ _mydocs -.DS_Store \ No newline at end of file +.DS_Store +Assets/DownloadBadges*.psd \ No newline at end of file diff --git a/ElectronClient/app/update-readme-download.js b/ElectronClient/app/update-readme-download.js index 3739b1fe1..50eb7741b 100644 --- a/ElectronClient/app/update-readme-download.js +++ b/ElectronClient/app/update-readme-download.js @@ -57,9 +57,9 @@ async function main() { let content = readmeContent(); - if (winUrl) content = content.replace(/(\(https:\/\/github.com\/laurent22\/joplin\/releases\/download\/.*?\.exe\))/, '(' + winUrl + ')'); - if (macOsUrl) content = content.replace(/(\(https:\/\/github.com\/laurent22\/joplin\/releases\/download\/.*?\.dmg\))/, '(' + macOsUrl + ')'); - if (linuxUrl) content = content.replace(/(\(https:\/\/github.com\/laurent22\/joplin\/releases\/download\/.*?\.AppImage\))/, '(' + linuxUrl + ')'); + if (winUrl) content = content.replace(/(https:\/\/github.com\/laurent22\/joplin\/releases\/download\/.*?\.exe)/, winUrl); + if (macOsUrl) content = content.replace(/(https:\/\/github.com\/laurent22\/joplin\/releases\/download\/.*?\.dmg)/, macOsUrl); + if (linuxUrl) content = content.replace(/(https:\/\/github.com\/laurent22\/joplin\/releases\/download\/.*?\.AppImage)/, linuxUrl); setReadmeContent(content); } diff --git a/ElectronClient/update-readme-download.js b/ElectronClient/update-readme-download.js deleted file mode 100644 index 0fefb3eca..000000000 --- a/ElectronClient/update-readme-download.js +++ /dev/null @@ -1,47 +0,0 @@ -'use strict'; - -const fs = require('fs-extra'); -const https = require('https'); -const request = require('request'); - -const url = 'https://api.github.com/repos/laurent22/joplin/releases/latest'; - -async function gitHubLatestRelease() { - return new Promise((resolve, reject) => { - request.get({ - url: url, - json: true, - headers: {'User-Agent': 'Joplin Readme Updater'} - }, (error, response, data) => { - if (err) { - reject(error); - } else if (response.statusCode !== 200) { - reject(new Error('Error HTTP ' + response.statusCode)); - } else { - resolve(data); - } - }); - }); -} - -function downloadUrl(release, os) { - if (!release || !release.assets || !release.assets.length) return null; - - for (let i = 0; i < release.assets.length; i++) { - const asset = release.assets[i]; - const name = asset.name; - - if (name.indexOf('.dmg') > 0 && os === 'macos') return asset.browser_download_url; - } -} - -async function main() { - const release = await gitHubLatestRelease(); - console.info(downloadUrl(release, 'windows')); - console.info(downloadUrl(release, 'macos')); - console.info(downloadUrl(release, 'linux')); -} - -main().catch((error) => { - console.error('Fatal error', error); -}); \ No newline at end of file diff --git a/README.md b/README.md index 37d4ff3b5..8ba411925 100644 --- a/README.md +++ b/README.md @@ -18,16 +18,16 @@ Three types of applications are available: **desktop** (Windows, macOS and Linux Operating system | Link -----------------|-------- -Windows | [Download Joplin for Windows](https://github.com/laurent22/joplin/releases/download/v0.10.20/Joplin-Setup-0.10.20.exe) -macOS | [Download Joplin for macOS](https://github.com/laurent22/joplin/releases/download/v0.10.20/Joplin-0.10.20.dmg) -Linux | [Download Joplin for Linux](https://github.com/laurent22/joplin/releases/download/v0.10.20/Joplin-0.10.20-x86_64.AppImage) +Windows | Get it on Windows +macOS | Get it on macOS +Linux | Get it on macOS ## Mobile applications Operating system | Link -----------------|-------- -Android | Get it on Google Play -iOS | Coming soon! +Android | Get it on Google Play +iOS | Get it on the App Store ## Terminal application diff --git a/docs/images/BadgeAndroid.png b/docs/images/BadgeAndroid.png new file mode 100644 index 000000000..35f2587bc Binary files /dev/null and b/docs/images/BadgeAndroid.png differ diff --git a/docs/images/BadgeIOS.png b/docs/images/BadgeIOS.png new file mode 100644 index 000000000..f413024a8 Binary files /dev/null and b/docs/images/BadgeIOS.png differ diff --git a/docs/images/BadgeLinux.png b/docs/images/BadgeLinux.png new file mode 100644 index 000000000..5d0ca00a7 Binary files /dev/null and b/docs/images/BadgeLinux.png differ diff --git a/docs/images/BadgeMacOS.png b/docs/images/BadgeMacOS.png new file mode 100644 index 000000000..c3f2c33ae Binary files /dev/null and b/docs/images/BadgeMacOS.png differ diff --git a/docs/images/BadgeWindows.png b/docs/images/BadgeWindows.png new file mode 100644 index 000000000..bf75217a6 Binary files /dev/null and b/docs/images/BadgeWindows.png differ