├── Jupyter Notebook Viewer ├── .gitignore ├── Images.xcassets │ └── AppIcon.appiconset │ │ ├── icon_128x128.png │ │ ├── icon_16x16.png │ │ ├── icon_256x256.png │ │ ├── icon_32x32.png │ │ ├── icon_512x512.png │ │ ├── icon_16x16@2x.png │ │ ├── icon_32x32@2x.png │ │ ├── icon_128x128@2x.png │ │ ├── icon_256x256@2x.png │ │ ├── icon_512x512@2x.png │ │ └── Contents.json ├── AppDelegate.swift ├── Document.swift ├── Info.plist ├── Credits.rtf ├── template.html.in ├── ViewController.swift └── Base.lproj │ └── Main.storyboard ├── .gitignore ├── screenshot.png ├── .gitmodules ├── icons ├── Jupyter Notebook Document.iconset │ ├── icon_16x16.png │ ├── icon_32x32.png │ ├── icon_128x128.png │ ├── icon_16x16@2x.png │ ├── icon_256x256.png │ ├── icon_32x32@2x.png │ ├── icon_512x512.png │ ├── icon_128x128@2x.png │ ├── icon_256x256@2x.png │ └── icon_512x512@2x.png ├── build-app-iconset.sh ├── build-document-iconset.sh ├── README.md └── viewer-app.svg ├── Jupyter Notebook Viewer.xcodeproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── project.pbxproj ├── LICENSE.md └── README.md /Jupyter Notebook Viewer/.gitignore: -------------------------------------------------------------------------------- 1 | nbv.js 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | *.swp 3 | 4 | build/ 5 | xcuserdata/ 6 | -------------------------------------------------------------------------------- /screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuxu/nbviewer-app/HEAD/screenshot.png -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "ipynb-quicklook"] 2 | path = quicklook 3 | url = https://github.com/tuxu/ipynb-quicklook.git 4 | -------------------------------------------------------------------------------- /icons/Jupyter Notebook Document.iconset/icon_16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuxu/nbviewer-app/HEAD/icons/Jupyter Notebook Document.iconset/icon_16x16.png -------------------------------------------------------------------------------- /icons/Jupyter Notebook Document.iconset/icon_32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuxu/nbviewer-app/HEAD/icons/Jupyter Notebook Document.iconset/icon_32x32.png -------------------------------------------------------------------------------- /icons/Jupyter Notebook Document.iconset/icon_128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuxu/nbviewer-app/HEAD/icons/Jupyter Notebook Document.iconset/icon_128x128.png -------------------------------------------------------------------------------- /icons/Jupyter Notebook Document.iconset/icon_16x16@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuxu/nbviewer-app/HEAD/icons/Jupyter Notebook Document.iconset/icon_16x16@2x.png -------------------------------------------------------------------------------- /icons/Jupyter Notebook Document.iconset/icon_256x256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuxu/nbviewer-app/HEAD/icons/Jupyter Notebook Document.iconset/icon_256x256.png -------------------------------------------------------------------------------- /icons/Jupyter Notebook Document.iconset/icon_32x32@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuxu/nbviewer-app/HEAD/icons/Jupyter Notebook Document.iconset/icon_32x32@2x.png -------------------------------------------------------------------------------- /icons/Jupyter Notebook Document.iconset/icon_512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuxu/nbviewer-app/HEAD/icons/Jupyter Notebook Document.iconset/icon_512x512.png -------------------------------------------------------------------------------- /icons/Jupyter Notebook Document.iconset/icon_128x128@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuxu/nbviewer-app/HEAD/icons/Jupyter Notebook Document.iconset/icon_128x128@2x.png -------------------------------------------------------------------------------- /icons/Jupyter Notebook Document.iconset/icon_256x256@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuxu/nbviewer-app/HEAD/icons/Jupyter Notebook Document.iconset/icon_256x256@2x.png -------------------------------------------------------------------------------- /icons/Jupyter Notebook Document.iconset/icon_512x512@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuxu/nbviewer-app/HEAD/icons/Jupyter Notebook Document.iconset/icon_512x512@2x.png -------------------------------------------------------------------------------- /Jupyter Notebook Viewer/Images.xcassets/AppIcon.appiconset/icon_128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuxu/nbviewer-app/HEAD/Jupyter Notebook Viewer/Images.xcassets/AppIcon.appiconset/icon_128x128.png -------------------------------------------------------------------------------- /Jupyter Notebook Viewer/Images.xcassets/AppIcon.appiconset/icon_16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuxu/nbviewer-app/HEAD/Jupyter Notebook Viewer/Images.xcassets/AppIcon.appiconset/icon_16x16.png -------------------------------------------------------------------------------- /Jupyter Notebook Viewer/Images.xcassets/AppIcon.appiconset/icon_256x256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuxu/nbviewer-app/HEAD/Jupyter Notebook Viewer/Images.xcassets/AppIcon.appiconset/icon_256x256.png -------------------------------------------------------------------------------- /Jupyter Notebook Viewer/Images.xcassets/AppIcon.appiconset/icon_32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuxu/nbviewer-app/HEAD/Jupyter Notebook Viewer/Images.xcassets/AppIcon.appiconset/icon_32x32.png -------------------------------------------------------------------------------- /Jupyter Notebook Viewer/Images.xcassets/AppIcon.appiconset/icon_512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuxu/nbviewer-app/HEAD/Jupyter Notebook Viewer/Images.xcassets/AppIcon.appiconset/icon_512x512.png -------------------------------------------------------------------------------- /Jupyter Notebook Viewer/Images.xcassets/AppIcon.appiconset/icon_16x16@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuxu/nbviewer-app/HEAD/Jupyter Notebook Viewer/Images.xcassets/AppIcon.appiconset/icon_16x16@2x.png -------------------------------------------------------------------------------- /Jupyter Notebook Viewer/Images.xcassets/AppIcon.appiconset/icon_32x32@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuxu/nbviewer-app/HEAD/Jupyter Notebook Viewer/Images.xcassets/AppIcon.appiconset/icon_32x32@2x.png -------------------------------------------------------------------------------- /Jupyter Notebook Viewer/Images.xcassets/AppIcon.appiconset/icon_128x128@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuxu/nbviewer-app/HEAD/Jupyter Notebook Viewer/Images.xcassets/AppIcon.appiconset/icon_128x128@2x.png -------------------------------------------------------------------------------- /Jupyter Notebook Viewer/Images.xcassets/AppIcon.appiconset/icon_256x256@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuxu/nbviewer-app/HEAD/Jupyter Notebook Viewer/Images.xcassets/AppIcon.appiconset/icon_256x256@2x.png -------------------------------------------------------------------------------- /Jupyter Notebook Viewer/Images.xcassets/AppIcon.appiconset/icon_512x512@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuxu/nbviewer-app/HEAD/Jupyter Notebook Viewer/Images.xcassets/AppIcon.appiconset/icon_512x512@2x.png -------------------------------------------------------------------------------- /Jupyter Notebook Viewer.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Jupyter Notebook Viewer.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Jupyter Notebook Viewer/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // Jupyter Notebook Viewer 4 | // 5 | // Created by Tino Wagner on 29.01.17. 6 | // Copyright © 2017 Tino Wagner. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | @NSApplicationMain 12 | class AppDelegate: NSObject, NSApplicationDelegate { 13 | 14 | 15 | 16 | func applicationDidFinishLaunching(_ aNotification: Notification) { 17 | // Insert code here to initialize your application 18 | } 19 | 20 | func applicationWillTerminate(_ aNotification: Notification) { 21 | // Insert code here to tear down your application 22 | } 23 | 24 | 25 | } 26 | 27 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | ===================== 3 | 4 | Copyright © 2017 Tino Wagner 5 | 6 | Permission is hereby granted, free of charge, to any person 7 | obtaining a copy of this software and associated documentation 8 | files (the “Software”), to deal in the Software without 9 | restriction, including without limitation the rights to use, 10 | copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the 12 | Software is furnished to do so, subject to the following 13 | conditions: 14 | 15 | The above copyright notice and this permission notice shall be 16 | included in all copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, 19 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 20 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 21 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 22 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 23 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 24 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 25 | OTHER DEALINGS IN THE SOFTWARE. 26 | -------------------------------------------------------------------------------- /icons/build-app-iconset.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Create an App iconset for Jupyter Notebook Viewer from an SVG template 4 | # 5 | target_folder="$(pwd)/../Jupyter Notebook Viewer/Images.xcassets/AppIcon.appiconset" 6 | svg_icon_file=$(pwd)/viewer-app.svg 7 | iconsizes="16 32 128 256 512" 8 | for size in $iconsizes ; do 9 | echo $size 10 | 11 | output_name="${target_folder}/icon_${size}x${size}.png" 12 | inkscape ${svg_icon_file} \ 13 | --export-png="${output_name}" \ 14 | --export-width=$(echo 4*$size | bc) --export-height=$(echo 4*$size | bc) 15 | convert "${output_name}" -colorspace RGB +sigmoidal-contrast "6.5,50%" \ 16 | -filter Lanczos -resize "${size}x${size}" \ 17 | -sigmoidal-contrast "6.5,50%" -colorspace sRGB "${output_name}" 18 | 19 | output_name="${target_folder}/icon_${size}x${size}@2x.png" 20 | inkscape ${svg_icon_file} \ 21 | --export-png="${output_name}" \ 22 | --export-width=$(echo 4*$size | bc) --export-height=$(echo 4*$size | bc) 23 | convert "${output_name}" -colorspace RGB +sigmoidal-contrast "6.5,50%" \ 24 | -filter Lanczos -resize $(echo 2*$size | bc)x$(echo 2*$size | bc) \ 25 | -sigmoidal-contrast "6.5,50%" -colorspace sRGB "${output_name}" 26 | done 27 | pushd "${target_folder}" 28 | optipng *.png 29 | popd 30 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Jupyter Notebook Viewer 2 | 3 | ![Icon](Jupyter%20Notebook%20Viewer/Images.xcassets/AppIcon.appiconset/icon_256x256.png) 4 | 5 | A native macOS application to view 6 | [Jupyter](https://jupyter.org/)/[IPython](https://ipython.org/) notebooks. 7 | 8 | ## Features 9 | 10 | - Stand-alone, thanks to [nbviewer.js](https://github.com/kokes/nbviewer.js) 11 | - Integrated [Quick Look generator](https://github.com/tuxu/ipynb-quicklook/) 12 | - Nice icons 😎 13 | 14 | ## Getting started 15 | 16 | - Download `nbviewer-app.zip` 17 | ([Releases](https://github.com/tuxu/nbviewer-app/releases)) 18 | - Unzip and move `Jupyter Notebook Viewer.app` to `/Applications` and enjoy 👍 19 | - Alternatively: install via [Homebrew Cask](https://caskroom.github.io/): 20 | 21 | ``` 22 | $ brew install --cask jupyter-notebook-viewer 23 | ``` 24 | 25 | - Quick Look should work out of the box. If it doesn't, check 26 | `qlmanage -m plugins | grep ipynb` to see whether the plugin appears there. 27 | 28 | ## Screenshot 29 | 30 | ![Screenshot](screenshot.png) 31 | 32 | ## Acknowledgments 33 | 34 | - Ondrej Kokes for [nbviewer.js](https://github.com/kokes/nbviewer.js) 35 | 36 | ## License 37 | 38 | This project is licensed under the MIT license. See [LICENSE.md](LICENSE.md) for 39 | details. 40 | 41 | © 2017 [Tino Wagner](http://www.tinowagner.com/) 42 | -------------------------------------------------------------------------------- /Jupyter Notebook Viewer/Document.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Document.swift 3 | // Jupyter Notebook Viewer 4 | // 5 | // Created by Tino Wagner on 29.01.17. 6 | // Copyright © 2017 Tino Wagner. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | class Document: NSDocument { 12 | 13 | var jsonString:String = ""; 14 | 15 | override init() { 16 | super.init() 17 | } 18 | 19 | override class var autosavesInPlace: Bool { 20 | return false 21 | } 22 | 23 | override func makeWindowControllers() { 24 | // Returns the Storyboard that contains your Document window. 25 | let storyboard = NSStoryboard(name: "Main", bundle: nil) 26 | let windowController = storyboard.instantiateController(withIdentifier: "Document Window Controller") as! NSWindowController 27 | self.addWindowController(windowController) 28 | } 29 | 30 | override func read(from data: Data, ofType typeName: String) throws { 31 | // Load JSON data 32 | do { 33 | let json = try JSONSerialization.jsonObject(with: data, options: []) 34 | let jsonData = try JSONSerialization.data(withJSONObject: json, options: []) 35 | self.jsonString = String(data: jsonData, encoding: .utf8)! 36 | } catch { 37 | throw NSError(domain: NSOSStatusErrorDomain, code: readErr, userInfo: nil) 38 | } 39 | } 40 | 41 | 42 | } 43 | 44 | -------------------------------------------------------------------------------- /icons/build-document-iconset.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Create a document iconset for Jupyter notebook from an SVG template 4 | # 5 | base_icon=/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/GenericDocumentIcon.icns 6 | target_icon_name="Jupyter Notebook Document" 7 | svg_icon_file=$(pwd)/ipynb-document.svg 8 | iconutil --convert iconset --output "${target_icon_name}.iconset" "${base_icon}" 9 | iconsizes="16 32 128 256 512" 10 | for size in $iconsizes ; do 11 | echo $size 12 | 13 | output_name="$(pwd)/${target_icon_name}.iconset/icon_${size}x${size}.png" 14 | inkscape ${svg_icon_file} --export-id-only --export-id=v${size} \ 15 | --export-png="${output_name}" \ 16 | --export-width=$(echo 4*$size | bc) --export-height=$(echo 4*$size | bc) 17 | convert "${output_name}" -colorspace RGB +sigmoidal-contrast "6.5,50%" \ 18 | -filter Lanczos -resize "${size}x${size}" \ 19 | -sigmoidal-contrast "6.5,50%" -colorspace sRGB "${output_name}" 20 | 21 | output_name="$(pwd)/${target_icon_name}.iconset/icon_${size}x${size}@2x.png" 22 | inkscape ${svg_icon_file} --export-id-only --export-id=v${size}x2 \ 23 | --export-png="${output_name}" \ 24 | --export-width=$(echo 4*$size | bc) --export-height=$(echo 4*$size | bc) 25 | convert "${output_name}" -colorspace RGB +sigmoidal-contrast "6.5,50%" \ 26 | -filter Lanczos -resize $(echo 2*$size | bc)x$(echo 2*$size | bc) \ 27 | -sigmoidal-contrast "6.5,50%" -colorspace sRGB "${output_name}" 28 | done 29 | pushd "${target_icon_name}.iconset" 30 | optipng *.png 31 | popd 32 | -------------------------------------------------------------------------------- /Jupyter Notebook Viewer/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "16x16", 5 | "idiom" : "mac", 6 | "filename" : "icon_16x16.png", 7 | "scale" : "1x" 8 | }, 9 | { 10 | "size" : "16x16", 11 | "idiom" : "mac", 12 | "filename" : "icon_16x16@2x.png", 13 | "scale" : "2x" 14 | }, 15 | { 16 | "size" : "32x32", 17 | "idiom" : "mac", 18 | "filename" : "icon_32x32.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "32x32", 23 | "idiom" : "mac", 24 | "filename" : "icon_32x32@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "128x128", 29 | "idiom" : "mac", 30 | "filename" : "icon_128x128.png", 31 | "scale" : "1x" 32 | }, 33 | { 34 | "size" : "128x128", 35 | "idiom" : "mac", 36 | "filename" : "icon_128x128@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "256x256", 41 | "idiom" : "mac", 42 | "filename" : "icon_256x256.png", 43 | "scale" : "1x" 44 | }, 45 | { 46 | "size" : "256x256", 47 | "idiom" : "mac", 48 | "filename" : "icon_256x256@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "512x512", 53 | "idiom" : "mac", 54 | "filename" : "icon_512x512.png", 55 | "scale" : "1x" 56 | }, 57 | { 58 | "size" : "512x512", 59 | "idiom" : "mac", 60 | "filename" : "icon_512x512@2x.png", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } -------------------------------------------------------------------------------- /Jupyter Notebook Viewer/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDocumentTypes 8 | 9 | 10 | CFBundleTypeExtensions 11 | 12 | ipynb 13 | 14 | CFBundleTypeIconFile 15 | Jupyter Notebook Document.icns 16 | CFBundleTypeName 17 | Jupyter Notebook Document 18 | CFBundleTypeOSTypes 19 | 20 | ???? 21 | 22 | CFBundleTypeRole 23 | Viewer 24 | NSDocumentClass 25 | $(PRODUCT_MODULE_NAME).Document 26 | 27 | 28 | CFBundleExecutable 29 | $(EXECUTABLE_NAME) 30 | CFBundleIdentifier 31 | $(PRODUCT_BUNDLE_IDENTIFIER) 32 | CFBundleInfoDictionaryVersion 33 | 6.0 34 | CFBundleName 35 | $(PRODUCT_NAME) 36 | CFBundlePackageType 37 | APPL 38 | CFBundleShortVersionString 39 | 0.1.6 40 | CFBundleVersion 41 | 1 42 | LSMinimumSystemVersion 43 | $(MACOSX_DEPLOYMENT_TARGET) 44 | NSHumanReadableCopyright 45 | Copyright © 2017-2023 Tino Wagner. All rights reserved. 46 | NSMainStoryboardFile 47 | Main 48 | NSPrincipalClass 49 | NSApplication 50 | 51 | 52 | -------------------------------------------------------------------------------- /Jupyter Notebook Viewer/Credits.rtf: -------------------------------------------------------------------------------- 1 | {\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf810 2 | {\fonttbl\f0\fswiss\fcharset0 Helvetica;} 3 | {\colortbl;\red255\green255\blue255;} 4 | {\*\expandedcolortbl;;} 5 | \margl1440\margr1440\vieww9000\viewh8400\viewkind0 6 | \pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\qc\partightenfactor0 7 | 8 | \f0\b\fs24 \cf0 Website 9 | \b0 \ 10 | \pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\qc\partightenfactor0 11 | {\field{\*\fldinst{HYPERLINK "https://github.com/tuxu/nbviewer-app/"}}{\fldrslt \cf0 https://github.com/tuxu/nbviewer-app/}}\ 12 | \ 13 | \pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\qc\partightenfactor0 14 | 15 | \b \cf0 Project Jupyter 16 | \b0 \ 17 | \pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\qc\partightenfactor0 18 | {\field{\*\fldinst{HYPERLINK "http://jupyter.org/"}}{\fldrslt \cf0 https://jupyter.org/}}\ 19 | \ 20 | \pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\qc\partightenfactor0 21 | 22 | \b \cf0 With special thanks 23 | \b0 \ 24 | Ondrej Kokes for {\field{\*\fldinst{HYPERLINK "https://github.com/kokes/nbviewer.js"}}{\fldrslt nbviewer.js}}\ 25 | \ 26 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\partightenfactor0 27 | 28 | \b \cf0 Warranty Information 29 | \b0 \ 30 | \pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\qc\partightenfactor0 31 | \cf0 This program is licensed under the {\field{\*\fldinst{HYPERLINK "https://opensource.org/licenses/MIT"}}{\fldrslt MIT License}}.\ 32 | } -------------------------------------------------------------------------------- /icons/README.md: -------------------------------------------------------------------------------- 1 | # Icons 2 | 3 | The icons are based on the [Jupyter logos](https://github.com/jupyter/design/tree/master/logos) 4 | found in the [brand guide](https://github.com/jupyter/design/raw/master/brandguide/jupyter_brand_guide.pdf). 5 | 6 | # License 7 | 8 | ## Project Jupyter logo 9 | 10 | Copyright (c) 2014, Project Jupyter 11 | All rights reserved. 12 | 13 | Redistribution and use in source and binary forms, with or without 14 | modification, are permitted provided that the following conditions are met: 15 | 16 | * Redistributions of source code must retain the above copyright notice, this 17 | list of conditions and the following disclaimer. 18 | 19 | * Redistributions in binary form must reproduce the above copyright notice, 20 | this list of conditions and the following disclaimer in the documentation 21 | and/or other materials provided with the distribution. 22 | 23 | * Neither the name of the {organization} nor the names of its 24 | contributors may be used to endorse or promote products derived from 25 | this software without specific prior written permission. 26 | 27 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 28 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 29 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 30 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 31 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 32 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 33 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 34 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 35 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 36 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- /Jupyter Notebook Viewer/template.html.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 20 | 21 | 22 |
23 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /Jupyter Notebook Viewer/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // Jupyter Notebook Viewer 4 | // 5 | // Created by Tino Wagner on 29.01.17. 6 | // Copyright © 2017 Tino Wagner. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | import WebKit 11 | 12 | class ViewController: NSViewController, NSTextFinderBarContainer 13 | { 14 | @IBOutlet weak var webview: WKWebView! 15 | 16 | weak var document: Document? { 17 | let window = self.view.window! 18 | let windowController = window.windowController! 19 | return windowController.document as? Document 20 | } 21 | 22 | override func viewWillAppear() { 23 | // Render HTML 24 | let resourceURL = Bundle.main.resourceURL 25 | let templateURL = Bundle.main.url(forResource: "template", withExtension: "html") 26 | let templateString = try? String(contentsOf: templateURL!, encoding: .utf8) 27 | if (templateString != nil) { 28 | let jsonString = self.document!.jsonString 29 | let html = templateString!.replacingOccurrences(of: "%notebook-json%", with: jsonString) 30 | webview.loadHTMLString(html, baseURL: resourceURL) 31 | } 32 | textFinder.client = webview 33 | textFinder.findBarContainer = self 34 | } 35 | 36 | // MARK: Page Zoom - 37 | var zoomAmount = 1.0 { 38 | didSet { 39 | webview.evaluateJavaScript("document.body.style.zoom = '\(zoomAmount)'", completionHandler: nil) 40 | } 41 | } 42 | 43 | @IBAction func makeTextLarger(_ sender: Any?) { 44 | zoomAmount *= 1.1 45 | } 46 | 47 | @IBAction func makeTextSmaller(_ sender: Any?) { 48 | zoomAmount /= 1.1 49 | } 50 | 51 | @IBAction func makeTextStandardSize(_ sender: Any?) { 52 | zoomAmount = 1.0 53 | } 54 | 55 | // MARK: Text Search - 56 | 57 | var textFinder: NSTextFinder = NSTextFinder() 58 | 59 | @IBAction override func performTextFinderAction(_ sender: Any?) { 60 | guard let action = NSTextFinder.Action(rawValue: (sender as! NSMenuItem).tag) else { 61 | return 62 | } 63 | textFinder.performAction(action) 64 | } 65 | 66 | // MARK: NSTextFinderBarContainer 67 | 68 | var findBarView: NSView? { 69 | didSet { 70 | if let findBarView = findBarView { 71 | findBarView.frame = NSMakeRect(0, self.view.bounds.height - findBarView.frame.height, self.view.bounds.width, findBarView.frame.height) 72 | } 73 | } 74 | } 75 | 76 | var isFindBarVisible: Bool = false { 77 | didSet { 78 | if isFindBarVisible, let findBarView = findBarView { 79 | self.view.addSubview(findBarView) 80 | } else { 81 | findBarView?.removeFromSuperview() 82 | } 83 | } 84 | } 85 | 86 | func findBarViewDidChangeHeight() { 87 | if let findBarView = findBarView { 88 | findBarView.frame = NSMakeRect(0, self.view.bounds.height - findBarView.frame.height, self.view.bounds.width, findBarView.frame.height) 89 | } 90 | } 91 | 92 | func contentView() -> NSView? { 93 | view 94 | } 95 | 96 | } 97 | 98 | -------------------------------------------------------------------------------- /Jupyter Notebook Viewer.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 54; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 21038F4A1E3FEFA900BDC3F2 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 21038F491E3FEFA900BDC3F2 /* AppDelegate.swift */; }; 11 | 21038F4C1E3FEFA900BDC3F2 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 21038F4B1E3FEFA900BDC3F2 /* ViewController.swift */; }; 12 | 21038F4E1E3FEFA900BDC3F2 /* Document.swift in Sources */ = {isa = PBXBuildFile; fileRef = 21038F4D1E3FEFA900BDC3F2 /* Document.swift */; }; 13 | 21038F531E3FEFA900BDC3F2 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 21038F511E3FEFA900BDC3F2 /* Main.storyboard */; }; 14 | 2146E0441E4D27A8006732F9 /* ipynb-quicklook.qlgenerator in CopyFiles */ = {isa = PBXBuildFile; fileRef = 2146E0411E4D2749006732F9 /* ipynb-quicklook.qlgenerator */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 15 | 2146E0461E4D2A28006732F9 /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 2146E0451E4D2A28006732F9 /* Credits.rtf */; }; 16 | 21946AFD1E40B6FF0054C77E /* Jupyter Notebook Document.iconset in Resources */ = {isa = PBXBuildFile; fileRef = 21946AFC1E40B6FF0054C77E /* Jupyter Notebook Document.iconset */; }; 17 | 21946AFF1E40B8060054C77E /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 21946AFE1E40B8060054C77E /* Images.xcassets */; }; 18 | 409218E6245646800076A331 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 409218E5245646800076A331 /* WebKit.framework */; }; 19 | /* End PBXBuildFile section */ 20 | 21 | /* Begin PBXContainerItemProxy section */ 22 | 2146E0401E4D2749006732F9 /* PBXContainerItemProxy */ = { 23 | isa = PBXContainerItemProxy; 24 | containerPortal = 2146E03C1E4D2749006732F9 /* ipynb-quicklook.xcodeproj */; 25 | proxyType = 2; 26 | remoteGlobalIDString = 219F67431E37F49800CA4392; 27 | remoteInfo = "ipynb-quicklook"; 28 | }; 29 | 2146E0421E4D2792006732F9 /* PBXContainerItemProxy */ = { 30 | isa = PBXContainerItemProxy; 31 | containerPortal = 2146E03C1E4D2749006732F9 /* ipynb-quicklook.xcodeproj */; 32 | proxyType = 1; 33 | remoteGlobalIDString = 219F67421E37F49800CA4392; 34 | remoteInfo = "ipynb-quicklook"; 35 | }; 36 | /* End PBXContainerItemProxy section */ 37 | 38 | /* Begin PBXCopyFilesBuildPhase section */ 39 | 211BA7BE1E487345007C2FF4 /* CopyFiles */ = { 40 | isa = PBXCopyFilesBuildPhase; 41 | buildActionMask = 2147483647; 42 | dstPath = Contents/Library/QuickLook; 43 | dstSubfolderSpec = 1; 44 | files = ( 45 | 2146E0441E4D27A8006732F9 /* ipynb-quicklook.qlgenerator in CopyFiles */, 46 | ); 47 | runOnlyForDeploymentPostprocessing = 0; 48 | }; 49 | /* End PBXCopyFilesBuildPhase section */ 50 | 51 | /* Begin PBXFileReference section */ 52 | 21038F461E3FEFA900BDC3F2 /* Jupyter Notebook Viewer.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Jupyter Notebook Viewer.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 53 | 21038F491E3FEFA900BDC3F2 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 54 | 21038F4B1E3FEFA900BDC3F2 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 55 | 21038F4D1E3FEFA900BDC3F2 /* Document.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Document.swift; sourceTree = ""; }; 56 | 21038F521E3FEFA900BDC3F2 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 57 | 21038F541E3FEFA900BDC3F2 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 58 | 2146E03C1E4D2749006732F9 /* ipynb-quicklook.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = "ipynb-quicklook.xcodeproj"; path = "quicklook/ipynb-quicklook.xcodeproj"; sourceTree = ""; }; 59 | 2146E0451E4D2A28006732F9 /* Credits.rtf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.rtf; name = Credits.rtf; path = "Jupyter Notebook Viewer/Credits.rtf"; sourceTree = ""; }; 60 | 21946AFC1E40B6FF0054C77E /* Jupyter Notebook Document.iconset */ = {isa = PBXFileReference; lastKnownFileType = folder.iconset; name = "Jupyter Notebook Document.iconset"; path = "Icons/Jupyter Notebook Document.iconset"; sourceTree = ""; }; 61 | 21946AFE1E40B8060054C77E /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 62 | 409218E5245646800076A331 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = System/Library/Frameworks/WebKit.framework; sourceTree = SDKROOT; }; 63 | /* End PBXFileReference section */ 64 | 65 | /* Begin PBXFrameworksBuildPhase section */ 66 | 21038F431E3FEFA900BDC3F2 /* Frameworks */ = { 67 | isa = PBXFrameworksBuildPhase; 68 | buildActionMask = 2147483647; 69 | files = ( 70 | 409218E6245646800076A331 /* WebKit.framework in Frameworks */, 71 | ); 72 | runOnlyForDeploymentPostprocessing = 0; 73 | }; 74 | /* End PBXFrameworksBuildPhase section */ 75 | 76 | /* Begin PBXGroup section */ 77 | 21038F3D1E3FEFA900BDC3F2 = { 78 | isa = PBXGroup; 79 | children = ( 80 | 2146E03C1E4D2749006732F9 /* ipynb-quicklook.xcodeproj */, 81 | 21B3ED711E401F60000003D0 /* Resources */, 82 | 21038F481E3FEFA900BDC3F2 /* Jupyter Notebook Viewer */, 83 | 21038F471E3FEFA900BDC3F2 /* Products */, 84 | 409218E4245646800076A331 /* Frameworks */, 85 | ); 86 | sourceTree = ""; 87 | }; 88 | 21038F471E3FEFA900BDC3F2 /* Products */ = { 89 | isa = PBXGroup; 90 | children = ( 91 | 21038F461E3FEFA900BDC3F2 /* Jupyter Notebook Viewer.app */, 92 | ); 93 | name = Products; 94 | sourceTree = ""; 95 | }; 96 | 21038F481E3FEFA900BDC3F2 /* Jupyter Notebook Viewer */ = { 97 | isa = PBXGroup; 98 | children = ( 99 | 21038F491E3FEFA900BDC3F2 /* AppDelegate.swift */, 100 | 21038F4B1E3FEFA900BDC3F2 /* ViewController.swift */, 101 | 21038F4D1E3FEFA900BDC3F2 /* Document.swift */, 102 | 21038F511E3FEFA900BDC3F2 /* Main.storyboard */, 103 | 21038F541E3FEFA900BDC3F2 /* Info.plist */, 104 | 21946AFE1E40B8060054C77E /* Images.xcassets */, 105 | ); 106 | path = "Jupyter Notebook Viewer"; 107 | sourceTree = ""; 108 | }; 109 | 2146E03D1E4D2749006732F9 /* Products */ = { 110 | isa = PBXGroup; 111 | children = ( 112 | 2146E0411E4D2749006732F9 /* ipynb-quicklook.qlgenerator */, 113 | ); 114 | name = Products; 115 | sourceTree = ""; 116 | }; 117 | 21B3ED711E401F60000003D0 /* Resources */ = { 118 | isa = PBXGroup; 119 | children = ( 120 | 2146E0451E4D2A28006732F9 /* Credits.rtf */, 121 | 21946AFC1E40B6FF0054C77E /* Jupyter Notebook Document.iconset */, 122 | ); 123 | name = Resources; 124 | sourceTree = ""; 125 | }; 126 | 409218E4245646800076A331 /* Frameworks */ = { 127 | isa = PBXGroup; 128 | children = ( 129 | 409218E5245646800076A331 /* WebKit.framework */, 130 | ); 131 | name = Frameworks; 132 | sourceTree = ""; 133 | }; 134 | /* End PBXGroup section */ 135 | 136 | /* Begin PBXNativeTarget section */ 137 | 21038F451E3FEFA900BDC3F2 /* Jupyter Notebook Viewer */ = { 138 | isa = PBXNativeTarget; 139 | buildConfigurationList = 21038F571E3FEFA900BDC3F2 /* Build configuration list for PBXNativeTarget "Jupyter Notebook Viewer" */; 140 | buildPhases = ( 141 | 21038F421E3FEFA900BDC3F2 /* Sources */, 142 | 21038F431E3FEFA900BDC3F2 /* Frameworks */, 143 | 21038F441E3FEFA900BDC3F2 /* Resources */, 144 | 211BA7BE1E487345007C2FF4 /* CopyFiles */, 145 | 4007CA5D27FFBDA200478B0E /* Run Script */, 146 | ); 147 | buildRules = ( 148 | ); 149 | dependencies = ( 150 | 2146E0431E4D2792006732F9 /* PBXTargetDependency */, 151 | ); 152 | name = "Jupyter Notebook Viewer"; 153 | productName = "Jupyter Notebook Viewer"; 154 | productReference = 21038F461E3FEFA900BDC3F2 /* Jupyter Notebook Viewer.app */; 155 | productType = "com.apple.product-type.application"; 156 | }; 157 | /* End PBXNativeTarget section */ 158 | 159 | /* Begin PBXProject section */ 160 | 21038F3E1E3FEFA900BDC3F2 /* Project object */ = { 161 | isa = PBXProject; 162 | attributes = { 163 | BuildIndependentTargetsInParallel = YES; 164 | LastSwiftUpdateCheck = 0820; 165 | LastUpgradeCheck = 1500; 166 | ORGANIZATIONNAME = "Tino Wagner"; 167 | TargetAttributes = { 168 | 21038F451E3FEFA900BDC3F2 = { 169 | CreatedOnToolsVersion = 8.2.1; 170 | LastSwiftMigration = 1140; 171 | }; 172 | }; 173 | }; 174 | buildConfigurationList = 21038F411E3FEFA900BDC3F2 /* Build configuration list for PBXProject "Jupyter Notebook Viewer" */; 175 | compatibilityVersion = "Xcode 3.2"; 176 | developmentRegion = en; 177 | hasScannedForEncodings = 0; 178 | knownRegions = ( 179 | en, 180 | Base, 181 | ); 182 | mainGroup = 21038F3D1E3FEFA900BDC3F2; 183 | productRefGroup = 21038F471E3FEFA900BDC3F2 /* Products */; 184 | projectDirPath = ""; 185 | projectReferences = ( 186 | { 187 | ProductGroup = 2146E03D1E4D2749006732F9 /* Products */; 188 | ProjectRef = 2146E03C1E4D2749006732F9 /* ipynb-quicklook.xcodeproj */; 189 | }, 190 | ); 191 | projectRoot = ""; 192 | targets = ( 193 | 21038F451E3FEFA900BDC3F2 /* Jupyter Notebook Viewer */, 194 | ); 195 | }; 196 | /* End PBXProject section */ 197 | 198 | /* Begin PBXReferenceProxy section */ 199 | 2146E0411E4D2749006732F9 /* ipynb-quicklook.qlgenerator */ = { 200 | isa = PBXReferenceProxy; 201 | fileType = wrapper.cfbundle; 202 | path = "ipynb-quicklook.qlgenerator"; 203 | remoteRef = 2146E0401E4D2749006732F9 /* PBXContainerItemProxy */; 204 | sourceTree = BUILT_PRODUCTS_DIR; 205 | }; 206 | /* End PBXReferenceProxy section */ 207 | 208 | /* Begin PBXResourcesBuildPhase section */ 209 | 21038F441E3FEFA900BDC3F2 /* Resources */ = { 210 | isa = PBXResourcesBuildPhase; 211 | buildActionMask = 2147483647; 212 | files = ( 213 | 21946AFD1E40B6FF0054C77E /* Jupyter Notebook Document.iconset in Resources */, 214 | 2146E0461E4D2A28006732F9 /* Credits.rtf in Resources */, 215 | 21946AFF1E40B8060054C77E /* Images.xcassets in Resources */, 216 | 21038F531E3FEFA900BDC3F2 /* Main.storyboard in Resources */, 217 | ); 218 | runOnlyForDeploymentPostprocessing = 0; 219 | }; 220 | /* End PBXResourcesBuildPhase section */ 221 | 222 | /* Begin PBXShellScriptBuildPhase section */ 223 | 4007CA5D27FFBDA200478B0E /* Run Script */ = { 224 | isa = PBXShellScriptBuildPhase; 225 | alwaysOutOfDate = 1; 226 | buildActionMask = 2147483647; 227 | files = ( 228 | ); 229 | inputFileListPaths = ( 230 | ); 231 | inputPaths = ( 232 | "$(SRCROOT)/Jupyter Notebook Viewer/template.html.in", 233 | ); 234 | name = "Run Script"; 235 | outputFileListPaths = ( 236 | ); 237 | outputPaths = ( 238 | ); 239 | runOnlyForDeploymentPostprocessing = 0; 240 | shellPath = /bin/sh; 241 | shellScript = "# needs: npm install -g inliner\nexport PATH=/opt/homebrew/bin:$PATH\necho \"Inlining JS + CSS dependencies ...\"\nset -ex\noutput_dir=\"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}\"\nmkdir -p \"$output_dir\"\noutput=\"$output_dir/template.html\"\ninliner -V\ncp \"$SRCROOT/quicklook/nbviewer.js/lib/nbv.js\" \"$(dirname \"$SCRIPT_INPUT_FILE_0\")/\"\ncmdline=\"inliner -m \\\"$SCRIPT_INPUT_FILE_0\\\" > \\\"$output\\\"\"\nscript -q -t0 /dev/null sh -c \"$cmdline\"\n"; 242 | }; 243 | /* End PBXShellScriptBuildPhase section */ 244 | 245 | /* Begin PBXSourcesBuildPhase section */ 246 | 21038F421E3FEFA900BDC3F2 /* Sources */ = { 247 | isa = PBXSourcesBuildPhase; 248 | buildActionMask = 2147483647; 249 | files = ( 250 | 21038F4C1E3FEFA900BDC3F2 /* ViewController.swift in Sources */, 251 | 21038F4A1E3FEFA900BDC3F2 /* AppDelegate.swift in Sources */, 252 | 21038F4E1E3FEFA900BDC3F2 /* Document.swift in Sources */, 253 | ); 254 | runOnlyForDeploymentPostprocessing = 0; 255 | }; 256 | /* End PBXSourcesBuildPhase section */ 257 | 258 | /* Begin PBXTargetDependency section */ 259 | 2146E0431E4D2792006732F9 /* PBXTargetDependency */ = { 260 | isa = PBXTargetDependency; 261 | name = "ipynb-quicklook"; 262 | targetProxy = 2146E0421E4D2792006732F9 /* PBXContainerItemProxy */; 263 | }; 264 | /* End PBXTargetDependency section */ 265 | 266 | /* Begin PBXVariantGroup section */ 267 | 21038F511E3FEFA900BDC3F2 /* Main.storyboard */ = { 268 | isa = PBXVariantGroup; 269 | children = ( 270 | 21038F521E3FEFA900BDC3F2 /* Base */, 271 | ); 272 | name = Main.storyboard; 273 | sourceTree = ""; 274 | }; 275 | /* End PBXVariantGroup section */ 276 | 277 | /* Begin XCBuildConfiguration section */ 278 | 21038F551E3FEFA900BDC3F2 /* Debug */ = { 279 | isa = XCBuildConfiguration; 280 | buildSettings = { 281 | ALWAYS_SEARCH_USER_PATHS = NO; 282 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 283 | CLANG_ANALYZER_NONNULL = YES; 284 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 285 | CLANG_CXX_LIBRARY = "libc++"; 286 | CLANG_ENABLE_MODULES = YES; 287 | CLANG_ENABLE_OBJC_ARC = YES; 288 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 289 | CLANG_WARN_BOOL_CONVERSION = YES; 290 | CLANG_WARN_COMMA = YES; 291 | CLANG_WARN_CONSTANT_CONVERSION = YES; 292 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 293 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 294 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 295 | CLANG_WARN_EMPTY_BODY = YES; 296 | CLANG_WARN_ENUM_CONVERSION = YES; 297 | CLANG_WARN_INFINITE_RECURSION = YES; 298 | CLANG_WARN_INT_CONVERSION = YES; 299 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 300 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 301 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 302 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 303 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 304 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 305 | CLANG_WARN_STRICT_PROTOTYPES = YES; 306 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 307 | CLANG_WARN_UNREACHABLE_CODE = YES; 308 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 309 | CODE_SIGN_IDENTITY = "-"; 310 | CODE_SIGN_INJECT_BASE_ENTITLEMENTS = YES; 311 | COPY_PHASE_STRIP = NO; 312 | DEAD_CODE_STRIPPING = YES; 313 | DEBUG_INFORMATION_FORMAT = dwarf; 314 | ENABLE_STRICT_OBJC_MSGSEND = YES; 315 | ENABLE_TESTABILITY = YES; 316 | ENABLE_USER_SCRIPT_SANDBOXING = YES; 317 | GCC_C_LANGUAGE_STANDARD = gnu99; 318 | GCC_DYNAMIC_NO_PIC = NO; 319 | GCC_NO_COMMON_BLOCKS = YES; 320 | GCC_OPTIMIZATION_LEVEL = 0; 321 | GCC_PREPROCESSOR_DEFINITIONS = ( 322 | "DEBUG=1", 323 | "$(inherited)", 324 | ); 325 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 326 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 327 | GCC_WARN_UNDECLARED_SELECTOR = YES; 328 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 329 | GCC_WARN_UNUSED_FUNCTION = YES; 330 | GCC_WARN_UNUSED_VARIABLE = YES; 331 | MACOSX_DEPLOYMENT_TARGET = 10.13; 332 | MTL_ENABLE_DEBUG_INFO = YES; 333 | ONLY_ACTIVE_ARCH = YES; 334 | SDKROOT = macosx; 335 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 336 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 337 | }; 338 | name = Debug; 339 | }; 340 | 21038F561E3FEFA900BDC3F2 /* Release */ = { 341 | isa = XCBuildConfiguration; 342 | buildSettings = { 343 | ALWAYS_SEARCH_USER_PATHS = NO; 344 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 345 | CLANG_ANALYZER_NONNULL = YES; 346 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 347 | CLANG_CXX_LIBRARY = "libc++"; 348 | CLANG_ENABLE_MODULES = YES; 349 | CLANG_ENABLE_OBJC_ARC = YES; 350 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 351 | CLANG_WARN_BOOL_CONVERSION = YES; 352 | CLANG_WARN_COMMA = YES; 353 | CLANG_WARN_CONSTANT_CONVERSION = YES; 354 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 355 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 356 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 357 | CLANG_WARN_EMPTY_BODY = YES; 358 | CLANG_WARN_ENUM_CONVERSION = YES; 359 | CLANG_WARN_INFINITE_RECURSION = YES; 360 | CLANG_WARN_INT_CONVERSION = YES; 361 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 362 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 363 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 364 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 365 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 366 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 367 | CLANG_WARN_STRICT_PROTOTYPES = YES; 368 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 369 | CLANG_WARN_UNREACHABLE_CODE = YES; 370 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 371 | CODE_SIGN_IDENTITY = "-"; 372 | CODE_SIGN_INJECT_BASE_ENTITLEMENTS = NO; 373 | COPY_PHASE_STRIP = NO; 374 | DEAD_CODE_STRIPPING = YES; 375 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 376 | ENABLE_NS_ASSERTIONS = NO; 377 | ENABLE_STRICT_OBJC_MSGSEND = YES; 378 | ENABLE_USER_SCRIPT_SANDBOXING = YES; 379 | GCC_C_LANGUAGE_STANDARD = gnu99; 380 | GCC_NO_COMMON_BLOCKS = YES; 381 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 382 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 383 | GCC_WARN_UNDECLARED_SELECTOR = YES; 384 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 385 | GCC_WARN_UNUSED_FUNCTION = YES; 386 | GCC_WARN_UNUSED_VARIABLE = YES; 387 | MACOSX_DEPLOYMENT_TARGET = 10.13; 388 | MTL_ENABLE_DEBUG_INFO = NO; 389 | SDKROOT = macosx; 390 | SWIFT_COMPILATION_MODE = wholemodule; 391 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 392 | }; 393 | name = Release; 394 | }; 395 | 21038F581E3FEFA900BDC3F2 /* Debug */ = { 396 | isa = XCBuildConfiguration; 397 | buildSettings = { 398 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 399 | CODE_SIGN_IDENTITY = "-"; 400 | CODE_SIGN_STYLE = Manual; 401 | COMBINE_HIDPI_IMAGES = YES; 402 | DEAD_CODE_STRIPPING = YES; 403 | DEVELOPMENT_TEAM = ""; 404 | ENABLE_USER_SCRIPT_SANDBOXING = NO; 405 | INFOPLIST_FILE = "Jupyter Notebook Viewer/Info.plist"; 406 | INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.productivity"; 407 | LD_RUNPATH_SEARCH_PATHS = ( 408 | "$(inherited)", 409 | "@executable_path/../Frameworks", 410 | ); 411 | MACOSX_DEPLOYMENT_TARGET = 10.15; 412 | PRODUCT_BUNDLE_IDENTIFIER = "com.tinowagner.nbviewer-app"; 413 | PRODUCT_NAME = "$(TARGET_NAME)"; 414 | PROVISIONING_PROFILE_SPECIFIER = ""; 415 | SWIFT_SWIFT3_OBJC_INFERENCE = Default; 416 | SWIFT_VERSION = 5.0; 417 | }; 418 | name = Debug; 419 | }; 420 | 21038F591E3FEFA900BDC3F2 /* Release */ = { 421 | isa = XCBuildConfiguration; 422 | buildSettings = { 423 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 424 | CODE_SIGN_IDENTITY = "-"; 425 | CODE_SIGN_STYLE = Manual; 426 | COMBINE_HIDPI_IMAGES = YES; 427 | DEAD_CODE_STRIPPING = YES; 428 | DEVELOPMENT_TEAM = ""; 429 | ENABLE_USER_SCRIPT_SANDBOXING = NO; 430 | INFOPLIST_FILE = "Jupyter Notebook Viewer/Info.plist"; 431 | INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.productivity"; 432 | LD_RUNPATH_SEARCH_PATHS = ( 433 | "$(inherited)", 434 | "@executable_path/../Frameworks", 435 | ); 436 | MACOSX_DEPLOYMENT_TARGET = 10.15; 437 | PRODUCT_BUNDLE_IDENTIFIER = "com.tinowagner.nbviewer-app"; 438 | PRODUCT_NAME = "$(TARGET_NAME)"; 439 | PROVISIONING_PROFILE_SPECIFIER = ""; 440 | SWIFT_SWIFT3_OBJC_INFERENCE = Default; 441 | SWIFT_VERSION = 5.0; 442 | }; 443 | name = Release; 444 | }; 445 | /* End XCBuildConfiguration section */ 446 | 447 | /* Begin XCConfigurationList section */ 448 | 21038F411E3FEFA900BDC3F2 /* Build configuration list for PBXProject "Jupyter Notebook Viewer" */ = { 449 | isa = XCConfigurationList; 450 | buildConfigurations = ( 451 | 21038F551E3FEFA900BDC3F2 /* Debug */, 452 | 21038F561E3FEFA900BDC3F2 /* Release */, 453 | ); 454 | defaultConfigurationIsVisible = 0; 455 | defaultConfigurationName = Release; 456 | }; 457 | 21038F571E3FEFA900BDC3F2 /* Build configuration list for PBXNativeTarget "Jupyter Notebook Viewer" */ = { 458 | isa = XCConfigurationList; 459 | buildConfigurations = ( 460 | 21038F581E3FEFA900BDC3F2 /* Debug */, 461 | 21038F591E3FEFA900BDC3F2 /* Release */, 462 | ); 463 | defaultConfigurationIsVisible = 0; 464 | defaultConfigurationName = Release; 465 | }; 466 | /* End XCConfigurationList section */ 467 | }; 468 | rootObject = 21038F3E1E3FEFA900BDC3F2 /* Project object */; 469 | } 470 | -------------------------------------------------------------------------------- /icons/viewer-app.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 20 | 39 | 45 | 46 | 48 | 51 | 55 | 59 | 60 | 63 | 67 | 71 | 72 | 75 | 78 | 81 | 84 | 87 | 97 | 101 | 106 | 112 | 117 | 122 | 128 | 129 | 139 | 143 | 148 | 154 | 159 | 164 | 170 | 171 | 175 | 180 | 186 | 191 | 196 | 202 | 203 | 207 | 212 | 218 | 223 | 228 | 234 | 235 | 245 | 255 | 265 | 275 | 285 | 295 | 299 | 304 | 310 | 315 | 320 | 326 | 327 | 328 | 330 | 331 | 333 | image/svg+xml 334 | 336 | 337 | 338 | 339 | 340 | 345 | 347 | 352 | 357 | 366 | 375 | 384 | 393 | 402 | 403 | 406 | 409 | 414 | 419 | 420 | 423 | 432 | 441 | 450 | 459 | 468 | 469 | 470 | 473 | 478 | 480 | 484 | 487 | 488 | 493 | 502 | 511 | 520 | 529 | 538 | 539 | 540 | 543 | 548 | 553 | 562 | 571 | 580 | 589 | 598 | 599 | 600 | 601 | -------------------------------------------------------------------------------- /Jupyter Notebook Viewer/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | 318 | 319 | 320 | 321 | 322 | 323 | 324 | 325 | 326 | 327 | 328 | 329 | 330 | 331 | 332 | 333 | 334 | 335 | 336 | 337 | 338 | 339 | 340 | 341 | 342 | 343 | 344 | 345 | 346 | 347 | 348 | 349 | 350 | 351 | 352 | 353 | 354 | 355 | 356 | 357 | 358 | 359 | 360 | 361 | 362 | 363 | 364 | 365 | 366 | 367 | 368 | 369 | 370 | 371 | 372 | 373 | 374 | 375 | 376 | 377 | 378 | 379 | 380 | 381 | 382 | 383 | 384 | 385 | 386 | 387 | 388 | 389 | 390 | 391 | 392 | 393 | 394 | 395 | 396 | 397 | 398 | 399 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 427 | 428 | 429 | 430 | 431 | 432 | 433 | 434 | 435 | 436 | 437 | 438 | 439 | 440 | 441 | 442 | 443 | 444 | 445 | 446 | 447 | 448 | 449 | 450 | 451 | 452 | 453 | 454 | 455 | 456 | 457 | 458 | 459 | 460 | 461 | 462 | 463 | 464 | 465 | 466 | 467 | 468 | 469 | 470 | 471 | 472 | 473 | 474 | 475 | 476 | 477 | 478 | 479 | 480 | --------------------------------------------------------------------------------