├── ComClient ├── Debug │ └── ComClient.tlog │ │ ├── unsuccessfulbuild │ │ └── ComClient.lastbuildstate ├── ComClient.cpp ├── ComClient.vcxproj.filters └── ComClient.vcxproj ├── OnenoteAddin ├── RegisterAddIn.reg ├── UnregisterAddIn.reg ├── Resources │ ├── Settings.ico │ ├── Settings.png │ ├── DownloadDoc.ico │ ├── DownloadDoc.png │ ├── opacity_grey.png │ └── loading_spinner.gif ├── packages.config ├── OnenoteAddin.csproj.user ├── app.config ├── ComLocalServer │ ├── IClassFactory.cs │ ├── ReferenceCountedObject.cs │ ├── GarbageCollection.cs │ └── ClassFactoryBase.cs ├── ribbon.xml ├── PreviewForm.cs ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ └── Resources.resx ├── PreviewForm.Designer.cs ├── CCOMStreamWrapper.cs ├── PreviewForm.resx └── SettingsForm.cs ├── OnenoteAddinSetup └── reMarkableSync.OneNoteAddin.tmp ├── ConsoleTest ├── packages.config ├── App.config ├── Properties │ └── AssemblyInfo.cs ├── ConsoleTest.csproj └── Program.cs ├── RemarkableSync ├── document │ ├── DocumentMetadata.cs │ ├── content │ │ ├── IDocumentContent.cs │ │ ├── DocumentContentV1.cs │ │ ├── DocumentContentV2.cs │ │ └── DocumentContent.cs │ ├── v6 │ │ ├── SceneItems │ │ │ ├── SceneItem.cs │ │ │ ├── RmRectangle.cs │ │ │ ├── ParagraphStyle.cs │ │ │ ├── RmPoint.cs │ │ │ ├── GlyphRange.cs │ │ │ ├── RmLine.cs │ │ │ ├── RmText.cs │ │ │ └── Group.cs │ │ └── RmLines.cs │ ├── RmPenColor.cs │ ├── RmPen.cs │ ├── RmItem.cs │ ├── v5 │ │ ├── RmLinesDrawer.cs │ │ └── RmLines.cs │ ├── Extrametadata.cs │ ├── PageBinary.cs │ ├── Crdt.cs │ ├── RmDocument.cs │ └── TaggedBinaryReader.cs ├── Interfaces │ ├── IRmPageBinary.cs │ ├── IConfigStore.cs │ ├── ICloudApiClient.cs │ └── IRmDataSource.cs ├── RmLocalDoc.cs ├── App.config ├── MyScript │ ├── MyScriptRequest.cs │ ├── MyScriptResult.cs │ └── MyScriptClient.cs ├── RmCloudV1DownloadedDoc.cs ├── CloudApiV2Client.cs ├── Properties │ └── AssemblyInfo.cs ├── RmSftpDownloadedDoc.cs ├── LocalFolderDataSource.cs ├── CloudApiV1Client.cs ├── RmSftpDataSource.cs ├── WinRegistryConfigStore.cs ├── RmCloudV2DownloadedDoc.cs ├── V2HttpHelper.cs ├── RmSftpJsonTypes.cs ├── RmLines.cs └── RemarkableSync.csproj ├── .gitignore ├── LICENSE ├── RemarkableSync.sln └── readme.md /ComClient/Debug/ComClient.tlog/unsuccessfulbuild: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /OnenoteAddin/RegisterAddIn.reg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesf91/reMarkableSync/HEAD/OnenoteAddin/RegisterAddIn.reg -------------------------------------------------------------------------------- /OnenoteAddin/UnregisterAddIn.reg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesf91/reMarkableSync/HEAD/OnenoteAddin/UnregisterAddIn.reg -------------------------------------------------------------------------------- /OnenoteAddin/Resources/Settings.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesf91/reMarkableSync/HEAD/OnenoteAddin/Resources/Settings.ico -------------------------------------------------------------------------------- /OnenoteAddin/Resources/Settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesf91/reMarkableSync/HEAD/OnenoteAddin/Resources/Settings.png -------------------------------------------------------------------------------- /OnenoteAddin/Resources/DownloadDoc.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesf91/reMarkableSync/HEAD/OnenoteAddin/Resources/DownloadDoc.ico -------------------------------------------------------------------------------- /OnenoteAddin/Resources/DownloadDoc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesf91/reMarkableSync/HEAD/OnenoteAddin/Resources/DownloadDoc.png -------------------------------------------------------------------------------- /OnenoteAddin/Resources/opacity_grey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesf91/reMarkableSync/HEAD/OnenoteAddin/Resources/opacity_grey.png -------------------------------------------------------------------------------- /OnenoteAddin/Resources/loading_spinner.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesf91/reMarkableSync/HEAD/OnenoteAddin/Resources/loading_spinner.gif -------------------------------------------------------------------------------- /OnenoteAddinSetup/reMarkableSync.OneNoteAddin.tmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamesf91/reMarkableSync/HEAD/OnenoteAddinSetup/reMarkableSync.OneNoteAddin.tmp -------------------------------------------------------------------------------- /ConsoleTest/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /OnenoteAddin/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /RemarkableSync/document/DocumentMetadata.cs: -------------------------------------------------------------------------------- 1 | namespace RemarkableSync.document 2 | { 3 | public class DocumentMetadata 4 | { 5 | } 6 | } 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | */.vs/ 2 | */bin/ 3 | */obj/ 4 | */packages/ 5 | 6 | .vs/ 7 | packages/ 8 | 9 | 10 | *.exe 11 | *.log 12 | *.tlb 13 | *.msi 14 | *.vcxproj.user 15 | /backup 16 | /samplepages 17 | -------------------------------------------------------------------------------- /ComClient/Debug/ComClient.tlog/ComClient.lastbuildstate: -------------------------------------------------------------------------------- 1 | PlatformToolSet=v142:VCToolArchitecture=Native32Bit:VCToolsVersion=14.28.29333:TargetPlatformVersion=10.0.18362.0: 2 | Debug|Win32|D:\Codebase\reMarkable\RemarkableSync\| 3 | -------------------------------------------------------------------------------- /RemarkableSync/document/content/IDocumentContent.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace RemarkableSync.document 4 | { 5 | public interface IDocumentContent 6 | { 7 | List getPages(); 8 | } 9 | } 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /ComClient/ComClient.cpp: -------------------------------------------------------------------------------- 1 | // ComClient.cpp : This file contains the 'main' function. Program execution begins and ends there. 2 | // 3 | 4 | #include 5 | #import "OnenoteAddin.tlb" 6 | 7 | int main() 8 | { 9 | std::cout << "Hello World!\n"; 10 | } 11 | 12 | -------------------------------------------------------------------------------- /RemarkableSync/document/v6/SceneItems/SceneItem.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace RemarkableSync.document.v6.SceneItems 8 | { 9 | internal class SceneItem 10 | { 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /RemarkableSync/Interfaces/IRmPageBinary.cs: -------------------------------------------------------------------------------- 1 | using RemarkableSync.MyScript; 2 | using System; 3 | using System.Drawing; 4 | 5 | namespace RemarkableSync 6 | { 7 | public interface IRmPageBinary 8 | { 9 | Bitmap GetBitmap(); 10 | 11 | Tuple GetMyScriptFormat(); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /RemarkableSync/document/v6/SceneItems/RmRectangle.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Net.NetworkInformation; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace RemarkableSync.document.v6.SceneItems 9 | { 10 | internal class RmRectangle 11 | { 12 | public float x, y, w, h; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /RemarkableSync/Interfaces/IConfigStore.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace RemarkableSync 8 | { 9 | public interface IConfigStore : IDisposable 10 | { 11 | string GetConfig(string key); 12 | 13 | bool SetConfigs(Dictionary configs); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /RemarkableSync/document/content/DocumentContentV1.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Linq; 3 | 4 | namespace RemarkableSync.document 5 | { 6 | public class DocumentContentV1 : DocumentContent 7 | { 8 | public string[] pages { get; set; } 9 | 10 | public override List getPages() 11 | { 12 | return pages.ToList(); 13 | } 14 | } 15 | } 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /RemarkableSync/document/v6/SceneItems/ParagraphStyle.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace RemarkableSync.document.v6.SceneItems 8 | { 9 | //Text paragraph style. 10 | public enum ParagraphStyle 11 | { 12 | BASIC = 0, 13 | PLAIN = 1, 14 | HEADING = 2, 15 | BOLD = 3, 16 | BULLET = 4, 17 | BULLET2 = 5 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /RemarkableSync/document/v6/SceneItems/RmPoint.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace RemarkableSync.document.v6.SceneItems 8 | { 9 | internal class RmPoint 10 | { 11 | public float x; 12 | public float y; 13 | public int speed; 14 | public int direction; 15 | public int width; 16 | public int pressure; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /RemarkableSync/document/RmPenColor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace RemarkableSync.document 8 | { 9 | public enum RmPenColor 10 | { 11 | BLACK = 0, 12 | GREY = 1, 13 | WHITE = 2, 14 | YELLOW = 3, 15 | GREEN = 4, 16 | PINK = 5, 17 | BLUE = 6, 18 | RED = 7, 19 | GRAY_OVERLAP = 8 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /OnenoteAddin/OnenoteAddin.csproj.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | publish\ 5 | 6 | 7 | 8 | 9 | 10 | en-US 11 | false 12 | 13 | -------------------------------------------------------------------------------- /RemarkableSync/Interfaces/ICloudApiClient.cs: -------------------------------------------------------------------------------- 1 | using RemarkableSync.document; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Threading; 5 | using System.Threading.Tasks; 6 | 7 | namespace RemarkableSync 8 | { 9 | interface ICloudApiClient : IDisposable 10 | { 11 | Task> GetAllItems(CancellationToken cancellationToken, IProgress progress); 12 | 13 | Task DownloadDocument(string ID, CancellationToken cancellationToken, IProgress progress); 14 | 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /RemarkableSync/Interfaces/IRmDataSource.cs: -------------------------------------------------------------------------------- 1 | using RemarkableSync.document; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Threading; 5 | using System.Threading.Tasks; 6 | 7 | namespace RemarkableSync 8 | { 9 | public interface IRmDataSource: IDisposable 10 | { 11 | Task> GetItemHierarchy(CancellationToken cancellationToken, IProgress progress); 12 | 13 | Task DownloadDocument(string ID, CancellationToken cancellationToken, IProgress progress); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /RemarkableSync/document/v6/SceneItems/GlyphRange.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Net.NetworkInformation; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace RemarkableSync.document.v6.SceneItems 9 | { 10 | internal class GlyphRange 11 | { 12 | public int start; 13 | public int length; 14 | public String text; 15 | public RmPenColor color; 16 | public List rectangles = new List(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /RemarkableSync/RmLocalDoc.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Net.Http; 6 | using System.Threading; 7 | using System.Threading.Tasks; 8 | 9 | namespace RemarkableSync 10 | { 11 | class RmLocalDoc : RmDocument 12 | { 13 | private V2HttpHelper _httpHelper; 14 | private object _taskProgress; 15 | 16 | public RmLocalDoc(string id) : base(id) 17 | { 18 | LoadDocumentContent(); 19 | } 20 | 21 | public RmLocalDoc(string id, string root_path) : base(id, root_path) 22 | { 23 | LoadDocumentContent(); 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /OnenoteAddin/app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /OnenoteAddin/ComLocalServer/IClassFactory.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.InteropServices; 3 | 4 | namespace RemarkableSync.OnenoteAddin 5 | { 6 | // Interface IClassFactory is here to provide a C# definition of the 7 | // COM IClassFactory interface. 8 | [ 9 | ComImport, // This interface originated from COM. 10 | ComVisible(false), // It is not hard to imagine that this interface must not be exposed to COM. 11 | InterfaceType(ComInterfaceType.InterfaceIsIUnknown), // Indicate that this interface is not IDispatch-based. 12 | Guid("00000001-0000-0000-C000-000000000046") // This GUID is the actual GUID of IClassFactory. 13 | ] 14 | public interface IClassFactory 15 | { 16 | void CreateInstance(IntPtr pUnkOuter, ref Guid riid, out IntPtr ppvObject); 17 | void LockServer(bool fLock); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /RemarkableSync/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /RemarkableSync/document/v6/SceneItems/RmLine.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Drawing; 4 | using System.Linq; 5 | using System.Net.NetworkInformation; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | 9 | namespace RemarkableSync.document.v6.SceneItems 10 | { 11 | internal class RmLine 12 | { 13 | public RmPenColor penColor; 14 | public RmPen pen; 15 | public List points = new List(); 16 | public double thickness_scale; 17 | public float starting_length; 18 | 19 | public bool IsVisible() 20 | { 21 | switch (pen) 22 | { 23 | case RmPen.ERASER: 24 | case RmPen.ERASER_AREA: 25 | case RmPen.ERASER_ALL: 26 | return false; 27 | default: 28 | return true; 29 | } 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /RemarkableSync/MyScript/MyScriptRequest.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace RemarkableSync.MyScript 4 | { 5 | 6 | public class HwrRequestBundle 7 | { 8 | public HwrRequest Request { get; set; } 9 | 10 | public List Bounds { get; set; } 11 | 12 | } 13 | 14 | public class HwrRequest 15 | { 16 | public int xDPI { get; set; } 17 | public int yDPI { get; set; } 18 | public string contentType { get; set; } 19 | public Configuration configuration { get; set; } 20 | public StrokeGroup[] strokeGroups { get; set; } 21 | } 22 | 23 | public class StrokeGroup 24 | { 25 | public Stroke[] strokes { get; set; } 26 | } 27 | 28 | public class Stroke 29 | { 30 | public int[] x { get; set; } 31 | public int[] y { get; set; } 32 | } 33 | 34 | public class Configuration 35 | { 36 | public string lang { get; set; } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /OnenoteAddin/ribbon.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 12 | 13 | 14 |