diff --git a/Assets/All.psd b/Assets/All.psd index 00eafae47..ec95fbca7 100644 Binary files a/Assets/All.psd and b/Assets/All.psd differ diff --git a/ElectronClient/app/update-readme-download.js b/ElectronClient/app/update-readme-download.js new file mode 100644 index 000000000..3739b1fe1 --- /dev/null +++ b/ElectronClient/app/update-readme-download.js @@ -0,0 +1,69 @@ +'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'; +const readmePath = __dirname + '/../../README.md'; + +async function gitHubLatestRelease() { + return new Promise((resolve, reject) => { + request.get({ + url: url, + json: true, + headers: {'User-Agent': 'Joplin Readme Updater'} + }, (error, response, data) => { + if (error) { + 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; + if (name.indexOf('.exe') > 0 && os === 'windows') return asset.browser_download_url; + if (name.indexOf('.AppImage') > 0 && os === 'linux') return asset.browser_download_url; + } +} + +function readmeContent() { + if (!fs.existsSync(readmePath)) throw new Error('Cannot find ' + readmePath); + return fs.readFileSync(readmePath, 'utf8'); +} + +function setReadmeContent(content) { + if (!fs.existsSync(readmePath)) throw new Error('Cannot find ' + readmePath); + return fs.writeFileSync(readmePath, content); +} + +async function main() { + const release = await gitHubLatestRelease(); + + const winUrl = downloadUrl(release, 'windows'); + const macOsUrl = downloadUrl(release, 'macos'); + const linuxUrl = downloadUrl(release, 'linux'); + + 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 + ')'); + + setReadmeContent(content); +} + +main().catch((error) => { + console.error('Fatal error', error); +}); \ No newline at end of file diff --git a/ElectronClient/update-readme-download.js b/ElectronClient/update-readme-download.js new file mode 100644 index 000000000..0fefb3eca --- /dev/null +++ b/ElectronClient/update-readme-download.js @@ -0,0 +1,47 @@ +'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 2340f8dfb..64aa4d500 100644 --- a/README.md +++ b/README.md @@ -8,25 +8,26 @@ The notes can be [synchronised](#synchronisation) with various targets including Joplin is still under development but is out of Beta and should be suitable for every day use. The UI of the terminal client is built on top of the great [terminal-kit](https://github.com/cronvel/terminal-kit) library, and the Android client front end is done using [React Native](https://facebook.github.io/react-native/). -**SCREENSHOT OF THREE CLIENTS SIDE BY SIDE** - - - + # Installation -Three types of applications are available: **desktop** (Windows, macOS and Linux), **mobile** (Android and iOS) or for **terminal** emulator (Windows, macOS and Linux). All applications have similar user interfaces and can synchronise with each others. +Three types of applications are available: **desktop** (Windows, macOS and Linux), **mobile** (Android) or for **terminal** emulator (Windows, macOS and Linux). All applications have similar user interfaces and can synchronise with each others. ## Desktop applications -* Download Joplin for Windows -* Download Joplin for macOS -* Download Joplin for 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) ## Mobile applications -* Get Android app - Get it on Google Play -* Get iOS app +Operating system | Link +-----------------|-------- +Android | Get it on Google Play +iOS | Coming soon! ## Terminal application @@ -36,7 +37,7 @@ On macOS, Linux or Windows (via [WSL](https://msdn.microsoft.com/en-us/commandli To start it, type `joplin`. -For usage information, please see the full [Joplin Terminal Application Documentation](http://joplin.cozic.net/terminal). +For usage information, please refer to the full [Joplin Terminal Application Documentation](http://joplin.cozic.net/terminal). # Features @@ -47,10 +48,10 @@ For usage information, please see the full [Joplin Terminal Application Document - Synchronises to a plain text format, which can be easily manipulated, backed up, or exported to a different format. - Plain text notes, which are rendered as markdown in the mobile and desktop application. - Tag support -- File attachment support (images are displayed and other files are linked and can be opened in the relevant application). +- File attachment support (images are displayed, and other files are linked and can be opened in the relevant application). - Search functionality. - Geo-location support. -- Supports multiple languages (Currently English and French). +- Supports multiple languages # Importing notes from Evernote diff --git a/docs/images/AllClients.jpg b/docs/images/AllClients.jpg new file mode 100644 index 000000000..d725e0817 Binary files /dev/null and b/docs/images/AllClients.jpg differ