├── gradle.properties ├── fastlane └── metadata │ └── android │ ├── en-GB │ ├── title.txt │ ├── changelog │ │ ├── 129.txt │ │ ├── 134.txt │ │ ├── 135.txt │ │ ├── 137.txt │ │ ├── 128.txt │ │ ├── 136.txt │ │ ├── 126.txt │ │ ├── 121.txt │ │ ├── 124.txt │ │ ├── 127.txt │ │ ├── 131.txt │ │ ├── 125.txt │ │ ├── 123.txt │ │ ├── 138.txt │ │ ├── 120.txt │ │ ├── 132.txt │ │ ├── 130.txt │ │ ├── 139.txt │ │ ├── 140.txt │ │ ├── 133.txt │ │ ├── 122.txt │ │ └── 119.txt │ ├── short_description.txt │ ├── images │ │ ├── icon.png │ │ ├── featureGraphic.png │ │ └── phoneScreenshots │ │ │ ├── p1.png │ │ │ ├── p2.png │ │ │ ├── p3.png │ │ │ ├── p4.png │ │ │ └── p5.png │ └── full_description.txt │ └── tr │ ├── title.txt │ ├── short_description.txt │ └── full_description.txt ├── docs ├── favicon.ico ├── images │ ├── Icon.png │ ├── Latex.png │ ├── Notes.png │ ├── Notes-find.png │ ├── Notes-help.png │ ├── Notes-menu.png │ ├── Notes-open.png │ ├── Notes-recent.png │ ├── Notes-settings.png │ └── Bob.svg ├── css │ ├── custom.css │ └── styles.css ├── tags │ └── index.xml ├── categories │ └── index.xml ├── settings │ └── index.xml ├── introduction │ └── index.xml ├── 404.html ├── manage │ └── index.xml ├── sitemap.xml ├── using │ └── index.xml └── content │ └── index.xml ├── ic_launcher.png ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── src └── main │ ├── res │ ├── drawable-hdpi │ │ └── ic_launcher.png │ ├── drawable-mdpi │ │ └── ic_launcher.png │ ├── drawable-xhdpi │ │ └── ic_launcher.png │ ├── drawable-xxhdpi │ │ └── ic_launcher.png │ ├── drawable-xxxhdpi │ │ └── ic_launcher.png │ ├── values │ │ ├── integers.xml │ │ ├── arrays.xml │ │ ├── attrs.xml │ │ ├── styles.xml │ │ └── strings.xml │ ├── xml │ │ ├── filepaths.xml │ │ ├── shortcuts.xml │ │ └── preferences.xml │ ├── drawable │ │ ├── ic_pressed.xml │ │ ├── ic_released.xml │ │ ├── ic_button_background.xml │ │ ├── ic_stop_black_24dp.xml │ │ ├── ic_stop_white_24dp.xml │ │ ├── ic_add_white_24dp.xml │ │ ├── ic_done_white_24dp.xml │ │ ├── ic_reply_black_24dp.xml │ │ ├── ic_reply_white_24dp.xml │ │ ├── ic_folder_black_24dp.xml │ │ ├── ic_folder_white_24dp.xml │ │ ├── ic_videocam_black_24dp.xml │ │ ├── ic_videocam_white_24dp.xml │ │ ├── ic_list_black_24dp.xml │ │ ├── ic_list_white_24dp.xml │ │ ├── ic_image_black_24dp.xml │ │ ├── ic_image_white_24dp.xml │ │ ├── ic_folder_open_black_24dp.xml │ │ ├── ic_folder_open_white_24dp.xml │ │ ├── ic_sd_storage_black_24dp.xml │ │ ├── ic_sd_storage_white_24dp.xml │ │ ├── ic_edit_white_24dp.xml │ │ ├── ic_save_white_24dp.xml │ │ ├── ic_info_outline_black_24dp.xml │ │ ├── ic_info_outline_white_24dp.xml │ │ ├── ic_print_white_24dp.xml │ │ ├── ic_volume_up_black_24dp.xml │ │ ├── ic_volume_up_white_24dp.xml │ │ ├── ic_cloud_circle_black_24dp.xml │ │ ├── ic_cloud_circle_white_24dp.xml │ │ ├── ic_search_white_24dp.xml │ │ ├── ic_brightness_high_black_24dp.xml │ │ ├── ic_brightness_high_white_24dp.xml │ │ ├── ic_share_white_24dp.xml │ │ └── toast_frame.xml │ ├── values-ru │ │ ├── arrays.xml │ │ └── strings.xml │ ├── layout │ │ ├── file.xml │ │ ├── save_path.xml │ │ ├── about.xml │ │ ├── editor.xml │ │ └── main.xml │ ├── anim │ │ ├── fade_in.xml │ │ ├── fade_out.xml │ │ ├── flip_out.xml │ │ ├── flip_in.xml │ │ ├── decelerate_cubic.xml │ │ ├── activity_close_exit.xml │ │ └── activity_open_enter.xml │ ├── menu │ │ └── main.xml │ ├── xml-ru │ │ └── preferences.xml │ ├── values-pt-rBR │ │ └── strings.xml │ ├── values-de │ │ └── strings.xml │ ├── values-tr │ │ └── strings.xml │ └── values-fi │ │ └── strings.xml │ ├── assets │ ├── styles.css │ └── help.md │ ├── java │ ├── com │ │ └── ibm │ │ │ └── icu │ │ │ └── text │ │ │ ├── CharsetRecognizer.java │ │ │ ├── CharsetRecog_UTF8.java │ │ │ ├── CharsetRecog_2022.java │ │ │ ├── CharsetRecog_Unicode.java │ │ │ └── CharsetMatch.java │ └── org │ │ └── billthefarmer │ │ └── notes │ │ ├── Shortcut.java │ │ ├── AboutPreference.java │ │ ├── Settings.java │ │ ├── SettingsFragment.java │ │ └── FileAdapter.java │ └── AndroidManifest.xml ├── .github └── workflows │ ├── build.yml │ └── release.yml ├── .gitignore ├── gradlew.bat └── gradlew /gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M -------------------------------------------------------------------------------- /fastlane/metadata/android/en-GB/title.txt: -------------------------------------------------------------------------------- 1 | Notes 2 | -------------------------------------------------------------------------------- /fastlane/metadata/android/tr/title.txt: -------------------------------------------------------------------------------- 1 | Notlar 2 | -------------------------------------------------------------------------------- /fastlane/metadata/android/en-GB/changelog/129.txt: -------------------------------------------------------------------------------- 1 | * Fix set title 2 | -------------------------------------------------------------------------------- /fastlane/metadata/android/en-GB/changelog/134.txt: -------------------------------------------------------------------------------- 1 | * Update shortcut 2 | -------------------------------------------------------------------------------- /fastlane/metadata/android/en-GB/changelog/135.txt: -------------------------------------------------------------------------------- 1 | * Add system theme 2 | -------------------------------------------------------------------------------- /fastlane/metadata/android/en-GB/changelog/137.txt: -------------------------------------------------------------------------------- 1 | * Update add link 2 | -------------------------------------------------------------------------------- /fastlane/metadata/android/en-GB/changelog/128.txt: -------------------------------------------------------------------------------- 1 | * Fix android 13 toasts 2 | -------------------------------------------------------------------------------- /fastlane/metadata/android/en-GB/changelog/136.txt: -------------------------------------------------------------------------------- 1 | * Add edit check boxes 2 | -------------------------------------------------------------------------------- /fastlane/metadata/android/en-GB/changelog/126.txt: -------------------------------------------------------------------------------- 1 | * Add save dialog for backup 2 | -------------------------------------------------------------------------------- /docs/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/billthefarmer/notes/HEAD/docs/favicon.ico -------------------------------------------------------------------------------- /fastlane/metadata/android/en-GB/changelog/121.txt: -------------------------------------------------------------------------------- 1 | * Change to Mozilla universal chardet. -------------------------------------------------------------------------------- /fastlane/metadata/android/en-GB/changelog/124.txt: -------------------------------------------------------------------------------- 1 | * Add default note name setting 2 | -------------------------------------------------------------------------------- /fastlane/metadata/android/en-GB/changelog/127.txt: -------------------------------------------------------------------------------- 1 | * Update save dialog for backup 2 | -------------------------------------------------------------------------------- /fastlane/metadata/android/en-GB/changelog/131.txt: -------------------------------------------------------------------------------- 1 | * Add superscript and subscript 2 | -------------------------------------------------------------------------------- /fastlane/metadata/android/tr/short_description.txt: -------------------------------------------------------------------------------- 1 | Markdown formatlamalı not defteri 2 | -------------------------------------------------------------------------------- /ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/billthefarmer/notes/HEAD/ic_launcher.png -------------------------------------------------------------------------------- /fastlane/metadata/android/en-GB/changelog/125.txt: -------------------------------------------------------------------------------- 1 | * Add save/restore scroll position 2 | -------------------------------------------------------------------------------- /fastlane/metadata/android/en-GB/short_description.txt: -------------------------------------------------------------------------------- 1 | Notebook with markdown formatting 2 | -------------------------------------------------------------------------------- /docs/images/Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/billthefarmer/notes/HEAD/docs/images/Icon.png -------------------------------------------------------------------------------- /docs/images/Latex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/billthefarmer/notes/HEAD/docs/images/Latex.png -------------------------------------------------------------------------------- /docs/images/Notes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/billthefarmer/notes/HEAD/docs/images/Notes.png -------------------------------------------------------------------------------- /fastlane/metadata/android/en-GB/changelog/123.txt: -------------------------------------------------------------------------------- 1 | * Update shortcut, template date pattern 2 | -------------------------------------------------------------------------------- /fastlane/metadata/android/en-GB/changelog/138.txt: -------------------------------------------------------------------------------- 1 | * Update icons 2 | * Update recent list 3 | -------------------------------------------------------------------------------- /fastlane/metadata/android/en-GB/changelog/120.txt: -------------------------------------------------------------------------------- 1 | * Add character set detection 2 | * Update share 3 | -------------------------------------------------------------------------------- /fastlane/metadata/android/en-GB/changelog/132.txt: -------------------------------------------------------------------------------- 1 | * Migrate super and subscript to MarkdownView 2 | -------------------------------------------------------------------------------- /docs/images/Notes-find.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/billthefarmer/notes/HEAD/docs/images/Notes-find.png -------------------------------------------------------------------------------- /docs/images/Notes-help.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/billthefarmer/notes/HEAD/docs/images/Notes-help.png -------------------------------------------------------------------------------- /docs/images/Notes-menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/billthefarmer/notes/HEAD/docs/images/Notes-menu.png -------------------------------------------------------------------------------- /docs/images/Notes-open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/billthefarmer/notes/HEAD/docs/images/Notes-open.png -------------------------------------------------------------------------------- /fastlane/metadata/android/en-GB/changelog/130.txt: -------------------------------------------------------------------------------- 1 | * Add underscore and strikethrough, emoji scripts 2 | -------------------------------------------------------------------------------- /fastlane/metadata/android/en-GB/changelog/139.txt: -------------------------------------------------------------------------------- 1 | * Update Turkist translation 2 | * Update mime types 3 | -------------------------------------------------------------------------------- /fastlane/metadata/android/en-GB/changelog/140.txt: -------------------------------------------------------------------------------- 1 | * Update shortcuts 2 | * Add Russian translation 3 | -------------------------------------------------------------------------------- /docs/images/Notes-recent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/billthefarmer/notes/HEAD/docs/images/Notes-recent.png -------------------------------------------------------------------------------- /fastlane/metadata/android/en-GB/changelog/133.txt: -------------------------------------------------------------------------------- 1 | * Update save as dialog 2 | * Remove charset detection 3 | -------------------------------------------------------------------------------- /docs/images/Notes-settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/billthefarmer/notes/HEAD/docs/images/Notes-settings.png -------------------------------------------------------------------------------- /fastlane/metadata/android/en-GB/changelog/122.txt: -------------------------------------------------------------------------------- 1 | * Add template for new note name 2 | * Add widget for new note 3 | -------------------------------------------------------------------------------- /fastlane/metadata/android/en-GB/changelog/119.txt: -------------------------------------------------------------------------------- 1 | * Update file provider URI resolver 2 | * Update about dialog layout 3 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/billthefarmer/notes/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /src/main/res/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/billthefarmer/notes/HEAD/src/main/res/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /src/main/res/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/billthefarmer/notes/HEAD/src/main/res/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/billthefarmer/notes/HEAD/src/main/res/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /src/main/res/drawable-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/billthefarmer/notes/HEAD/src/main/res/drawable-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /src/main/res/drawable-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/billthefarmer/notes/HEAD/src/main/res/drawable-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /fastlane/metadata/android/en-GB/images/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/billthefarmer/notes/HEAD/fastlane/metadata/android/en-GB/images/icon.png -------------------------------------------------------------------------------- /src/main/res/values/integers.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 0 5 | 6 | 7 | -------------------------------------------------------------------------------- /fastlane/metadata/android/en-GB/images/featureGraphic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/billthefarmer/notes/HEAD/fastlane/metadata/android/en-GB/images/featureGraphic.png -------------------------------------------------------------------------------- /fastlane/metadata/android/en-GB/images/phoneScreenshots/p1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/billthefarmer/notes/HEAD/fastlane/metadata/android/en-GB/images/phoneScreenshots/p1.png -------------------------------------------------------------------------------- /fastlane/metadata/android/en-GB/images/phoneScreenshots/p2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/billthefarmer/notes/HEAD/fastlane/metadata/android/en-GB/images/phoneScreenshots/p2.png -------------------------------------------------------------------------------- /fastlane/metadata/android/en-GB/images/phoneScreenshots/p3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/billthefarmer/notes/HEAD/fastlane/metadata/android/en-GB/images/phoneScreenshots/p3.png -------------------------------------------------------------------------------- /fastlane/metadata/android/en-GB/images/phoneScreenshots/p4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/billthefarmer/notes/HEAD/fastlane/metadata/android/en-GB/images/phoneScreenshots/p4.png -------------------------------------------------------------------------------- /fastlane/metadata/android/en-GB/images/phoneScreenshots/p5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/billthefarmer/notes/HEAD/fastlane/metadata/android/en-GB/images/phoneScreenshots/p5.png -------------------------------------------------------------------------------- /src/main/assets/styles.css: -------------------------------------------------------------------------------- 1 | img { 2 | max-width: 100%; 3 | } 4 | 5 | video { 6 | max-width: 100%; 7 | } 8 | 9 | iframe { 10 | width: 100%; 11 | max-height: 100%; 12 | border: 1px solid black; 13 | } 14 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /src/main/res/xml/filepaths.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_pressed.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_released.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_button_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/css/custom.css: -------------------------------------------------------------------------------- 1 | table, th, td { 2 | border: none; 3 | } 4 | 5 | td { 6 | vertical-align: top; 7 | padding: 0; 8 | } 9 | 10 | section.page h1, 11 | section.page h3 { 12 | border: none; 13 | padding: 0; 14 | } 15 | 16 | section.page h3 a, 17 | section.page h3 a:hover, 18 | section.page h3 a:visited { 19 | text-decoration: none; 20 | } 21 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_stop_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_stop_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | # Build on push and PR events 2 | on: 3 | push: 4 | branches: 5 | - master 6 | tags-ignore: 7 | - '*' 8 | pull_request: 9 | 10 | jobs: 11 | build: 12 | runs-on: ubuntu-latest 13 | steps: 14 | - name: Checkout 15 | uses: "actions/checkout@v3" 16 | 17 | - name: Build with Gradle 18 | run: ./gradlew build 19 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_add_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_done_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /src/main/res/values/arrays.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Light 6 | Dark 7 | System 8 | 9 | 10 | 11 | 0 12 | 1 13 | 2 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_reply_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_reply_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /src/main/res/values-ru/arrays.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Светлая 5 | Тёмная 6 | Системная 7 | 8 | 9 | 0 10 | 1 11 | 2 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_folder_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_folder_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_videocam_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_videocam_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_list_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_list_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_image_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_image_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_folder_open_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_folder_open_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_sd_storage_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_sd_storage_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_edit_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_save_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_info_outline_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_info_outline_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_print_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /src/main/res/layout/file.xml: -------------------------------------------------------------------------------- 1 | 2 | 13 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_volume_up_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_volume_up_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_cloud_circle_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_cloud_circle_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_search_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /docs/tags/index.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Tags on Notes 5 | https://billthefarmer.github.io/notes/tags/ 6 | Recent content in Tags on Notes 7 | Hugo -- gohugo.io 8 | en-gb 9 | Copyright &copy; 2006 Bill Farmer 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_brightness_high_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_brightness_high_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /docs/categories/index.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Categories on Notes 5 | https://billthefarmer.github.io/notes/categories/ 6 | Recent content in Categories on Notes 7 | Hugo -- gohugo.io 8 | en-gb 9 | Copyright &copy; 2006 Bill Farmer 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/main/res/xml/shortcuts.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 11 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/main/res/anim/fade_in.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 13 | 18 | 19 | -------------------------------------------------------------------------------- /src/main/res/anim/fade_out.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 13 | 18 | 19 | -------------------------------------------------------------------------------- /fastlane/metadata/android/en-GB/full_description.txt: -------------------------------------------------------------------------------- 1 | Notebook with markdown formatting 2 | 3 | * Notes saved in text files 4 | * Use markdown formatting 5 | * Optional new note template 6 | * Optional new note file name template 7 | * Display media 8 | * Display OpenStreetMap maps 9 | * Share notes 10 | * Add date and time 11 | * Add media from media providers 12 | * Receive media from other apps 13 | * Receive geo uris from other apps 14 | * Incremental search of notes 15 | * Dark or light theme for editing 16 | * Shortcut to open new note 17 | * Optional CSS styles 18 | * Optional JavaScript scripts 19 | * Back up notes to a zip file 20 | * Optional edit cursor position control 21 | -------------------------------------------------------------------------------- /fastlane/metadata/android/tr/full_description.txt: -------------------------------------------------------------------------------- 1 | Markdown formatlamalı not defteri 2 | 3 | * Notlar .txt olarak kaydedilir 4 | * Markdown formatlamasını kullanır 5 | * Opsiyonel yeni not biçimi 6 | * Opsiyonel yeni not dosya adı biçimi 7 | * Medya göster 8 | * OpenStreetMap haritalarını gösterir 9 | * Notları paylaş 10 | * Tarih ve saat ekle 11 | * Medya sağlayıcılardan medya ekle 12 | * Diğer uygulamalardan medya al 13 | * Diğer uygulamalardan coğrafi uriler al 14 | * Notlar için artımsal arama 15 | * Düzenleme için karanlık ve aydınlık tema 16 | * Yeni not açmak için kısayol 17 | * Opsiyonel CSS stilleri 18 | * Opsiyonel JavaScript komut dosyaları 19 | * Notları zip dosyasına yedekle 20 | * Opsiyonel imleç pozisyon kontrolü düzenleme 21 | -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | # Release on new tags 2 | on: 3 | push: 4 | tags: 5 | - 'v*' 6 | 7 | jobs: 8 | release: 9 | runs-on: ubuntu-latest 10 | steps: 11 | - uses: "actions/checkout@v3" 12 | 13 | - name: Get the tag version 14 | id: version 15 | run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/v} 16 | 17 | - name: Create release 18 | id: create_release 19 | uses: actions/create-release@v1 20 | env: 21 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 22 | with: 23 | tag_name: ${{ github.ref }} 24 | release_name: "Version ${{ steps.version.outputs.VERSION }}" 25 | body: "![Icon](src/main/res/drawable-xhdpi/ic_launcher.png)" 26 | -------------------------------------------------------------------------------- /src/main/res/anim/flip_out.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 10 | 20 | 21 | -------------------------------------------------------------------------------- /src/main/res/drawable/ic_share_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /src/main/res/anim/flip_in.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 11 | 22 | 23 | -------------------------------------------------------------------------------- /src/main/res/layout/save_path.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /src/main/res/anim/decelerate_cubic.xml: -------------------------------------------------------------------------------- 1 | 18 | 19 | 22 | -------------------------------------------------------------------------------- /src/main/res/drawable/toast_frame.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /src/main/res/values/attrs.xml: -------------------------------------------------------------------------------- 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 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Built application files 2 | *.apk 3 | *.ap_ 4 | 5 | # Files for the ART/Dalvik VM 6 | *.dex 7 | 8 | # Java class files 9 | *.class 10 | 11 | # Generated files 12 | bin/ 13 | gen/ 14 | out/ 15 | 16 | # Gradle files 17 | .gradle/ 18 | build/ 19 | 20 | # Local configuration file (sdk path, etc) 21 | local.properties 22 | 23 | # Proguard folder generated by Eclipse 24 | proguard/ 25 | 26 | # Data files 27 | data/ 28 | 29 | # Log Files 30 | *.log 31 | 32 | # Android Studio Navigation editor temp files 33 | .navigation/ 34 | 35 | # Android Studio captures folder 36 | captures/ 37 | 38 | # IntelliJ 39 | *.iml 40 | .idea/workspace.xml 41 | .idea/tasks.xml 42 | .idea/gradle.xml 43 | .idea/assetWizardSettings.xml 44 | .idea/dictionaries 45 | .idea/libraries 46 | .idea/caches 47 | 48 | # Keystore files 49 | # Uncomment the following line if you do not want to check your keystore files in. 50 | #*.jks 51 | 52 | # External native build folder generated in Android Studio 2.2 and later 53 | .externalNativeBuild 54 | 55 | # Google Services (e.g. APIs or Firebase) 56 | google-services.json 57 | 58 | # Freeline 59 | freeline.py 60 | freeline/ 61 | freeline_project_description.json 62 | 63 | # fastlane 64 | fastlane/report.xml 65 | fastlane/Preview.html 66 | fastlane/screenshots 67 | fastlane/test_output 68 | fastlane/readme.md 69 | 70 | # emacs backups 71 | *~ 72 | -------------------------------------------------------------------------------- /docs/settings/index.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Settings on Notes 5 | https://billthefarmer.github.io/notes/settings/ 6 | Recent content in Settings on Notes 7 | Hugo -- gohugo.io 8 | en-gb 9 | Copyright &copy; 2006 Bill Farmer 10 | Sun, 16 Feb 2020 15:22:26 +0000 11 | 12 | 13 | Settings 14 | https://billthefarmer.github.io/notes/settings/settings/ 15 | Sun, 16 Feb 2020 15:22:26 +0000 16 | https://billthefarmer.github.io/notes/settings/settings/ 17 | Folder – Change notes storage folder. Caution – notes, styles and scripts will not be moved Default note name – Set a name for the default note. Use the dialog to choose a name. New note name template – Set a new note name template. Use the dialog to choose a name. New note template – Set a note template. Use the dialog to choose a file. Browser – Use browser for external links Dark theme – Use dark theme for editing About – Show app version, licence and credits 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /docs/introduction/index.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Introduction on Notes 5 | https://billthefarmer.github.io/notes/introduction/ 6 | Recent content in Introduction on Notes 7 | Hugo -- gohugo.io 8 | en-gb 9 | Copyright &copy; 2006 Bill Farmer 10 | Sat, 15 Feb 2020 19:08:26 +0000 11 | 12 | 13 | Features 14 | https://billthefarmer.github.io/notes/introduction/features/ 15 | Sat, 15 Feb 2020 19:08:26 +0000 16 | https://billthefarmer.github.io/notes/introduction/features/ 17 | Notes saved in text files Use markdown formatting Optional note template Optional template for new note name Display media Display OpenStreetMap maps Print notes Share notes Add date and time Add media from media providers Receive media from other apps Receive geo uris from other apps Incremental search of notes Dark or light theme for editing Widget for new notes Optional CSS styles Optional JavaScript scripts Back up notes to a zip file Optional edit cursor position control 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/main/res/anim/activity_close_exit.xml: -------------------------------------------------------------------------------- 1 | 18 | 19 | 22 | 30 | 42 | 43 | -------------------------------------------------------------------------------- /src/main/res/anim/activity_open_enter.xml: -------------------------------------------------------------------------------- 1 | 18 | 19 | 22 | 30 | 42 | 43 | -------------------------------------------------------------------------------- /src/main/res/layout/about.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 11 | 12 | 21 | 22 | 30 | 31 | 39 | 40 | 47 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /src/main/res/layout/editor.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 17 | 18 | 24 | 25 | 33 | 34 | 35 | 36 | 37 | 38 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /docs/404.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Notes 10 | 11 | 12 | 13 | 14 | 15 | 16 | 23 | 24 | 25 | 33 | 34 | 35 | 36 | 37 | 38 | 55 | 56 | Well, a fine little mess. Easy in, easy out. Another triumph. 57 | 58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /src/main/java/com/ibm/icu/text/CharsetRecognizer.java: -------------------------------------------------------------------------------- 1 | // © 2016 and later: Unicode, Inc. and others. 2 | // License & terms of use: http://www.unicode.org/copyright.html 3 | /** 4 | ******************************************************************************* 5 | * Copyright (C) 2005-2012, International Business Machines Corporation and * 6 | * others. All Rights Reserved. * 7 | ******************************************************************************* 8 | */ 9 | package com.ibm.icu.text; 10 | 11 | /** 12 | * Abstract class for recognizing a single charset. 13 | * Part of the implementation of ICU's CharsetDetector. 14 | * 15 | * Each specific charset that can be recognized will have an instance 16 | * of some subclass of this class. All interaction between the overall 17 | * CharsetDetector and the stuff specific to an individual charset happens 18 | * via the interface provided here. 19 | * 20 | * Instances of CharsetDetector DO NOT have or maintain 21 | * state pertaining to a specific match or detect operation. 22 | * The WILL be shared by multiple instances of CharsetDetector. 23 | * They encapsulate const charset-specific information. 24 | */ 25 | abstract class CharsetRecognizer { 26 | /** 27 | * Get the IANA name of this charset. 28 | * @return the charset name. 29 | */ 30 | abstract String getName(); 31 | 32 | /** 33 | * Get the ISO language code for this charset. 34 | * @return the language code, or null if the language cannot be determined. 35 | */ 36 | public String getLanguage() 37 | { 38 | return null; 39 | } 40 | 41 | /** 42 | * Test the match of this charset with the input text data 43 | * which is obtained via the CharsetDetector object. 44 | * 45 | * @param det The CharsetDetector, which contains the input text 46 | * to be checked for being in this charset. 47 | * @return A CharsetMatch object containing details of match 48 | * with this charset, or null if there was no match. 49 | */ 50 | abstract CharsetMatch match(CharsetDetector det); 51 | 52 | } 53 | -------------------------------------------------------------------------------- /docs/manage/index.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Manage on Notes 5 | https://billthefarmer.github.io/notes/manage/ 6 | Recent content in Manage on Notes 7 | Hugo -- gohugo.io 8 | en-gb 9 | Copyright &copy; 2006 Bill Farmer 10 | Sun, 16 Feb 2020 15:22:08 +0000 11 | 12 | 13 | Backup 14 | https://billthefarmer.github.io/notes/manage/backup/ 15 | Sun, 16 Feb 2020 15:21:07 +0000 16 | https://billthefarmer.github.io/notes/manage/backup/ 17 | You may create a backup of all your notes in a zip file. The file will have the same name as the notes folder, default Notes.zip. 18 | 19 | 20 | Sync 21 | https://billthefarmer.github.io/notes/manage/sync/ 22 | Sun, 16 Feb 2020 15:21:42 +0000 23 | https://billthefarmer.github.io/notes/manage/sync/ 24 | Android cloud storage apps when last tested appeared not to be capable of syncing a real storage folder on the device. However Syncthing does just that and can sync your notes folder with other devices and desktop computers. 25 | 26 | 27 | SD Cards 28 | https://billthefarmer.github.io/notes/manage/sd-cards/ 29 | Sun, 16 Feb 2020 15:22:08 +0000 30 | https://billthefarmer.github.io/notes/manage/sd-cards/ 31 | Android allows removable SD cards to be used like a USB stick or as part of the device storage. Notes opened using the chooser on a removable SD card may not save successfully using the save button. Use the Save as menu item and the Storage button to save it using the android file manager. Alternatively use the Storage button on the chooser dialog to open the Note using the android file manager. 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /src/main/java/org/billthefarmer/notes/Shortcut.java: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Notes - Notebook for Android 4 | // 5 | // Copyright © 2019 Bill Farmer 6 | // 7 | // This program is free software: you can redistribute it and/or modify 8 | // it under the terms of the GNU General Public License as published by 9 | // the Free Software Foundation, either version 3 of the License, or 10 | // (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | // 20 | // Bill Farmer william j farmer [at] yahoo [dot] co [dot] uk. 21 | // 22 | //////////////////////////////////////////////////////////////////////////////// 23 | 24 | package org.billthefarmer.notes; 25 | 26 | import android.app.Activity; 27 | import android.content.Intent; 28 | import android.graphics.Bitmap; 29 | import android.graphics.drawable.BitmapDrawable; 30 | import android.os.Bundle; 31 | 32 | public class Shortcut extends Activity 33 | { 34 | public final static String TAG = "Shortcut"; 35 | 36 | // onCreate 37 | @Override 38 | @SuppressWarnings("deprecation") 39 | protected void onCreate(Bundle savedInstanceState) 40 | { 41 | super.onCreate(savedInstanceState); 42 | 43 | // Create the shortcut intent 44 | Intent shortcut = new 45 | Intent(this, Notes.class); 46 | shortcut.setAction(Notes.NEW_NOTE); 47 | shortcut.addCategory(Intent.CATEGORY_DEFAULT); 48 | 49 | // Create the shortcut 50 | Intent intent = new Intent(); 51 | intent.putExtra(Intent.EXTRA_SHORTCUT_INTENT, shortcut); 52 | intent.putExtra(Intent.EXTRA_SHORTCUT_NAME, 53 | getString(R.string.newNote)); 54 | intent.putExtra(Intent.EXTRA_SHORTCUT_ICON_RESOURCE, 55 | Intent.ShortcutIconResource.fromContext 56 | (this, R.drawable.ic_launcher)); 57 | 58 | setResult(RESULT_OK, intent); 59 | finish(); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /src/main/res/layout/main.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 14 | 15 | 23 | 24 | 31 | 32 | 33 | 34 | 38 | 39 | 40 | 41 | 48 | 49 | 59 | 60 | 70 | 71 | 72 | 73 | -------------------------------------------------------------------------------- /src/main/res/menu/main.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 10 | 15 | 20 | 25 | 31 | 35 | 39 | 40 | 44 | 48 | 49 | 50 | 51 | 56 | 61 | 65 | 69 | 73 | 77 | 81 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- 1 | @rem 2 | @rem Copyright 2015 the original author or authors. 3 | @rem 4 | @rem Licensed under the Apache License, Version 2.0 (the "License"); 5 | @rem you may not use this file except in compliance with the License. 6 | @rem You may obtain a copy of the License at 7 | @rem 8 | @rem https://www.apache.org/licenses/LICENSE-2.0 9 | @rem 10 | @rem Unless required by applicable law or agreed to in writing, software 11 | @rem distributed under the License is distributed on an "AS IS" BASIS, 12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | @rem See the License for the specific language governing permissions and 14 | @rem limitations under the License. 15 | @rem 16 | 17 | @if "%DEBUG%"=="" @echo off 18 | @rem ########################################################################## 19 | @rem 20 | @rem Gradle startup script for Windows 21 | @rem 22 | @rem ########################################################################## 23 | 24 | @rem Set local scope for the variables with windows NT shell 25 | if "%OS%"=="Windows_NT" setlocal 26 | 27 | set DIRNAME=%~dp0 28 | if "%DIRNAME%"=="" set DIRNAME=. 29 | set APP_BASE_NAME=%~n0 30 | set APP_HOME=%DIRNAME% 31 | 32 | @rem Resolve any "." and ".." in APP_HOME to make it shorter. 33 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi 34 | 35 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 36 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" 37 | 38 | @rem Find java.exe 39 | if defined JAVA_HOME goto findJavaFromJavaHome 40 | 41 | set JAVA_EXE=java.exe 42 | %JAVA_EXE% -version >NUL 2>&1 43 | if %ERRORLEVEL% equ 0 goto execute 44 | 45 | echo. 46 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 47 | echo. 48 | echo Please set the JAVA_HOME variable in your environment to match the 49 | echo location of your Java installation. 50 | 51 | goto fail 52 | 53 | :findJavaFromJavaHome 54 | set JAVA_HOME=%JAVA_HOME:"=% 55 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 56 | 57 | if exist "%JAVA_EXE%" goto execute 58 | 59 | echo. 60 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 61 | echo. 62 | echo Please set the JAVA_HOME variable in your environment to match the 63 | echo location of your Java installation. 64 | 65 | goto fail 66 | 67 | :execute 68 | @rem Setup the command line 69 | 70 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 71 | 72 | 73 | @rem Execute Gradle 74 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* 75 | 76 | :end 77 | @rem End local scope for the variables with windows NT shell 78 | if %ERRORLEVEL% equ 0 goto mainEnd 79 | 80 | :fail 81 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 82 | rem the _cmd.exe /c_ return code! 83 | set EXIT_CODE=%ERRORLEVEL% 84 | if %EXIT_CODE% equ 0 set EXIT_CODE=1 85 | if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% 86 | exit /b %EXIT_CODE% 87 | 88 | :mainEnd 89 | if "%OS%"=="Windows_NT" endlocal 90 | 91 | :omega 92 | -------------------------------------------------------------------------------- /src/main/res/xml-ru/preferences.xml: -------------------------------------------------------------------------------- 1 | 2 | 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 | -------------------------------------------------------------------------------- /src/main/res/values-pt-rBR/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Notas 5 | 6 | Nova nota 7 | Abrir 8 | Abrir recente 9 | Limpiar lista 10 | Salvar 11 | Armazenamento 12 | Salvar como… 13 | Procurar… 14 | Encontre todos… 15 | Impressão… 16 | Compartilhar… 17 | Adicione data 18 | Adicione média… 19 | Adicionar link 20 | Editar estilos… 21 | Editar script… 22 | Backup… 23 | Iniciar backup 24 | Backup concluído 25 | Configurações 26 | Pasta 27 | Nome 28 | Média 29 | Nome da nota padrão 30 | Navegador 31 | 32 | Use o navegador para links externos 33 | 34 | Tema 35 | Novo modelo de nota 36 | Use modelo 37 | 38 | Usar modelo para novas notas 39 | 40 | Novo arquivo de modelo de nota 41 | Novo modelo de nome de nota 42 | 43 | Use o modelo para o novo nome da nota 44 | 45 | Novo nome da nota 46 | Sobre 47 | Versão %s 48 | Built %s 49 | LicençaGNU GPLv3 50 | 51 | Copyright \u00A9 2020 Bill Farmer\n\nMarkdown view by Markdown View, Brazilian Portuguese translation by aevw 52 | 53 | 54 | Digite um nome de arquivo 55 | Abrindo… 56 | 57 | 58 | Tem alterações não salvas. Você quer salvar? 59 | 60 | 61 | 62 | Este arquivo foi modificado, quer atualizar? 63 | 64 | 65 | 66 | Este arquivo foi modificado, você quer substituí-lo (perderá alterações)? 67 | 68 | 69 | OK 70 | Recarregar 71 | Substituir 72 | Descartar 73 | Cancelar 74 | 75 | 76 | -------------------------------------------------------------------------------- /src/main/res/values-de/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Notizen 5 | 6 | Neu Notiz 7 | Öffne 8 | Öffne letzte 9 | Liste löschen 10 | Speichern 11 | Speicher 12 | Speichern als… 13 | Suchen… 14 | Finde alle… 15 | Drucken… 16 | Teilen… 17 | Datum hinzufügen 18 | Medien hinzufügen 19 | Link hinzufügen 20 | Stile bearbeiten… 21 | Skript bearbeiten… 22 | Sicherung… 23 | Sicherung beginnen 24 | Sicherung abgeschlossen 25 | Einstellungen 26 | Ordner 27 | Name 28 | Medien 29 | Standardnotizname 30 | Browser 31 | 32 | Browser für externe Links verwenden 33 | 34 | Thema 35 | Neu Notiz Vorlage 36 | Benutze Vorlage 37 | 38 | Benutze Volage für Neu Notizen 39 | 40 | Vorlagendatei 41 | Neue Vorlage für Notiznamen 42 | 43 | Vorlage für neuen Notennamen verwenden 44 | 45 | Neuer Notenname 46 | Über 47 | Version %s 48 | Erstellt %s 49 | Lizenz GNU GPLv3 50 | 51 | Urheberrecht \u00A9 2020 Bill Farmer\n\nMarkdown-Ansicht von Markdown View, Deutsche Übersetzung von mondstern, Türkische Übersetzung von Berkay Gündüz 52 | 53 | 54 | Wähle einen Dateinamen 55 | Laden… 56 | 57 | 58 | Du hast ungespeicherte Änderungen. Möchtest Du Deine Änderungen speichern? 59 | 60 | 61 | 62 | Diese Datei hat sich geändert, möchtest Du sie neu laden? 63 | 64 | 65 | 66 | Diese Datei hat sich geändert, möchtest Du sie überschreiben? 67 | 68 | 69 | OK 70 | Neu laden 71 | Überschreiben 72 | Verwerfen 73 | Abbrechen 74 | 75 | 76 | -------------------------------------------------------------------------------- /src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 16 | 17 | 24 | 25 | 26 | 50 | 51 | 52 | 76 | 77 | 78 | -------------------------------------------------------------------------------- /src/main/res/values-tr/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Notlar 5 | 6 | Yeni not 7 | 8 | Son açılanlar 9 | Listeyi sil 10 | Kaydet 11 | Depolama 12 | Farklı kaydet… 13 | Ara… 14 | Hepsini bul… 15 | Yazdır… 16 | Paylaş… 17 | Tarih ekle 18 | Görüntü ekle… 19 | Bağlantı ekle 20 | CSS düzenle… 21 | JS düzenle… 22 | Yedekle… 23 | Yedekleme başladı 24 | Yedekleme tamamlandı 25 | Ayarlar 26 | Klasör 27 | İsim 28 | Ortam 29 | Varsayılan not adı 30 | Tarayıcı 31 | 32 | Harici link\'ler için tarayıcı kullan 33 | 34 | Tema 35 | Yeni not şablonu 36 | Şablon kullan 37 | 38 | Yeni notlar için şablon kullan 39 | 40 | Yeni not şablonu dosyası 41 | Yeni not adı şablonu 42 | 43 | Yeni not adı için şablonu kullan 44 | 45 | Yeni not adı 46 | Hakkında 47 | Sürüm %s 48 | Kurulum %s 49 | Lisans GNU GPLv3 50 | 51 | Telif Hakkı \u00A9 2020 Bill Farmer\n\nMarkdown görünümü Markdown Görünümü, Almanca çeviri mondstern, Brezilya Portekizcesi çevirisi aevw, Fince çeviri Rigo-V, Türkçe çeviri Berkay Gündüz 52 | 53 | 54 | Dosya ismini giriniz 55 | Yükleniyor… 56 | 57 | 58 | Kaydedilmemiş değişiklikleriniz var. Değişiklikleri kaydetmek ister misiniz? 59 | 60 | 61 | 62 | Bu dosya değiştirildi, yeniden yüklemek ister misiniz? 63 | 64 | 65 | 66 | Bu dosya değiştirildi, üzerine yazmak ister misiniz? 67 | 68 | 69 | Tamam 70 | Yeniden yükle 71 | Üzerine yaz 72 | Yoksay 73 | İptal 74 | 75 | 76 | -------------------------------------------------------------------------------- /src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Notes 5 | 6 | New note 7 | Open 8 | Open recent 9 | Clear list 10 | Save 11 | Storage 12 | Save as… 13 | Search… 14 | Find all… 15 | Print… 16 | Share… 17 | Add date 18 | Add link 19 | Add media… 20 | Edit styles… 21 | Edit script… 22 | Backup… 23 | Start backup 24 | Backup complete 25 | Settings 26 | Folder 27 | Name 28 | Media 29 | Default note name 30 | Browser 31 | 32 | Use browser for external links 33 | 34 | Theme 35 | %s 36 | New note template 37 | Use template 38 | 39 | Use template for new notes 40 | 41 | New note template file 42 | New note name template 43 | 44 | Use template for new note name 45 | 46 | New note name 47 | About 48 | Version %s 49 | Built %s 50 | Licence GNU GPLv3 51 | 52 | Copyright \u00A9 2020 Bill Farmer\n\nMarkdown view by Markdown View, German translation by mondstern, Brazilian Portuguese translation by aevw, Finnish translation by Rigo-V, Turkish translation by Berkay Gündüz 53 | 54 | 55 | Choose a file name 56 | Loading… 57 | 58 | 59 | You have unsaved changes. Do you want to save your changes? 60 | 61 | 62 | 63 | This file has changed, do you want to reload it? 64 | 65 | 66 | 67 | This file has changed, do you want to overwrite it? 68 | 69 | 70 | OK 71 | Reload 72 | Overwrite 73 | Discard 74 | Cancel 75 | 76 | 77 | -------------------------------------------------------------------------------- /src/main/java/org/billthefarmer/notes/AboutPreference.java: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Notes - Personal notes for Android 4 | // 5 | // Copyright (C) 2017 Bill Farmer 6 | // 7 | // This program is free software: you can redistribute it and/or modify 8 | // it under the terms of the GNU General Public License as published by 9 | // the Free Software Foundation, either version 3 of the License, or 10 | // (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | // 20 | // Bill Farmer william j farmer [at] yahoo [dot] co [dot] uk. 21 | // 22 | /////////////////////////////////////////////////////////////////////////////// 23 | 24 | package org.billthefarmer.notes; 25 | 26 | import android.content.Context; 27 | import android.preference.DialogPreference; 28 | import android.text.SpannableStringBuilder; 29 | import android.text.method.LinkMovementMethod; 30 | import android.util.AttributeSet; 31 | import android.view.View; 32 | import android.widget.TextView; 33 | 34 | import java.text.DateFormat; 35 | import java.util.regex.Matcher; 36 | import java.util.regex.Pattern; 37 | 38 | // AboutPreference class 39 | public class AboutPreference extends DialogPreference 40 | { 41 | // Constructor 42 | public AboutPreference(Context context, AttributeSet attrs) 43 | { 44 | super(context, attrs); 45 | } 46 | 47 | // On bind dialog view 48 | @Override 49 | protected void onBindDialogView(View view) 50 | { 51 | super.onBindDialogView(view); 52 | 53 | // Get version text view 54 | TextView version = view.findViewById(R.id.about); 55 | 56 | // Set version in text view 57 | if (version != null) 58 | { 59 | SpannableStringBuilder builder = 60 | new SpannableStringBuilder(version.getText()); 61 | Pattern pattern = Pattern.compile("%s"); 62 | Matcher matcher = pattern.matcher(builder); 63 | if (matcher.find()) 64 | builder.replace(matcher.start(), matcher.end(), 65 | BuildConfig.VERSION_NAME); 66 | version.setText(builder); 67 | version.setMovementMethod(LinkMovementMethod.getInstance()); 68 | } 69 | 70 | // Get built text view 71 | TextView built = view.findViewById(R.id.built); 72 | 73 | // Set built date in text view 74 | if (built != null) 75 | { 76 | String d = built.getText().toString(); 77 | DateFormat dateFormat = DateFormat.getDateTimeInstance(); 78 | String s = 79 | String.format(d, dateFormat.format(BuildConfig.BUILT)); 80 | built.setText(s); 81 | } 82 | 83 | // Get copyright text view 84 | TextView copyright = view.findViewById(R.id.copyright); 85 | 86 | // Set movement method 87 | if (copyright != null) 88 | copyright.setMovementMethod(LinkMovementMethod.getInstance()); 89 | 90 | // Get licence text view 91 | TextView licence = view.findViewById(R.id.licence); 92 | 93 | // Set movement method 94 | if (licence != null) 95 | licence.setMovementMethod(LinkMovementMethod.getInstance()); 96 | 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /src/main/res/values-ru/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | О программе 4 | Добавить дату 5 | Добавить ссылку 6 | Добавить медиа… 7 | Записки 8 | Сделать под резерв… 9 | Сборка %s 10 | Отмена 11 | Файл изменился, перезаписать? 12 | Файл изменился, перечитать? 13 | Выберите имя файла 14 | Очистить список 15 | Резерв окончен 16 | Владелец © 2020 Билл Фармер" 17 | 18 | Вид разметки от "Markdown View, Немецкий перевод от mondstern, Бразильский португальский перевод от aevw, Финский перевод от Rigo-V, Турецкий перевод от Беркай Гюндюз, Русский перевод от Xapitonov" " 19 | Не сохранять 20 | Редактор JS-script… 21 | Редактор CSS-styles… 22 | Найти все… 23 | Папка 24 | Лицензия GNU GPLv3" " 25 | Идёт загрузка… 26 | Мультимедиа 27 | У вас есть несохраненные изменения. Хотите сохранить изменения? 28 | Имя для записки 29 | Создать новую 30 | Новое имя записки для шаблона 31 | OK 32 | Открыть 33 | Открыть раннее 34 | Перезаписать 35 | Версия %s 36 | Браузер 37 | Использовать внешний веб-браузер для открытия ссылок 38 | Создавать с именем по умолчанию 39 | Новое имя записки 40 | Использовать шаблон для имени новой записки 41 | Использовать шаблон для новых записок 42 | Использовать шаблон 43 | Использовать шаблон для новых записок 44 | Печать… 45 | Перезагрузить 46 | Сохранить как… 47 | Сохранить 48 | Найти… 49 | Настройки 50 | Поделиться… 51 | Резерв запущен 52 | Проводник 53 | Новый шаблон для записок 54 | Тема 55 | 56 | -------------------------------------------------------------------------------- /src/main/res/values-fi/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Muistiinpanot 5 | 6 | Uusi muistiinpano 7 | Avaa 8 | Avaa viimeaikainen 9 | Tyhjennä lista 10 | Tallenna 11 | Tallennustila 12 | Tallenna nimellä… 13 | Hae… 14 | Etsi kaikki… 15 | Tulosta… 16 | Jaa… 17 | Lisää päivämäärä 18 | Lisää media… 19 | Lisää linkki 20 | Muokkaa tyyliä… 21 | Muokkaa skriptiä… 22 | Varmuuskopioi… 23 | Aloita varmuuskopiointi 24 | Varmuuskopionti valmis 25 | Asetukset 26 | Kansio 27 | Nimi 28 | Media 29 | Muistiinpanon oletusnimi 30 | Selain 31 | 32 | Käytä selainta ulkoisten linkkien avaamiseen 33 | 34 | Teema 35 | Uusi muistiinpanomalli 36 | Käytä mallia 37 | 38 | Käytä mallia uusien dokumenttien pohjana 39 | 40 | Uusi muistiinpanomallitiedosto 41 | Uusi muistiinpanon nimimalli 42 | 43 | Käytä mallia uuden muistiinpanon nimeen 44 | 45 | Uusi muistiinpanon nimi 46 | Tietoa 47 | Versio %s 48 | Koontiversio %s 49 | Lisenssi GNU GPLv3 50 | 51 | Tekijänoikeus \u00A9 2020 Bill Farmer\n\nMarkdown-näkymä: Markdown View, saksankielinen käännös: mondstern, käännös brasilianportugaliksi aevw, suomennos Rigo-V, turkinkielinen käännös Berkay Gündüz 52 | 53 | 54 | Valitse tiedostonimi 55 | Ladataan… 56 | 57 | 58 | Sinulla on tallentamattomia muutoksia. Haluatko tallentaa muutokset? 59 | 60 | 61 | 62 | Tiedosto on muuttunut. Haluatko ladata sen uudestaan? 63 | 64 | 65 | 66 | Tiedosto on muuttunut, haluatko kirjoittaa sen päälle? 67 | 68 | 69 | OK 70 | Lataa uudestaan 71 | Päällekirjoita 72 | Hylkää 73 | Peruuta 74 | 75 | 76 | -------------------------------------------------------------------------------- /src/main/java/com/ibm/icu/text/CharsetRecog_UTF8.java: -------------------------------------------------------------------------------- 1 | // © 2016 and later: Unicode, Inc. and others. 2 | // License & terms of use: http://www.unicode.org/copyright.html 3 | /** 4 | ******************************************************************************* 5 | * Copyright (C) 2005 - 2014, International Business Machines Corporation and * 6 | * others. All Rights Reserved. * 7 | ******************************************************************************* 8 | */ 9 | package com.ibm.icu.text; 10 | 11 | /** 12 | * Charset recognizer for UTF-8 13 | */ 14 | class CharsetRecog_UTF8 extends CharsetRecognizer { 15 | 16 | @Override 17 | String getName() { 18 | return "UTF-8"; 19 | } 20 | 21 | /* (non-Javadoc) 22 | * @see com.ibm.icu.text.CharsetRecognizer#match(com.ibm.icu.text.CharsetDetector) 23 | */ 24 | @Override 25 | CharsetMatch match(CharsetDetector det) { 26 | boolean hasBOM = false; 27 | int numValid = 0; 28 | int numInvalid = 0; 29 | byte input[] = det.fRawInput; 30 | int i; 31 | int trailBytes = 0; 32 | int confidence; 33 | 34 | if (det.fRawLength >= 3 && 35 | (input[0] & 0xFF) == 0xef && (input[1] & 0xFF) == 0xbb && (input[2] & 0xFF) == 0xbf) { 36 | hasBOM = true; 37 | } 38 | 39 | // Scan for multi-byte sequences 40 | for (i=0; i=det.fRawLength) { 62 | break; 63 | } 64 | b = input[i]; 65 | if ((b & 0xc0) != 0x080) { 66 | numInvalid++; 67 | break; 68 | } 69 | if (--trailBytes == 0) { 70 | numValid++; 71 | break; 72 | } 73 | } 74 | } 75 | 76 | // Cook up some sort of confidence score, based on presence of a BOM 77 | // and the existence of valid and/or invalid multi-byte sequences. 78 | confidence = 0; 79 | if (hasBOM && numInvalid==0) { 80 | confidence = 100; 81 | } else if (hasBOM && numValid > numInvalid*10) { 82 | confidence = 80; 83 | } else if (numValid > 3 && numInvalid == 0) { 84 | confidence = 100; 85 | } else if (numValid > 0 && numInvalid == 0) { 86 | confidence = 80; 87 | } else if (numValid == 0 && numInvalid == 0) { 88 | // Plain ASCII. Confidence must be > 10, it's more likely than UTF-16, which 89 | // accepts ASCII with confidence = 10. 90 | // TODO: add plain ASCII as an explicitly detected type. 91 | confidence = 15; 92 | } else if (numValid > numInvalid*10) { 93 | // Probably corrupt utf-8 data. Valid sequences aren't likely by chance. 94 | confidence = 25; 95 | } 96 | return confidence == 0 ? null : new CharsetMatch(det, this, confidence); 97 | } 98 | 99 | } 100 | -------------------------------------------------------------------------------- /src/main/res/xml/preferences.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 9 | 10 | 16 | 17 | 18 | 19 | 22 | 23 | 29 | 30 | 31 | 32 | 35 | 36 | 43 | 44 | 51 | 52 | 53 | 54 | 57 | 58 | 65 | 66 | 73 | 74 | 75 | 76 | 79 | 80 | 87 | 88 | 89 | 90 | 93 | 94 | 103 | 104 | 105 | 106 | 109 | 110 | 118 | 119 | 120 | 121 | 122 | -------------------------------------------------------------------------------- /src/main/java/org/billthefarmer/notes/Settings.java: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Notes - Personal notes for Android 4 | // 5 | // Copyright (C) 2019 Bill Farmer 6 | // 7 | // This program is free software; you can redistribute it and/or modify 8 | // it under the terms of the GNU General Public License as published by 9 | // the Free Software Foundation; either version 3 of the License, or 10 | // (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | // 20 | // Bill Farmer william j farmer [at] yahoo [dot] co [dot] uk. 21 | // 22 | /////////////////////////////////////////////////////////////////////////////// 23 | 24 | package org.billthefarmer.notes; 25 | 26 | import android.app.ActionBar; 27 | import android.app.Activity; 28 | import android.content.SharedPreferences; 29 | import android.content.res.Configuration; 30 | import android.os.Bundle; 31 | import android.preference.PreferenceManager; 32 | import android.view.MenuItem; 33 | 34 | // Settings 35 | public class Settings extends Activity 36 | { 37 | public final static String PREF_NAME = "pref_name"; 38 | public final static String PREF_THEME = "pref_theme"; 39 | public final static String PREF_ABOUT = "pref_about"; 40 | public final static String PREF_PATHS = "pref_paths"; 41 | public final static String PREF_FOLDER = "pref_folder"; 42 | public final static String PREF_EXTERNAL = "pref_external"; 43 | public final static String PREF_NEW_NAME = "pref_new_name"; 44 | public final static String PREF_NEW_TEMPLATE = "pref_new_template"; 45 | public final static String PREF_USE_TEMPLATE = "pref_use_template"; 46 | public final static String PREF_TEMPLATE_FILE = "pref_template_file"; 47 | 48 | // onCreate 49 | @Override 50 | @SuppressWarnings("deprecation") 51 | protected void onCreate(Bundle savedInstanceState) 52 | { 53 | super.onCreate(savedInstanceState); 54 | 55 | // Get preferences 56 | SharedPreferences preferences = 57 | PreferenceManager.getDefaultSharedPreferences(this); 58 | 59 | int theme = Integer.parseInt(preferences.getString(PREF_THEME, "0")); 60 | 61 | Configuration config = getResources().getConfiguration(); 62 | int night = config.uiMode & Configuration.UI_MODE_NIGHT_MASK; 63 | 64 | switch (theme) 65 | { 66 | case Notes.LIGHT: 67 | setTheme(R.style.AppTheme); 68 | break; 69 | 70 | case Notes.DARK: 71 | setTheme(R.style.AppDarkTheme); 72 | break; 73 | 74 | case Notes.SYSTEM: 75 | switch (night) 76 | { 77 | case Configuration.UI_MODE_NIGHT_NO: 78 | setTheme(R.style.AppTheme); 79 | break; 80 | 81 | case Configuration.UI_MODE_NIGHT_YES: 82 | setTheme(R.style.AppDarkTheme); 83 | break; 84 | } 85 | break; 86 | } 87 | 88 | // Display the fragment as the main content. 89 | getFragmentManager().beginTransaction() 90 | .replace(android.R.id.content, new SettingsFragment()) 91 | .commit(); 92 | 93 | // Enable back navigation on action bar 94 | ActionBar actionBar = getActionBar(); 95 | if (actionBar != null) 96 | { 97 | actionBar.setDisplayHomeAsUpEnabled(true); 98 | actionBar.setTitle(R.string.settings); 99 | } 100 | } 101 | 102 | // onOptionsItemSelected 103 | @Override 104 | public boolean onOptionsItemSelected(MenuItem item) 105 | { 106 | // Home, finish 107 | if (item.getItemId() == android.R.id.home) 108 | { 109 | finish(); 110 | return true; 111 | } 112 | 113 | return false; 114 | } 115 | } 116 | -------------------------------------------------------------------------------- /docs/css/styles.css: -------------------------------------------------------------------------------- 1 | html, body { 2 | font-family: "Open Sans", sans-serif; 3 | color: #363636; 4 | height: 100%; 5 | } 6 | 7 | @media (min-width: 48em) { 8 | html { 9 | font-size: 16px; 10 | } 11 | } 12 | 13 | @media (min-width: 58em) { 14 | html { 15 | font-size: 20px; 16 | } 17 | } 18 | 19 | @media (min-width: 48em) { 20 | .content { 21 | margin-left: 21rem; 22 | margin-right: 2rem; 23 | } 24 | } 25 | 26 | @media (min-width: 64em) { 27 | .content { 28 | margin-left: 22rem; 29 | margin-right: 3rem; 30 | } 31 | } 32 | 33 | /* Sidebar */ 34 | .sidebar { 35 | overflow: auto; 36 | text-align: center; 37 | padding: 1rem 1rem; 38 | color: white; 39 | background-color: #363636; 40 | display: flex; 41 | flex-direction: column; 42 | } 43 | .sidebar.sidebar-default { 44 | background-color: #363636; 45 | } 46 | .sidebar.sidebar-green { 47 | background-color: #459D61; 48 | } 49 | .sidebar.sidebar-purple { 50 | background-color: #77518A; 51 | } 52 | .sidebar.sidebar-pink { 53 | background-color: #AD6AA9; 54 | } 55 | .sidebar.sidebar-red { 56 | background-color: #B05353; 57 | } 58 | .sidebar.sidebar-cyan { 59 | background-color: #5399B0; 60 | } 61 | .sidebar.sidebar-blue { 62 | background-color: #5378B0; 63 | } 64 | .sidebar.sidebar-grey { 65 | background-color: #959492; 66 | } 67 | .sidebar.sidebar-orange { 68 | background-color: #DAA35C; 69 | } 70 | @media (min-width: 48em) { 71 | .sidebar { 72 | position: fixed; 73 | top: 0; 74 | left: 0; 75 | bottom: 0; 76 | width: 19rem; 77 | text-align: left; 78 | } 79 | } 80 | 81 | .site-title { 82 | margin-top: 0px; 83 | } 84 | 85 | .sidebar a, 86 | .sidebar a:hover, 87 | .sidebar a:visited { 88 | text-decoration: none; 89 | color: white; 90 | } 91 | 92 | .sidebar a:hover { 93 | color: rgb(223, 223, 223);; 94 | } 95 | 96 | .sidebar ul { 97 | margin: 0px; 98 | padding: 0px; 99 | } 100 | 101 | .sidebar ul li { 102 | list-style: none; 103 | padding-left: 2em; 104 | } 105 | 106 | nav { 107 | margin: 1em 0 1em 0; 108 | } 109 | 110 | .sidebar .navigation { 111 | flex: 1 0 auto; 112 | } 113 | 114 | .sidebar .version { 115 | font-size: 80%; 116 | text-align: right; 117 | padding: 2px; 118 | } 119 | 120 | .sidebar .external-title { 121 | margin-top: 2em; 122 | text-align: center; 123 | font-size: 120%; 124 | } 125 | 126 | .sidebar nav.external { 127 | font-size: 80%; 128 | } 129 | 130 | /* Blocks */ 131 | .block { 132 | margin: 1em 0em 1em 0em; 133 | padding: 0 5px 5px 5px; 134 | border-top: 34px solid; 135 | position: relative; 136 | overflow-wrap: break-word; 137 | } 138 | 139 | .block:before { 140 | position: absolute; 141 | top: -32px; 142 | left: 10px; 143 | color: white; 144 | } 145 | 146 | .block.tip { 147 | background: #e8f7e6; 148 | border-top-color: #84c578; 149 | } 150 | 151 | .block.block.tip:before { 152 | content: "Tip"; 153 | } 154 | 155 | .block.note { 156 | background: #e6f3fb; 157 | border-top-color: #6bb1e0; 158 | } 159 | 160 | .block.block.note:before { 161 | content: "Note"; 162 | } 163 | 164 | .block.info { 165 | background: #fefaf5; 166 | border-top-color: #f1b37e; 167 | } 168 | 169 | .block.block.info:before { 170 | content: "Info"; 171 | } 172 | 173 | .block.warn { 174 | background: #fbeded; 175 | border-top-color: #d58181; 176 | } 177 | 178 | .block.block.warn:before { 179 | content: "Warning"; 180 | } 181 | 182 | /* Section of the page */ 183 | section.page { 184 | margin-bottom: 3em; 185 | } 186 | 187 | section.page h1 { 188 | border-left: 3px solid #363636; 189 | padding-left: 0.5em; 190 | margin-bottom: 0; 191 | } 192 | 193 | section.page .content { 194 | margin-left: 0.5em; 195 | } 196 | 197 | section.page h1 a, 198 | section.page h1 a:hover, 199 | section.page h1 a:visited { 200 | text-decoration: none; 201 | color: #363636; 202 | } 203 | 204 | section.page a, 205 | section.page a:hover, 206 | section.page a:visited { 207 | color: #363636; 208 | } 209 | 210 | section div pre { 211 | overflow: auto; 212 | } 213 | 214 | section code { 215 | background-color: #fafafa; 216 | } 217 | 218 | section img { 219 | max-width: 100%; 220 | } 221 | 222 | table { 223 | border-collapse: collapse; 224 | } 225 | 226 | table,th, td { 227 | border: 1px solid black; 228 | } 229 | 230 | td{ 231 | padding: 5px; 232 | } 233 | -------------------------------------------------------------------------------- /src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 16 | 17 | 25 | 26 | 31 | 32 | 33 | 34 | 35 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 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 | 82 | 83 | 84 | 87 | 88 | 91 | 92 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 108 | 111 | 112 | 113 | 114 | 115 | 116 | -------------------------------------------------------------------------------- /docs/sitemap.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | https://billthefarmer.github.io/notes/introduction/ 6 | 2020-02-14T13:05:17+00:00 7 | 8 | https://billthefarmer.github.io/notes/introduction/features/ 9 | 2020-02-15T19:08:26+00:00 10 | 11 | https://billthefarmer.github.io/notes/using/ 12 | 2020-02-14T13:05:31+00:00 13 | 14 | https://billthefarmer.github.io/notes/using/toolbar/ 15 | 2020-02-15T19:13:22+00:00 16 | 17 | https://billthefarmer.github.io/notes/using/help/ 18 | 2020-02-15T19:28:52+00:00 19 | 20 | https://billthefarmer.github.io/notes/using/double-tap/ 21 | 2020-02-15T19:26:11+00:00 22 | 23 | https://billthefarmer.github.io/notes/using/editing/ 24 | 2020-02-15T19:29:43+00:00 25 | 26 | https://billthefarmer.github.io/notes/using/scrolling/ 27 | 2020-02-15T19:30:01+00:00 28 | 29 | https://billthefarmer.github.io/notes/using/search/ 30 | 2020-02-15T19:38:51+00:00 31 | 32 | https://billthefarmer.github.io/notes/using/find-all/ 33 | 2020-03-11T21:19:28+00:00 34 | 35 | https://billthefarmer.github.io/notes/using/name-template/ 36 | 2022-03-02T09:59:41+00:00 37 | 38 | https://billthefarmer.github.io/notes/using/keyboard-shortcuts/ 39 | 2021-07-22T12:18:09+01:00 40 | 41 | https://billthefarmer.github.io/notes/content/ 42 | 2020-02-16T15:00:19+00:00 43 | 44 | https://billthefarmer.github.io/notes/content/template/ 45 | 2020-02-15T19:39:03+00:00 46 | 47 | https://billthefarmer.github.io/notes/content/text/ 48 | 2020-02-15T19:39:20+00:00 49 | 50 | https://billthefarmer.github.io/notes/content/media/ 51 | 2020-02-15T19:39:29+00:00 52 | 53 | https://billthefarmer.github.io/notes/content/markdown/ 54 | 2023-07-20T13:43:41+01:00 55 | 56 | https://billthefarmer.github.io/notes/content/task-lists/ 57 | 2023-07-20T13:39:50+01:00 58 | 59 | https://billthefarmer.github.io/notes/content/latex/ 60 | 2020-02-15T19:46:17+00:00 61 | 62 | https://billthefarmer.github.io/notes/content/svgbob/ 63 | 2020-12-20T11:42:03+00:00 64 | 65 | https://billthefarmer.github.io/notes/content/links/ 66 | 2020-02-15T19:46:28+00:00 67 | 68 | https://billthefarmer.github.io/notes/content/maps/ 69 | 2020-02-15T19:46:42+00:00 70 | 71 | https://billthefarmer.github.io/notes/content/cursor-position/ 72 | 2020-02-15T19:47:02+00:00 73 | 74 | https://billthefarmer.github.io/notes/content/styles/ 75 | 2020-02-16T15:16:49+00:00 76 | 77 | https://billthefarmer.github.io/notes/content/scripts/ 78 | 2020-02-16T15:17:12+00:00 79 | 80 | https://billthefarmer.github.io/notes/manage/ 81 | 2020-02-16T15:21:16+00:00 82 | 83 | https://billthefarmer.github.io/notes/manage/backup/ 84 | 2020-02-16T15:21:07+00:00 85 | 86 | https://billthefarmer.github.io/notes/manage/sync/ 87 | 2020-02-16T15:21:42+00:00 88 | 89 | https://billthefarmer.github.io/notes/manage/sd-cards/ 90 | 2020-02-16T15:22:08+00:00 91 | 92 | https://billthefarmer.github.io/notes/settings/ 93 | 2020-02-16T15:29:30+00:00 94 | 95 | https://billthefarmer.github.io/notes/settings/settings/ 96 | 2020-02-16T15:22:26+00:00 97 | 98 | https://billthefarmer.github.io/notes/ 99 | 2023-07-20T13:43:41+01:00 100 | 101 | https://billthefarmer.github.io/notes/categories/ 102 | 103 | https://billthefarmer.github.io/notes/tags/ 104 | 105 | 106 | -------------------------------------------------------------------------------- /docs/using/index.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Using on Notes 5 | https://billthefarmer.github.io/notes/using/ 6 | Recent content in Using on Notes 7 | Hugo -- gohugo.io 8 | en-gb 9 | Copyright &copy; 2006 Bill Farmer 10 | Wed, 02 Mar 2022 09:59:41 +0000 11 | 12 | 13 | Toolbar 14 | https://billthefarmer.github.io/notes/using/toolbar/ 15 | Sat, 15 Feb 2020 19:13:22 +0000 16 | https://billthefarmer.github.io/notes/using/toolbar/ 17 | The toolbar items which won&rsquo;t necessarily all appear at once: New – Start a new note Save – Save note Open – Open an existing note Search – incremental search of note And on the menu: Find all – Find all notes containing search text Open recent – Pop up a list of recent files Clear list – Clear list of recent files Print – Print note Share – Share note Save as – Save note in another file Add date – Add the current date and time Add media – Add media from media providers Edit styles – show an editor to edit the custom styles Edit script – show an editor to edit custom javascript Backup – backup notes to a zip file Settings – Show the settings 18 | 19 | 20 | Help 21 | https://billthefarmer.github.io/notes/using/help/ 22 | Sat, 15 Feb 2020 19:28:52 +0000 23 | https://billthefarmer.github.io/notes/using/help/ 24 | You may put a link [Help](file:///android_asset/help.md) to the help file in the app assets in a note. The file will be loaded and may be saved using the Save as menu entry. 25 | 26 | 27 | Double tap 28 | https://billthefarmer.github.io/notes/using/double-tap/ 29 | Sat, 15 Feb 2020 19:26:11 +0000 30 | https://billthefarmer.github.io/notes/using/double-tap/ 31 | In the formatted view a double tap on the screen will switch to the edit view in approximately the same position in the markdown text. The accuracy is dependent on the text formatting and media in the note. 32 | 33 | 34 | Editing 35 | https://billthefarmer.github.io/notes/using/editing/ 36 | Sat, 15 Feb 2020 19:29:43 +0000 37 | https://billthefarmer.github.io/notes/using/editing/ 38 | In the formatted view the Edit button floating above the page allows editing notes. The Accept button restores the formatted view. A long touch on the button hides it until the device is rotated or a long touch on the page. See Markdown for markdown syntax. 39 | 40 | 41 | Scrolling 42 | https://billthefarmer.github.io/notes/using/scrolling/ 43 | Sat, 15 Feb 2020 19:30:01 +0000 44 | https://billthefarmer.github.io/notes/using/scrolling/ 45 | Scrolling the page up will temporarily hide the floating button. Scrolling down restores it. 46 | 47 | 48 | Search 49 | https://billthefarmer.github.io/notes/using/search/ 50 | Sat, 15 Feb 2020 19:38:51 +0000 51 | https://billthefarmer.github.io/notes/using/search/ 52 | You may search notes, the search will update as text is entered into the search field. Use the search widget or keyboard action button to find the next match. 53 | 54 | 55 | Find All 56 | https://billthefarmer.github.io/notes/using/find-all/ 57 | Wed, 11 Mar 2020 21:19:28 +0000 58 | https://billthefarmer.github.io/notes/using/find-all/ 59 | You may find all notes that contain the current search text. This menu item will only appear while the search widget is active. A dialog will pop up with a list of matching notes. Touch an entry to open that note. You may repeat this or refine the search text to find the desired note. 60 | 61 | 62 | Name Template 63 | https://billthefarmer.github.io/notes/using/name-template/ 64 | Wed, 02 Mar 2022 09:59:41 +0000 65 | https://billthefarmer.github.io/notes/using/name-template/ 66 | You may use a template for new note names. If a template is set it will be used for the name of new notes. A date code – &lt;&lt;date&gt;&gt; may be inserted into the template which will be converted into the current date and time. This will default to yyyy/MM/dd-HHmmss, which will expand to 2022/02/20-113052, so &lt;&lt;date&gt;&gt;.md will give 2022/02/20-113052.md. This gives a hierarchical folder structure similar to my Diary app. 67 | 68 | 69 | Keyboard Shortcuts 70 | https://billthefarmer.github.io/notes/using/keyboard-shortcuts/ 71 | Thu, 22 Jul 2021 12:18:09 +0100 72 | https://billthefarmer.github.io/notes/using/keyboard-shortcuts/ 73 | When using an external keyboard, some keyboard shortcuts are implemented: Ctrl+D – Done Ctrl+E – Edit Ctrl+F – Search Ctrl+Shift+F – Close search Ctrl+Alt+F – Find next Ctrl+M – Show menu Ctrl+N – New note Ctrl+O – Open note Ctrl+P – Print note Ctrl+S – Save note Ctrl+Shift+S – Save as F3 – Find next F10 – Show menu 74 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /src/main/java/org/billthefarmer/notes/SettingsFragment.java: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Notes - Personal notes for Android 4 | // 5 | // Copyright (C) 2017 Bill Farmer 6 | // 7 | // This program is free software; you can redistribute it and/or modify 8 | // it under the terms of the GNU General Public License as published by 9 | // the Free Software Foundation; either version 3 of the License, or 10 | // (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | // 20 | // Bill Farmer william j farmer [at] yahoo [dot] co [dot] uk. 21 | // 22 | /////////////////////////////////////////////////////////////////////////////// 23 | 24 | package org.billthefarmer.notes; 25 | 26 | import android.app.ActionBar; 27 | import android.app.Dialog; 28 | import android.content.SharedPreferences; 29 | import android.os.Build; 30 | import android.os.Bundle; 31 | import android.preference.EditTextPreference; 32 | import android.preference.Preference; 33 | import android.preference.PreferenceManager; 34 | import android.preference.PreferenceScreen; 35 | 36 | import java.text.DateFormat; 37 | import java.util.Date; 38 | 39 | // SettingsFragment class 40 | @SuppressWarnings("deprecation") 41 | public class SettingsFragment extends android.preference.PreferenceFragment 42 | implements SharedPreferences.OnSharedPreferenceChangeListener 43 | { 44 | // On create 45 | @Override 46 | public void onCreate(Bundle savedInstanceState) 47 | { 48 | super.onCreate(savedInstanceState); 49 | 50 | // Load the preferences from an XML resource 51 | addPreferencesFromResource(R.xml.preferences); 52 | 53 | SharedPreferences preferences = 54 | PreferenceManager.getDefaultSharedPreferences(getActivity()); 55 | 56 | // Get folder summary 57 | EditTextPreference folder = 58 | (EditTextPreference) findPreference(Settings.PREF_FOLDER); 59 | 60 | // Set folder in text view 61 | folder.setSummary(preferences.getString(Settings.PREF_FOLDER, 62 | Notes.NOTES_FOLDER)); 63 | // Get name summary 64 | EditTextPreference name = 65 | (EditTextPreference) findPreference(Settings.PREF_NAME); 66 | 67 | // Set folder in text view 68 | name.setSummary(preferences.getString(Settings.PREF_NAME, 69 | Notes.NOTES_FILE)); 70 | // Get template preference 71 | EditTextPreference entry = 72 | (EditTextPreference) findPreference(Settings.PREF_TEMPLATE_FILE); 73 | 74 | // Set template in text view 75 | entry.setSummary(preferences.getString(Settings.PREF_TEMPLATE_FILE, 76 | Notes.NOTES_FILE)); 77 | // Get template preference 78 | name = (EditTextPreference) findPreference(Settings.PREF_NEW_NAME); 79 | 80 | // Set template in text view 81 | name.setSummary(preferences.getString(Settings.PREF_NEW_NAME, 82 | Notes.NEW_FILE)); 83 | // Get about summary 84 | Preference about = findPreference(Settings.PREF_ABOUT); 85 | String sum = about.getSummary().toString(); 86 | 87 | // Set version in text view 88 | String s = String.format(sum, BuildConfig.VERSION_NAME); 89 | about.setSummary(s); 90 | } 91 | 92 | // on Resume 93 | @Override 94 | public void onResume() 95 | { 96 | super.onResume(); 97 | getPreferenceScreen().getSharedPreferences() 98 | .registerOnSharedPreferenceChangeListener(this); 99 | } 100 | 101 | // on Pause 102 | @Override 103 | public void onPause() 104 | { 105 | super.onPause(); 106 | getPreferenceScreen().getSharedPreferences() 107 | .unregisterOnSharedPreferenceChangeListener(this); 108 | } 109 | 110 | // On preference tree click 111 | @Override 112 | public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen, 113 | Preference preference) 114 | { 115 | boolean result = 116 | super.onPreferenceTreeClick(preferenceScreen, preference); 117 | 118 | // Set home as up 119 | if (preference instanceof PreferenceScreen) 120 | { 121 | Dialog dialog = ((PreferenceScreen) preference).getDialog(); 122 | ActionBar actionBar = dialog.getActionBar(); 123 | actionBar.setDisplayHomeAsUpEnabled(false); 124 | } 125 | 126 | return result; 127 | } 128 | 129 | // On shared preference changed 130 | @Override 131 | public void onSharedPreferenceChanged(SharedPreferences preferences, 132 | String key) 133 | { 134 | if (key.equals(Settings.PREF_FOLDER)) 135 | { 136 | // Get folder summary 137 | EditTextPreference folder = 138 | (EditTextPreference) findPreference(key); 139 | 140 | // Set folder in text view 141 | folder.setSummary(preferences.getString(key, Notes.NOTES_FOLDER)); 142 | } 143 | 144 | if (key.equals(Settings.PREF_NAME)) 145 | { 146 | // Get folder summary 147 | EditTextPreference name = 148 | (EditTextPreference) findPreference(key); 149 | 150 | // Set folder in text view 151 | name.setSummary(preferences.getString(key, Notes.NOTES_FILE)); 152 | } 153 | 154 | if (key.equals(Settings.PREF_TEMPLATE_FILE)) 155 | { 156 | // Get template preference 157 | EditTextPreference entry = 158 | (EditTextPreference) findPreference(key); 159 | 160 | 161 | // Set folder in text view 162 | entry.setSummary(preferences.getString(key, Notes.NOTES_FILE)); 163 | } 164 | 165 | if (key.equals(Settings.PREF_NEW_NAME)) 166 | { 167 | // Get template preference 168 | EditTextPreference name = 169 | (EditTextPreference) findPreference(key); 170 | 171 | 172 | // Set folder in text view 173 | name.setSummary(preferences.getString(key, Notes.NEW_FILE)); 174 | } 175 | 176 | if (key.equals(Settings.PREF_THEME)) 177 | { 178 | if (Build.VERSION.SDK_INT != Build.VERSION_CODES.M) 179 | getActivity().recreate(); 180 | } 181 | } 182 | } 183 | -------------------------------------------------------------------------------- /src/main/java/com/ibm/icu/text/CharsetRecog_2022.java: -------------------------------------------------------------------------------- 1 | // © 2016 and later: Unicode, Inc. and others. 2 | // License & terms of use: http://www.unicode.org/copyright.html 3 | /* 4 | ******************************************************************************* 5 | * Copyright (C) 2005 - 2012, International Business Machines Corporation and * 6 | * others. All Rights Reserved. * 7 | ******************************************************************************* 8 | */ 9 | package com.ibm.icu.text; 10 | 11 | /** 12 | * class CharsetRecog_2022 part of the ICU charset detection implementation. 13 | * This is a superclass for the individual detectors for 14 | * each of the detectable members of the ISO 2022 family 15 | * of encodings. 16 | * 17 | * The separate classes are nested within this class. 18 | */ 19 | abstract class CharsetRecog_2022 extends CharsetRecognizer { 20 | 21 | 22 | /** 23 | * Matching function shared among the 2022 detectors JP, CN and KR 24 | * Counts up the number of legal an unrecognized escape sequences in 25 | * the sample of text, and computes a score based on the total number & 26 | * the proportion that fit the encoding. 27 | * 28 | * 29 | * @param text the byte buffer containing text to analyse 30 | * @param textLen the size of the text in the byte. 31 | * @param escapeSequences the byte escape sequences to test for. 32 | * @return match quality, in the range of 0-100. 33 | */ 34 | int match(byte [] text, int textLen, byte [][] escapeSequences) { 35 | int i, j; 36 | int escN; 37 | int hits = 0; 38 | int misses = 0; 39 | int shifts = 0; 40 | int quality; 41 | scanInput: 42 | for (i=0; i 2 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | Svgbob 92 | is 93 | a 94 | diagramming 95 | model 96 | which 97 | uses 98 | a 99 | set 100 | of 101 | typing 102 | characters 103 | to 104 | approximate 105 | the 106 | intended 107 | shape. 108 | 109 | It 110 | uses 111 | a 112 | which 113 | are 114 | combination 115 | of 116 | characters 117 | readily 118 | available 119 | on 120 | your 121 | keyboards. 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 | -------------------------------------------------------------------------------- /src/main/java/org/billthefarmer/notes/FileAdapter.java: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Notes - Notebook for Android 4 | // 5 | // Copyright © 2019 Bill Farmer 6 | // 7 | // This program is free software: you can redistribute it and/or modify 8 | // it under the terms of the GNU General Public License as published by 9 | // the Free Software Foundation, either version 3 of the License, or 10 | // (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | // 20 | // Bill Farmer william j farmer [at] yahoo [dot] co [dot] uk. 21 | // 22 | //////////////////////////////////////////////////////////////////////////////// 23 | 24 | package org.billthefarmer.notes; 25 | 26 | import android.content.Context; 27 | import android.content.res.TypedArray; 28 | import android.os.Environment; 29 | import android.util.Log; 30 | import android.view.LayoutInflater; 31 | import android.view.View; 32 | import android.view.ViewGroup; 33 | import android.widget.BaseAdapter; 34 | import android.widget.TextView; 35 | 36 | import java.io.File; 37 | import java.util.List; 38 | 39 | // FileAdapter class 40 | public class FileAdapter extends BaseAdapter 41 | { 42 | private final static String TAG = "FileAdapter"; 43 | 44 | private final static String ROOT = "/"; 45 | 46 | private final static String IMAGE = "image"; 47 | private final static String AUDIO = "audio"; 48 | private final static String VIDEO = "video"; 49 | 50 | private final static String APPLICATION = "application"; 51 | 52 | private final static long LARGE_SIZE = 262144; 53 | 54 | private LayoutInflater inflater; 55 | private List files; 56 | 57 | private int fileId; 58 | private int audioId; 59 | private int imageId; 60 | private int videoId; 61 | private int folderId; 62 | private int parentId; 63 | private int externalId; 64 | private int applicationId; 65 | 66 | // Constructor 67 | public FileAdapter(Context context, List files) 68 | { 69 | inflater = LayoutInflater.from(context); 70 | this.files = files; 71 | 72 | final TypedArray typedArray = 73 | context.obtainStyledAttributes(R.styleable.Notes); 74 | 75 | if (typedArray.hasValue(R.styleable.Notes_folder)) 76 | folderId = 77 | typedArray.getResourceId(R.styleable.Notes_folder, 0); 78 | 79 | if (typedArray.hasValue(R.styleable.Notes_parent)) 80 | parentId = 81 | typedArray.getResourceId(R.styleable.Notes_parent, 0); 82 | 83 | if (typedArray.hasValue(R.styleable.Notes_file)) 84 | fileId = 85 | typedArray.getResourceId(R.styleable.Notes_file, 0); 86 | 87 | if (typedArray.hasValue(R.styleable.Notes_audio)) 88 | audioId = 89 | typedArray.getResourceId(R.styleable.Notes_audio, 0); 90 | 91 | if (typedArray.hasValue(R.styleable.Notes_image)) 92 | imageId = 93 | typedArray.getResourceId(R.styleable.Notes_image, 0); 94 | 95 | if (typedArray.hasValue(R.styleable.Notes_video)) 96 | videoId = 97 | typedArray.getResourceId(R.styleable.Notes_video, 0); 98 | 99 | if (typedArray.hasValue(R.styleable.Notes_external)) 100 | externalId = 101 | typedArray.getResourceId(R.styleable.Notes_external, 0); 102 | 103 | if (typedArray.hasValue(R.styleable.Notes_application)) 104 | applicationId = 105 | typedArray.getResourceId(R.styleable.Notes_application, 0); 106 | 107 | typedArray.recycle(); 108 | } 109 | 110 | @Override 111 | public int getCount() 112 | { 113 | return files.size(); 114 | } 115 | 116 | @Override 117 | public Object getItem(int position) 118 | { 119 | return null; 120 | } 121 | 122 | @Override 123 | public long getItemId(int position) 124 | { 125 | return position; 126 | } 127 | 128 | // Create a new View for each item referenced by the adapter 129 | @Override 130 | public View getView(int position, View convertView, ViewGroup parent) 131 | { 132 | // Create a new view 133 | if (convertView == null) 134 | convertView = inflater.inflate(R.layout.file, parent, false); 135 | 136 | // Find the views 137 | TextView name = convertView.findViewById(R.id.name); 138 | File file = files.get(position); 139 | 140 | if (name != null) 141 | { 142 | if (file.getParentFile() == null) 143 | name.setText(ROOT); 144 | 145 | else 146 | name.setText(file.getName()); 147 | 148 | name.setEnabled(true); 149 | name.setClickable(false); 150 | 151 | if (file.isDirectory()) 152 | { 153 | if (position == 0) 154 | name.setCompoundDrawablesWithIntrinsicBounds(parentId, 155 | 0, 0, 0); 156 | else 157 | name.setCompoundDrawablesWithIntrinsicBounds(folderId, 158 | 0, 0, 0); 159 | } 160 | 161 | else 162 | { 163 | // Get the mime type 164 | String type = FileUtils.getMimeType(file); 165 | if (type != null && type.startsWith(IMAGE)) 166 | { 167 | name.setEnabled(false); 168 | name.setClickable(true); 169 | name.setCompoundDrawablesWithIntrinsicBounds(imageId, 170 | 0, 0, 0); 171 | } 172 | 173 | else if (type != null && type.startsWith(AUDIO)) 174 | { 175 | name.setEnabled(false); 176 | name.setClickable(true); 177 | name.setCompoundDrawablesWithIntrinsicBounds(audioId, 178 | 0, 0, 0); 179 | } 180 | 181 | else if (type != null && type.startsWith(VIDEO)) 182 | { 183 | name.setEnabled(false); 184 | name.setClickable(true); 185 | name.setCompoundDrawablesWithIntrinsicBounds(videoId, 186 | 0, 0, 0); 187 | } 188 | 189 | else if (type != null && type.startsWith(APPLICATION)) 190 | name.setCompoundDrawablesWithIntrinsicBounds(applicationId, 191 | 0, 0, 0); 192 | 193 | else 194 | name.setCompoundDrawablesWithIntrinsicBounds(fileId, 195 | 0, 0, 0); 196 | } 197 | 198 | // Too large 199 | if (file.length() > LARGE_SIZE) 200 | { 201 | name.setEnabled(false); 202 | name.setClickable(true); 203 | } 204 | } 205 | 206 | return convertView; 207 | } 208 | } 209 | -------------------------------------------------------------------------------- /src/main/java/com/ibm/icu/text/CharsetRecog_Unicode.java: -------------------------------------------------------------------------------- 1 | // © 2016 and later: Unicode, Inc. and others. 2 | // License & terms of use: http://www.unicode.org/copyright.html 3 | /* 4 | ******************************************************************************* 5 | * Copyright (C) 1996-2013, International Business Machines Corporation and * 6 | * others. All Rights Reserved. * 7 | ******************************************************************************* 8 | * 9 | */ 10 | 11 | package com.ibm.icu.text; 12 | 13 | /** 14 | * This class matches UTF-16 and UTF-32, both big- and little-endian. The 15 | * BOM will be used if it is present. 16 | */ 17 | abstract class CharsetRecog_Unicode extends CharsetRecognizer { 18 | 19 | /* (non-Javadoc) 20 | * @see com.ibm.icu.text.CharsetRecognizer#getName() 21 | */ 22 | @Override 23 | abstract String getName(); 24 | 25 | /* (non-Javadoc) 26 | * @see com.ibm.icu.text.CharsetRecognizer#match(com.ibm.icu.text.CharsetDetector) 27 | */ 28 | @Override 29 | abstract CharsetMatch match(CharsetDetector det); 30 | 31 | static int codeUnit16FromBytes(byte hi, byte lo) { 32 | return ((hi & 0xff) << 8) | (lo & 0xff); 33 | } 34 | 35 | // UTF-16 confidence calculation. Very simple minded, but better than nothing. 36 | // Any 8 bit non-control characters bump the confidence up. These have a zero high byte, 37 | // and are very likely to be UTF-16, although they could also be part of a UTF-32 code. 38 | // NULs are a contra-indication, they will appear commonly if the actual encoding is UTF-32. 39 | // NULs should be rare in actual text. 40 | static int adjustConfidence(int codeUnit, int confidence) { 41 | if (codeUnit == 0) { 42 | confidence -= 10; 43 | } else if ((codeUnit >= 0x20 && codeUnit <= 0xff) || codeUnit == 0x0a) { 44 | confidence += 10; 45 | } 46 | if (confidence < 0) { 47 | confidence = 0; 48 | } else if (confidence > 100) { 49 | confidence = 100; 50 | } 51 | return confidence; 52 | } 53 | 54 | static class CharsetRecog_UTF_16_BE extends CharsetRecog_Unicode 55 | { 56 | @Override 57 | String getName() 58 | { 59 | return "UTF-16BE"; 60 | } 61 | 62 | @Override 63 | CharsetMatch match(CharsetDetector det) 64 | { 65 | byte[] input = det.fRawInput; 66 | int confidence = 10; 67 | 68 | int bytesToCheck = Math.min(input.length, 30); 69 | for (int charIndex=0; charIndex 0) { 84 | return new CharsetMatch(det, this, confidence); 85 | } 86 | return null; 87 | } 88 | } 89 | 90 | static class CharsetRecog_UTF_16_LE extends CharsetRecog_Unicode 91 | { 92 | @Override 93 | String getName() 94 | { 95 | return "UTF-16LE"; 96 | } 97 | 98 | @Override 99 | CharsetMatch match(CharsetDetector det) 100 | { 101 | byte[] input = det.fRawInput; 102 | int confidence = 10; 103 | 104 | int bytesToCheck = Math.min(input.length, 30); 105 | for (int charIndex=0; charIndex 0) { 120 | return new CharsetMatch(det, this, confidence); 121 | } 122 | return null; 123 | } 124 | } 125 | 126 | static abstract class CharsetRecog_UTF_32 extends CharsetRecog_Unicode 127 | { 128 | abstract int getChar(byte[] input, int index); 129 | 130 | @Override 131 | abstract String getName(); 132 | 133 | @Override 134 | CharsetMatch match(CharsetDetector det) 135 | { 136 | byte[] input = det.fRawInput; 137 | int limit = (det.fRawLength / 4) * 4; 138 | int numValid = 0; 139 | int numInvalid = 0; 140 | boolean hasBOM = false; 141 | int confidence = 0; 142 | 143 | if (limit==0) { 144 | return null; 145 | } 146 | if (getChar(input, 0) == 0x0000FEFF) { 147 | hasBOM = true; 148 | } 149 | 150 | for(int i = 0; i < limit; i += 4) { 151 | int ch = getChar(input, i); 152 | 153 | if (ch < 0 || ch >= 0x10FFFF || (ch >= 0xD800 && ch <= 0xDFFF)) { 154 | numInvalid += 1; 155 | } else { 156 | numValid += 1; 157 | } 158 | } 159 | 160 | 161 | // Cook up some sort of confidence score, based on presence of a BOM 162 | // and the existence of valid and/or invalid multi-byte sequences. 163 | if (hasBOM && numInvalid==0) { 164 | confidence = 100; 165 | } else if (hasBOM && numValid > numInvalid*10) { 166 | confidence = 80; 167 | } else if (numValid > 3 && numInvalid == 0) { 168 | confidence = 100; 169 | } else if (numValid > 0 && numInvalid == 0) { 170 | confidence = 80; 171 | } else if (numValid > numInvalid*10) { 172 | // Probably corrupt UTF-32BE data. Valid sequences aren't likely by chance. 173 | confidence = 25; 174 | } 175 | 176 | return confidence == 0 ? null : new CharsetMatch(det, this, confidence); 177 | } 178 | } 179 | 180 | static class CharsetRecog_UTF_32_BE extends CharsetRecog_UTF_32 181 | { 182 | @Override 183 | int getChar(byte[] input, int index) 184 | { 185 | return (input[index + 0] & 0xFF) << 24 | (input[index + 1] & 0xFF) << 16 | 186 | (input[index + 2] & 0xFF) << 8 | (input[index + 3] & 0xFF); 187 | } 188 | 189 | @Override 190 | String getName() 191 | { 192 | return "UTF-32BE"; 193 | } 194 | } 195 | 196 | 197 | static class CharsetRecog_UTF_32_LE extends CharsetRecog_UTF_32 198 | { 199 | @Override 200 | int getChar(byte[] input, int index) 201 | { 202 | return (input[index + 3] & 0xFF) << 24 | (input[index + 2] & 0xFF) << 16 | 203 | (input[index + 1] & 0xFF) << 8 | (input[index + 0] & 0xFF); 204 | } 205 | 206 | @Override 207 | String getName() 208 | { 209 | return "UTF-32LE"; 210 | } 211 | } 212 | } 213 | -------------------------------------------------------------------------------- /docs/content/index.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Content on Notes 5 | https://billthefarmer.github.io/notes/content/ 6 | Recent content in Content on Notes 7 | Hugo -- gohugo.io 8 | en-gb 9 | Copyright &copy; 2006 Bill Farmer 10 | Thu, 20 Jul 2023 13:43:41 +0100 11 | 12 | 13 | Template 14 | https://billthefarmer.github.io/notes/content/template/ 15 | Sat, 15 Feb 2020 19:39:03 +0000 16 | https://billthefarmer.github.io/notes/content/template/ 17 | You may use a note template. If a template is set it will be copied to a new note. A date code – &lt;&lt;date&gt;&gt; may be inserted into the template which will be converted into the current date and time. Alternatively a date pattern may be added to the code – &lt;&lt;date EEEE d MMMM yyyy HH:mm&gt;&gt; for a custom date format. See here for the pattern documentation. 18 | 19 | 20 | Text 21 | https://billthefarmer.github.io/notes/content/text/ 22 | Sat, 15 Feb 2020 19:39:20 +0000 23 | https://billthefarmer.github.io/notes/content/text/ 24 | You may receive text clips from another app. The text will be added at the current cursor position, or in a new note if no note is open. 25 | 26 | 27 | Media 28 | https://billthefarmer.github.io/notes/content/media/ 29 | Sat, 15 Feb 2020 19:39:29 +0000 30 | https://billthefarmer.github.io/notes/content/media/ 31 | You may store media in the note storage folder and reference them in notes, so markdown text ![cat](cat.jpg) will display cat.jpg stored in the note folder. You may either add media from media providers like file managers or image managers or receive media sent by other apps. Media added will be added at the current cursor position. Media sent by other apps will be added at the current cursor position, or in a new note if no note is open. 32 | 33 | 34 | Markdown 35 | https://billthefarmer.github.io/notes/content/markdown/ 36 | Thu, 20 Jul 2023 13:43:41 +0100 37 | https://billthefarmer.github.io/notes/content/markdown/ 38 | Notes supports several markdown extensions including autolink, tables using vertical bar characters, heading anchor, underlining using ++underline++, strikethrough using ~~strike~~, YAML front matter, task lists using - [x] task #1, - [ ] task #2, superscript using ^super^, subscript using ~sub~. 39 | 40 | 41 | Task Lists 42 | https://billthefarmer.github.io/notes/content/task-lists/ 43 | Thu, 20 Jul 2023 13:39:50 +0100 44 | https://billthefarmer.github.io/notes/content/task-lists/ 45 | To change the state of check boxes in a task list, switch to the edit view and tap on the box [ ]. The box will change state and the edit cursor will be where you tapped. 46 | 47 | 48 | Latex 49 | https://billthefarmer.github.io/notes/content/latex/ 50 | Sat, 15 Feb 2020 19:46:17 +0000 51 | https://billthefarmer.github.io/notes/content/latex/ 52 | Notes doesn&rsquo;t support LaTeX, but it is possible to use an external site to add LaTeX formatted images. ![Math](http://www.sciweavers.org/tex2img.php?eq=\sum_{i=1}^{n}x_{i}^{2} &amp;bc=cornsilk&amp;fc=black&amp;im=jpg&amp;fs=24&amp;ff=arev) \sum_{i=1}^{n}x_{i}^{2} \( \sum_{i=1}^{n}x_{i}^{2} \) If you don&rsquo;t intend to change the image, you can copy it and use that instead, which will then work offline. 53 | 54 | 55 | Svgbob 56 | https://billthefarmer.github.io/notes/content/svgbob/ 57 | Sun, 20 Dec 2020 11:42:03 +0000 58 | https://billthefarmer.github.io/notes/content/svgbob/ 59 | Notes doesn&rsquo;t support text diagrams, but will display SVG images produced by an online editor Svgbob Editor. 60 | 61 | 62 | Links 63 | https://billthefarmer.github.io/notes/content/links/ 64 | Sat, 15 Feb 2020 19:46:28 +0000 65 | https://billthefarmer.github.io/notes/content/links/ 66 | You may put external links in notes, so [DuckDuckGo](https://duckduckgo.com) will show a link to DuckDuckGo. Links will be followed if touched. Use the back button in the toolbar or the navigation bar to return to the note. Links to other notes may added as a relative reference [AnotherNote](AnotherNote.md). 67 | 68 | 69 | Maps 70 | https://billthefarmer.github.io/notes/content/maps/ 71 | Sat, 15 Feb 2020 19:46:42 +0000 72 | https://billthefarmer.github.io/notes/content/maps/ 73 | You may put OpenStreetMap maps in notes with a geo URI ![osm](geo:&lt;lat&gt;,&lt;lng&gt;). Geo uris received from other apps will be added at the current cursor position, or in a new note if no note is open. 74 | 75 | 76 | Cursor Position 77 | https://billthefarmer.github.io/notes/content/cursor-position/ 78 | Sat, 15 Feb 2020 19:47:02 +0000 79 | https://billthefarmer.github.io/notes/content/cursor-position/ 80 | You may put a line in a note to control or remember the edit cursor position. This will not appear in the markdown view. Put [&lt;]: # on a line for the start of an note, [&gt;]: # for the end of a note. Put [#]: # for the cursor position to be remembered. There should be no other text on the line. The current cursor position will be added when the note is saved [#]: # (nnn). 81 | 82 | 83 | Styles 84 | https://billthefarmer.github.io/notes/content/styles/ 85 | Sun, 16 Feb 2020 15:16:49 +0000 86 | https://billthefarmer.github.io/notes/content/styles/ 87 | You may add custom styles to the markdown formatting by placing a styles.css file in the Notes/css folder, which will replace the built in styles file which simply limits the width of images to the page width. Use the built in editor to create a styles file. You must use the editor accept tick button to save the edits. Caution – There is no such thing as a markdown syntax error, but syntax errors in a styles file may cause unpredictable results and affect all notes. 88 | 89 | 90 | Scripts 91 | https://billthefarmer.github.io/notes/content/scripts/ 92 | Sun, 16 Feb 2020 15:17:12 +0000 93 | https://billthefarmer.github.io/notes/content/scripts/ 94 | You may add custom javascript to be loaded into all notes by placing a script.js file in the Notes/js folder. Use the built in editor to create a script file. You must use the editor accept tick button to save the edits. Errors in the script will be logged by the WebView which displays the page. See Javascript tutorial. If you want to use javascript libraries or write a large script it might be a good idea to use the Google Closure Compiler to check and minimise your code. 95 | 96 | 97 | 98 | -------------------------------------------------------------------------------- /gradlew: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 4 | # Copyright © 2015-2021 the original authors. 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # https://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | 19 | ############################################################################## 20 | # 21 | # Gradle start up script for POSIX generated by Gradle. 22 | # 23 | # Important for running: 24 | # 25 | # (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is 26 | # noncompliant, but you have some other compliant shell such as ksh or 27 | # bash, then to run this script, type that shell name before the whole 28 | # command line, like: 29 | # 30 | # ksh Gradle 31 | # 32 | # Busybox and similar reduced shells will NOT work, because this script 33 | # requires all of these POSIX shell features: 34 | # * functions; 35 | # * expansions «$var», «${var}», «${var:-default}», «${var+SET}», 36 | # «${var#prefix}», «${var%suffix}», and «$( cmd )»; 37 | # * compound commands having a testable exit status, especially «case»; 38 | # * various built-in commands including «command», «set», and «ulimit». 39 | # 40 | # Important for patching: 41 | # 42 | # (2) This script targets any POSIX shell, so it avoids extensions provided 43 | # by Bash, Ksh, etc; in particular arrays are avoided. 44 | # 45 | # The "traditional" practice of packing multiple parameters into a 46 | # space-separated string is a well documented source of bugs and security 47 | # problems, so this is (mostly) avoided, by progressively accumulating 48 | # options in "$@", and eventually passing that to Java. 49 | # 50 | # Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, 51 | # and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; 52 | # see the in-line comments for details. 53 | # 54 | # There are tweaks for specific operating systems such as AIX, CygWin, 55 | # Darwin, MinGW, and NonStop. 56 | # 57 | # (3) This script is generated from the Groovy template 58 | # https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt 59 | # within the Gradle project. 60 | # 61 | # You can find Gradle at https://github.com/gradle/gradle/. 62 | # 63 | ############################################################################## 64 | 65 | # Attempt to set APP_HOME 66 | 67 | # Resolve links: $0 may be a link 68 | app_path=$0 69 | 70 | # Need this for daisy-chained symlinks. 71 | while 72 | APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path 73 | [ -h "$app_path" ] 74 | do 75 | ls=$( ls -ld "$app_path" ) 76 | link=${ls#*' -> '} 77 | case $link in #( 78 | /*) app_path=$link ;; #( 79 | *) app_path=$APP_HOME$link ;; 80 | esac 81 | done 82 | 83 | APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit 84 | 85 | APP_NAME="Gradle" 86 | APP_BASE_NAME=${0##*/} 87 | 88 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 89 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' 90 | 91 | # Use the maximum available, or set MAX_FD != -1 to use that value. 92 | MAX_FD=maximum 93 | 94 | warn () { 95 | echo "$*" 96 | } >&2 97 | 98 | die () { 99 | echo 100 | echo "$*" 101 | echo 102 | exit 1 103 | } >&2 104 | 105 | # OS specific support (must be 'true' or 'false'). 106 | cygwin=false 107 | msys=false 108 | darwin=false 109 | nonstop=false 110 | case "$( uname )" in #( 111 | CYGWIN* ) cygwin=true ;; #( 112 | Darwin* ) darwin=true ;; #( 113 | MSYS* | MINGW* ) msys=true ;; #( 114 | NONSTOP* ) nonstop=true ;; 115 | esac 116 | 117 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 118 | 119 | 120 | # Determine the Java command to use to start the JVM. 121 | if [ -n "$JAVA_HOME" ] ; then 122 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 123 | # IBM's JDK on AIX uses strange locations for the executables 124 | JAVACMD=$JAVA_HOME/jre/sh/java 125 | else 126 | JAVACMD=$JAVA_HOME/bin/java 127 | fi 128 | if [ ! -x "$JAVACMD" ] ; then 129 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 130 | 131 | Please set the JAVA_HOME variable in your environment to match the 132 | location of your Java installation." 133 | fi 134 | else 135 | JAVACMD=java 136 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 137 | 138 | Please set the JAVA_HOME variable in your environment to match the 139 | location of your Java installation." 140 | fi 141 | 142 | # Increase the maximum file descriptors if we can. 143 | if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then 144 | case $MAX_FD in #( 145 | max*) 146 | MAX_FD=$( ulimit -H -n ) || 147 | warn "Could not query maximum file descriptor limit" 148 | esac 149 | case $MAX_FD in #( 150 | '' | soft) :;; #( 151 | *) 152 | ulimit -n "$MAX_FD" || 153 | warn "Could not set maximum file descriptor limit to $MAX_FD" 154 | esac 155 | fi 156 | 157 | # Collect all arguments for the java command, stacking in reverse order: 158 | # * args from the command line 159 | # * the main class name 160 | # * -classpath 161 | # * -D...appname settings 162 | # * --module-path (only if needed) 163 | # * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. 164 | 165 | # For Cygwin or MSYS, switch paths to Windows format before running java 166 | if "$cygwin" || "$msys" ; then 167 | APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) 168 | CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) 169 | 170 | JAVACMD=$( cygpath --unix "$JAVACMD" ) 171 | 172 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 173 | for arg do 174 | if 175 | case $arg in #( 176 | -*) false ;; # don't mess with options #( 177 | /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath 178 | [ -e "$t" ] ;; #( 179 | *) false ;; 180 | esac 181 | then 182 | arg=$( cygpath --path --ignore --mixed "$arg" ) 183 | fi 184 | # Roll the args list around exactly as many times as the number of 185 | # args, so each arg winds up back in the position where it started, but 186 | # possibly modified. 187 | # 188 | # NB: a `for` loop captures its iteration list before it begins, so 189 | # changing the positional parameters here affects neither the number of 190 | # iterations, nor the values presented in `arg`. 191 | shift # remove old arg 192 | set -- "$@" "$arg" # push replacement arg 193 | done 194 | fi 195 | 196 | # Collect all arguments for the java command; 197 | # * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of 198 | # shell script including quotes and variable substitutions, so put them in 199 | # double quotes to make sure that they get re-expanded; and 200 | # * put everything else in single quotes, so that it's not re-expanded. 201 | 202 | set -- \ 203 | "-Dorg.gradle.appname=$APP_BASE_NAME" \ 204 | -classpath "$CLASSPATH" \ 205 | org.gradle.wrapper.GradleWrapperMain \ 206 | "$@" 207 | 208 | # Stop when "xargs" is not available. 209 | if ! command -v xargs >/dev/null 2>&1 210 | then 211 | die "xargs is not available" 212 | fi 213 | 214 | # Use "xargs" to parse quoted args. 215 | # 216 | # With -n1 it outputs one arg per line, with the quotes and backslashes removed. 217 | # 218 | # In Bash we could simply go: 219 | # 220 | # readarray ARGS < <( xargs -n1 <<<"$var" ) && 221 | # set -- "${ARGS[@]}" "$@" 222 | # 223 | # but POSIX shell has neither arrays nor command substitution, so instead we 224 | # post-process each arg (as a line of input to sed) to backslash-escape any 225 | # character that might be a shell metacharacter, then use eval to reverse 226 | # that process (while maintaining the separation between arguments), and wrap 227 | # the whole thing up as a single "set" statement. 228 | # 229 | # This will of course break if any of these variables contains a newline or 230 | # an unmatched quote. 231 | # 232 | 233 | eval "set -- $( 234 | printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | 235 | xargs -n1 | 236 | sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | 237 | tr '\n' ' ' 238 | )" '"$@"' 239 | 240 | exec "$JAVACMD" "$@" 241 | -------------------------------------------------------------------------------- /src/main/java/com/ibm/icu/text/CharsetMatch.java: -------------------------------------------------------------------------------- 1 | // © 2016 and later: Unicode, Inc. and others. 2 | // License & terms of use: http://www.unicode.org/copyright.html 3 | /** 4 | ******************************************************************************* 5 | * Copyright (C) 2005-2016, International Business Machines Corporation and * 6 | * others. All Rights Reserved. * 7 | ******************************************************************************* 8 | */ 9 | package com.ibm.icu.text; 10 | 11 | import java.io.ByteArrayInputStream; 12 | import java.io.IOException; 13 | import java.io.InputStream; 14 | import java.io.InputStreamReader; 15 | import java.io.Reader; 16 | 17 | 18 | /** 19 | * This class represents a charset that has been identified by a CharsetDetector 20 | * as a possible encoding for a set of input data. From an instance of this 21 | * class, you can ask for a confidence level in the charset identification, 22 | * or for Java Reader or String to access the original byte data in Unicode form. 23 | *

24 | * Instances of this class are created only by CharsetDetectors. 25 | *

26 | * Note: this class has a natural ordering that is inconsistent with equals. 27 | * The natural ordering is based on the match confidence value. 28 | * 29 | * @stable ICU 3.4 30 | */ 31 | public class CharsetMatch implements Comparable { 32 | 33 | 34 | /** 35 | * Create a java.io.Reader for reading the Unicode character data corresponding 36 | * to the original byte data supplied to the Charset detect operation. 37 | *

38 | * CAUTION: if the source of the byte data was an InputStream, a Reader 39 | * can be created for only one matching char set using this method. If more 40 | * than one charset needs to be tried, the caller will need to reset 41 | * the InputStream and create InputStreamReaders itself, based on the charset name. 42 | * 43 | * @return the Reader for the Unicode character data. 44 | * 45 | * @stable ICU 3.4 46 | */ 47 | public Reader getReader() { 48 | InputStream inputStream = fInputStream; 49 | 50 | if (inputStream == null) { 51 | inputStream = new ByteArrayInputStream(fRawInput, 0, fRawLength); 52 | } 53 | 54 | try { 55 | inputStream.reset(); 56 | return new InputStreamReader(inputStream, getName()); 57 | } catch (IOException e) { 58 | return null; 59 | } 60 | } 61 | 62 | /** 63 | * Create a Java String from Unicode character data corresponding 64 | * to the original byte data supplied to the Charset detect operation. 65 | * 66 | * @return a String created from the converted input data. 67 | * 68 | * @stable ICU 3.4 69 | */ 70 | public String getString() throws java.io.IOException { 71 | return getString(-1); 72 | 73 | } 74 | 75 | /** 76 | * Create a Java String from Unicode character data corresponding 77 | * to the original byte data supplied to the Charset detect operation. 78 | * The length of the returned string is limited to the specified size; 79 | * the string will be trunctated to this length if necessary. A limit value of 80 | * zero or less is ignored, and treated as no limit. 81 | * 82 | * @param maxLength The maximum length of the String to be created when the 83 | * source of the data is an input stream, or -1 for 84 | * unlimited length. 85 | * @return a String created from the converted input data. 86 | * 87 | * @stable ICU 3.4 88 | */ 89 | public String getString(int maxLength) throws java.io.IOException { 90 | String result = null; 91 | if (fInputStream != null) { 92 | StringBuilder sb = new StringBuilder(); 93 | char[] buffer = new char[1024]; 94 | Reader reader = getReader(); 95 | int max = maxLength < 0? Integer.MAX_VALUE : maxLength; 96 | int bytesRead = 0; 97 | 98 | while ((bytesRead = reader.read(buffer, 0, Math.min(max, 1024))) >= 0) { 99 | sb.append(buffer, 0, bytesRead); 100 | max -= bytesRead; 101 | } 102 | 103 | reader.close(); 104 | 105 | return sb.toString(); 106 | } else { 107 | String name = getName(); 108 | /* 109 | * getName() may return a name with a suffix 'rtl' or 'ltr'. This cannot 110 | * be used to open a charset (e.g. IBM424_rtl). The ending '_rtl' or 'ltr' 111 | * should be stripped off before creating the string. 112 | */ 113 | int startSuffix = name.indexOf("_rtl") < 0 ? name.indexOf("_ltr") : name.indexOf("_rtl"); 114 | if (startSuffix > 0) { 115 | name = name.substring(0, startSuffix); 116 | } 117 | result = new String(fRawInput, name); 118 | } 119 | return result; 120 | 121 | } 122 | 123 | /** 124 | * Get an indication of the confidence in the charset detected. 125 | * Confidence values range from 0-100, with larger numbers indicating 126 | * a better match of the input data to the characteristics of the 127 | * charset. 128 | * 129 | * @return the confidence in the charset match 130 | * 131 | * @stable ICU 3.4 132 | */ 133 | public int getConfidence() { 134 | return fConfidence; 135 | } 136 | 137 | /** 138 | * Get the name of the detected charset. 139 | * The name will be one that can be used with other APIs on the 140 | * platform that accept charset names. It is the "Canonical name" 141 | * as defined by the class java.nio.charset.Charset; for 142 | * charsets that are registered with the IANA charset registry, 143 | * this is the MIME-preferred registerd name. 144 | * 145 | * @see java.nio.charset.Charset 146 | * @see java.io.InputStreamReader 147 | * 148 | * @return The name of the charset. 149 | * 150 | * @stable ICU 3.4 151 | */ 152 | public String getName() { 153 | return fCharsetName; 154 | } 155 | 156 | /** 157 | * Get the ISO code for the language of the detected charset. 158 | * 159 | * @return The ISO code for the language or null if the language cannot be determined. 160 | * 161 | * @stable ICU 3.4 162 | */ 163 | public String getLanguage() { 164 | return fLang; 165 | } 166 | 167 | /** 168 | * Compare to other CharsetMatch objects. 169 | * Comparison is based on the match confidence value, which 170 | * allows CharsetDetector.detectAll() to order its results. 171 | * 172 | * @param other the CharsetMatch object to compare against. 173 | * @return a negative integer, zero, or a positive integer as the 174 | * confidence level of this CharsetMatch 175 | * is less than, equal to, or greater than that of 176 | * the argument. 177 | * @throws ClassCastException if the argument is not a CharsetMatch. 178 | * @stable ICU 4.4 179 | */ 180 | @Override 181 | public int compareTo (CharsetMatch other) { 182 | int compareResult = 0; 183 | if (this.fConfidence > other.fConfidence) { 184 | compareResult = 1; 185 | } else if (this.fConfidence < other.fConfidence) { 186 | compareResult = -1; 187 | } 188 | return compareResult; 189 | } 190 | 191 | /* 192 | * Constructor. Implementation internal 193 | */ 194 | CharsetMatch(CharsetDetector det, CharsetRecognizer rec, int conf) { 195 | fConfidence = conf; 196 | 197 | // The references to the original application input data must be copied out 198 | // of the charset recognizer to here, in case the application resets the 199 | // recognizer before using this CharsetMatch. 200 | if (det.fInputStream == null) { 201 | // We only want the existing input byte data if it came straight from the user, 202 | // not if is just the head of a stream. 203 | fRawInput = det.fRawInput; 204 | fRawLength = det.fRawLength; 205 | } 206 | fInputStream = det.fInputStream; 207 | fCharsetName = rec.getName(); 208 | fLang = rec.getLanguage(); 209 | } 210 | 211 | /* 212 | * Constructor. Implementation internal 213 | */ 214 | CharsetMatch(CharsetDetector det, CharsetRecognizer rec, int conf, String csName, String lang) { 215 | fConfidence = conf; 216 | 217 | // The references to the original application input data must be copied out 218 | // of the charset recognizer to here, in case the application resets the 219 | // recognizer before using this CharsetMatch. 220 | if (det.fInputStream == null) { 221 | // We only want the existing input byte data if it came straight from the user, 222 | // not if is just the head of a stream. 223 | fRawInput = det.fRawInput; 224 | fRawLength = det.fRawLength; 225 | } 226 | fInputStream = det.fInputStream; 227 | fCharsetName = csName; 228 | fLang = lang; 229 | } 230 | 231 | 232 | // 233 | // Private Data 234 | // 235 | private int fConfidence; 236 | private byte[] fRawInput = null; // Original, untouched input bytes. 237 | // If user gave us a byte array, this is it. 238 | private int fRawLength; // Length of data in fRawInput array. 239 | 240 | private InputStream fInputStream = null; // User's input stream, or null if the user 241 | // gave us a byte array. 242 | 243 | private String fCharsetName; // The name of the charset this CharsetMatch 244 | // represents. Filled in by the recognizer. 245 | private String fLang; // The language, if one was determined by 246 | // the recognizer during the detect operation. 247 | } 248 | -------------------------------------------------------------------------------- /src/main/assets/help.md: -------------------------------------------------------------------------------- 1 | # Notes 2 | --- 3 | 4 | Android notebook 5 | 6 | * Notes saved in text files 7 | * Use markdown formatting 8 | * Optional new note template 9 | * Optional new note file name template 10 | * Display media 11 | * Display [OpenStreetMap](https://www.openstreetmap.org) maps 12 | * Print notes 13 | * Share notes 14 | * Add date and time 15 | * Add media from media providers 16 | * Receive media from other apps 17 | * Receive geo uris from other apps 18 | * Incremental search of notes 19 | * Dark or light theme for editing 20 | * Shortcut for new notes 21 | * Optional CSS styles 22 | * Optional JavaScript scripts 23 | * Back up notes to a zip file 24 | * Optional edit cursor position control 25 | 26 | ## Toolbar 27 | 28 | The toolbar items which won’t necessarily all appear at once: 29 | 30 | * **New** – Start a new note 31 | * **Save** – Save note 32 | * **Open** – Open an existing note 33 | * **Search** – incremental search of note 34 | 35 | And on the menu: 36 | 37 | * **Find all** – Find all notes containing search text 38 | * **Open recent** – Pop up a list of recent files 39 | * **Clear list** – Clear list of recent files 40 | * **Print** – Print note 41 | * **Share** – Share note 42 | * **Save as** – Save note in another file 43 | * **Add date** – Add the current date and time 44 | * **Add media** – Add media from media providers 45 | * **Edit styles** – show an editor to edit the custom styles 46 | * **Edit script** – show an editor to edit custom javascript 47 | * **Backup** – backup notes to a zip file 48 | * **Settings** – Show the settings 49 | 50 | ## Help 51 | You may put a link `[Help](file:///android_asset/help.md)` to the help 52 | file in the app assets in a note. The file will be loaded and may be 53 | saved using the **Save as** menu entry. 54 | 55 | ## Double tap 56 | In the formatted view a double tap on the screen will switch to the 57 | edit view in approximately the same position in the markdown text. The 58 | accuracy is dependent on the text formatting and media in the note. 59 | 60 | ## Editing 61 | In the formatted view the **Edit** button floating above the page 62 | allows editing notes. The **Accept** button restores the formatted 63 | view. A long touch on the button hides it until the device is rotated 64 | or a long touch on the page. 65 | 66 | See [Markdown](https://daringfireball.net/projects/markdown) for 67 | markdown syntax. 68 | 69 | ## Scrolling 70 | Scrolling the page up will temporarily hide the floating 71 | button. Scrolling down restores it. 72 | 73 | ## Search 74 | You may search notes, the search will update as text is entered into 75 | the search field. Use the search widget or keyboard action button to 76 | find the next match. To find and edit text, search in the markdown 77 | view, and then double tap where you want to edit. This will switch to 78 | the edit view at about the right place. 79 | 80 | ## Find all 81 | You may find all notes that contain the current search text. This menu 82 | item will only appear while the search widget is active. A dialog will 83 | pop up with a list of matching notes. Touch an entry to open that 84 | note. You may repeat this or refine the search text to find the 85 | desired note. 86 | 87 | ## Keyboard shortcuts 88 | When using an external keyboard, some keyboard shortcuts are 89 | implemented: 90 | * Ctrl+D – Done 91 | * Ctrl+E – Edit 92 | * Ctrl+N – New file 93 | * Ctrl+O – Open file 94 | * Ctrl+S – Save file 95 | * Ctrl+Shift+S – Save as 96 | 97 | ## Template 98 | You may use a note template. If a template is set it will be copied to 99 | a new note. A date code – `<>` may be inserted into the 100 | template which will be converted into the current date and 101 | time. Alternatively a date pattern may be added to the code – 102 | `<>` for a custom date format. See 103 | [here](https://developer.android.com/reference/java/text/SimpleDateFormat#date-and-time-patterns) for the pattern documentation. 104 | 105 | ## Name template 106 | You may use a template for new note names. If a template is set it 107 | will be used for the name of new notes. A date code – `<>` 108 | may be inserted into the template which will be converted into the 109 | current date and time. This will default to `yyyy/MM/dd-HHmmss`, which 110 | will expand to `2022/02/20-113052`, so `<>.md` will give 111 | `2022/02/20-113052.md`. This gives a hierarchical folder sturcture 112 | similar to my [Diary](https://github.com/billthefarmer/diary) 113 | app. Alternatively you may use your own date pattern for a custom 114 | name, as above. 115 | 116 | ## Text 117 | You may receive text clips from another app. The text will be added at 118 | the current cursor position, or in a new note if no note is open. 119 | 120 | ## Media 121 | You may store media in the note storage folder and reference them in 122 | notes, so markdown text `![cat](cat.jpg)` will display `cat.jpg` 123 | stored in the note folder. You may either add media from media 124 | providers like file managers or image managers or receive media sent 125 | by other apps. Media added will be added at the current cursor 126 | position. Media sent by other apps will be added at the current cursor 127 | position, or in a new note if no note is open. Content URIs 128 | (`content://`) sent by some media providers and apps will be resolved 129 | to file URIs (`file:///`) if possible. Media will be added using 130 | markdown image syntax (`![]()`), which will be parsed into 131 | an HTML5 media player, text clips will be added as above, URLs will be 132 | added as a link. Media added from removable SD cards not part of the 133 | device storage may work but may not be persistent and is not supported. 134 | 135 | ## Markdown 136 | Notes supports several markdown extensions including autolink, tables 137 | using vertical bar characters, heading anchor, underlining using 138 | `++underline++`, strikethrough using `~~strike~~`, YAML front matter, 139 | task lists using `- [x] task #1`, `- [ ] task #2`, superscript using 140 | `^super^`, subscript using `~sub~`. 141 | 142 | ## Task lists 143 | To change the state of check boxes in a task list, switch to the edit 144 | view and tap on the box `[ ]`. The box will change state and the edit 145 | cursor will be where you tapped. 146 | 147 | ## LaTeX 148 | Notes doesn't support [LaTeX](https://en.wikipedia.org/wiki/LaTeX), 149 | but it is possible to use an external site to add LaTeX formatted 150 | images. 151 | 152 | ![Math](http://www.sciweavers.org/tex2img.php?eq=\sum_{i=1}^{n}x_{i}^{2}&bc=cornsilk&fc=black&im=jpg&fs=24&ff=arev) 153 | 154 | \sum_{i=1}^{n}x_{i}^{2} 155 | 156 | ![Math](http://www.sciweavers.org/tex2img.php?eq=\sum_{i=1}^{n}x_{i}^{2}&bc=cornsilk&fc=black&im=jpg&fs=24&ff=arev) 157 | 158 | If you don't intend to change the image, you can copy it and use that 159 | instead, which will then work offline. 160 | 161 | ## Svgbob 162 | Notes doesn't support text diagrams, but will display SVG images 163 | produced by an online editor [Svgbob 164 | Editor](https://svgbob-editor.netlify.app/). 165 | 166 | ![Svgbob](https://github.com/billthefarmer/billthefarmer.github.io/raw/master/images/diary/bob.svg) 167 | 168 | ## Links 169 | You may put external links in notes, so 170 | `[DuckDuckGo](https://duckduckgo.com)` will show a link to 171 | [DuckDuckGo](https://duckduckgo.com). Links will be followed if 172 | touched. Use the back button in the toolbar or the navigation bar to 173 | return to the note. Links to other notes may added as a relative 174 | reference `[AnotherNote](AnotherNote.md)`. 175 | 176 | ## Maps 177 | You may put [OpenStreetMap](https://www.openstreetmap.org) maps in 178 | notes with a geo URI `![osm](geo:,)`. Geo uris received from 179 | other apps will be added at the current cursor position, or in a new 180 | note if no note is open. 181 | 182 | ## Cursor position 183 | You may put a line in a note to control or remember the edit cursor 184 | position. This will not appear in the markdown view. Put `[<]: #` on a 185 | line for the start of an note, `[>]: #` for the end of a note. Put 186 | `[#]: #` for the cursor position to be remembered. There should be no 187 | other text on the line. The current cursor position will be added when 188 | the note is saved `[#]: # (nnn)`. Because notes are only saved if they 189 | are changed, moving the cursor with no other change will not move the 190 | saved position. 191 | 192 | ## Styles 193 | You may add custom styles to the markdown formatting by placing a 194 | `styles.css` file in the `Notes/css` folder, which will replace the 195 | built in styles file which simply limits the width of images to the 196 | page width. Use the built in editor to create a styles file. You must 197 | use the editor `accept` tick button to save the edits. 198 | 199 | **Caution** – There is no such thing as a markdown syntax error, but 200 | syntax errors in a styles file may cause unpredictable results and 201 | affect all notes. See [CSS Tutorial](https://www.w3schools.com/Css). 202 | 203 | You may include the built in styles file with an `@import` statement 204 | `@import "file:///android_asset/styles.css";` or `@import 205 | url("file:///android_asset/styles.css");`, which should be on the 206 | first line. 207 | 208 | ## Javascript 209 | You may add custom javascript to be loaded into all notes by placing a 210 | `script.js` file in the `Notes/js` folder. Use the built in editor to 211 | create a script file. You must use the editor `accept` tick button to 212 | save the edits. Errors in the script will be logged by the 213 | [WebView](https://developer.android.com/reference/android/webkit/WebView) 214 | which displays the page. See [Javascript 215 | tutorial](https://www.w3schools.com/js). 216 | 217 | If you want to use javascript libraries or write a large script it 218 | might be a good idea to use the Google 219 | [Closure Compiler](https://developers.google.com/closure/compiler) to 220 | check and minimise your code. It will handle multiple input files. 221 | 222 | ## Emojies 223 | There is a script, 224 | [emojies.js](https://github.com/billthefarmer/notes/blob/master/data/emojies.js) 225 | in the data folder and a minimised version, 226 | [emojies.min.js](https://github.com/billthefarmer/notes/blob/master/data/emojies.min.js). Either 227 | may be copied to the `script.js` file as above. The script is a work 228 | in progress, it could do with some TLC from an expert. 229 | 230 | ## Backup 231 | You may create a backup of all your notes in a zip file. The file 232 | defaults to the same name as the notes folder, `Notes.zip`, but may be 233 | changed using the dialog, or by using the **Storage** button to save 234 | the backup using the android file manager. 235 | 236 | ## Sync 237 | Android cloud storage apps when last tested appeared not to be capable 238 | of syncing a real storage folder on the device. However 239 | [Syncthing](https://syncthing.net) does just that and can sync your 240 | notes folder with other devices and desktop computers. 241 | 242 | ## Removable SD cards 243 | Android allows removable SD cards to be used like a USB stick or as 244 | part of the device storage. Notes opened using the chooser on a 245 | removable SD card may not save successfully using the save button. Use 246 | the **Save as** menu item and the **Storage** button to save it using 247 | the android file manager. Alternatively use the **Storage** button on 248 | the chooser dialog to open the Note using the android file manager. 249 | 250 | ## Settings 251 | * **Folder** – Change notes storage folder. Caution – 252 | notes, styles and scripts will not be moved 253 | * **New note template** – Set a new note template. Use the 254 | dialog to choose a file. 255 | * **New note name template** – Set a template for new note 256 | names. Use the dialog to choose a name. 257 | * **Browser** – Use browser for external links 258 | * **Theme** – Choose app theme 259 | * **About** – Show app version, licence and credits 260 | --------------------------------------------------------------------------------