1 WReader
A simple function, simple page, but practical with Git read-only reader function. Provide private Git repository clone, branch, tag check out and switch functions, mainly used to read Markdown notes and other files (support export and other apps open). Support Clone of Github, GitLab, Gitblit and other Git bare repositories. Authentication information is only stored in the local database and used only in Clone, Pull and Fetch. Support https://xxx.git, SSH ://xxx.git, [email protected] and other formats. You can use https://gitee.com/tea_too_tea_too/WReaderDemo.git to test the repository. The repository is a public repository and does not require authentication information.
Making address: https://github.com/Bottlezn/wreader gitee warehouse address, I will regularly updated: https://gitee.com/tea_too_tea_too/wreader
Latest Release download address:
- Gitee download address
1.1 Function Diagram
-
Clone, browse
-
Recent Reading & Settings page
1.2 Function List
- Clone the project locally from a remote Git repository,Support for key pair and account password detection, supported after V0.4
https://
Protocol authentication information is not detected, there is no need to input authentication information (You can usehttps://gitee.com/tea_too_tea_too/WReaderDemo.git
This repository is a public repository for testing and does not require authentication information.). - Check out a Branch or tag from Remote to a local Branch. Switching local branches does not require a network because WReader does not automatically Pull for you.
- Free Pull of local Branch tags checked out from remote branches does not work. Fetch is also available.
- Support free switching between light and dark mode, whether in the setting page or reading page can be globally switched between light and dark mode.
- Automatic conversion of local images in the warehouse, notes in the image does not need to have an external address.
- Use the Strapdown JS library and the Bootstrap CSS theme to provide a aesthetically pleasing reading experience.
- Provides the latest reading function, in the warehouse file list and reading records with a search function.
- You can also use the mobile phone App to open the file by long pressing the file. You can also export the file.The system prompts you to export the file.
- Also provides internationalization environment switch, invalid warehouse clearance, configuration file import and other functions.
- There is no local editing.
1.3 Quick Use
It is recommended to Clone the project using json file import.
- Key pair import format:
authenticationWay
Yes, the value is 2,priKey
,pubKey
和priKeyPassword
Use Base64 encoding. Among thempriKey
It must beBEGIN RSA PRIVATE KEY
Do not use the initialBEGIN OPENSSH PRIVATE KEY
At the beginning, the JSCH library on which WReader relies does not support this format.{ "gitUri":"Git repository URIs that support Git and HTTP"."targetDir":Git clone git@xxx targetDir You can leave this blank and use the default value."."authenticationWay":2."priKey":"Base64 encoded PRIVATE KEY string contents must BEGIN with 'BEGIN RSA PRIVATE KEY'."."pubKey":"Base64 encoded public key string contents"."priKeyPassword":"Use the Base64 encoded private key password, and pass it blank if it is not encrypted." } Copy the code
- Import format of account and password:
authenticationWay
Yes, the value is 1.{ "gitUri":"Git repository URIs that support Git and HTTP"."targetDir":Git clone git@xxx targetDir You can leave this blank and use the default value."."authenticationWay":1."account": "Base64 encoded account number."."pwd": "Base64 encoded password content." } Copy the code
1.4 Precautions
- WReader does not currently support iOS devices. Because I mainly do Android development, I have learned iOS for a few days recently and found it difficult to import and use Objective-Git. So the Source WReaderHostiOS is just a skeleton that integrates the Flutter Module. Interested friends can join in oh, it is to throw a brick to attract jade. Later, I plan to study the method of Flutter calling the C library libgit2 in my spare time, and try to realize the functions of Git with Native code in both Android and ios terminals or more.
- This App is an App that I design functions and UI and test by myself. If lucky enough to have a lot of friends to use, it will certainly have a lot of problems in the process. There is a log collection function on the App Settings page. If you have any problems, you can go to this page to find them.
- Other undiscovered problems, welcome comments pointed out. My email is [email protected].
- If you like WReader, feel free to like the comments.
2 Project Introduction
- Clone project:
git clone [email protected]:Bottlezn/wreader.git
- The current V0.1 version of tag is
v0.1
. Switch to the tag,Git chekout -b fromTag/v0.1 v0.1
- Let’s say the root path is
$ROOT_DIR
.cd $ROOT_DIR/wreader_flutter_module
, run in terminalflutter pub get flutter create . Copy the code
- The Android project
WReaderHostAndroid
Open it directly using AndroidStudio. - The iOS project
WReaderHostiOS
Need to be inWReaderHostiOS
Run under directorypod install
And then when I open it up, my XCode version is 11.
2.1 General design idea
WReader is something I designed and developed in my spare time:
- Most pages are developed using Flutter. The pages not described below are Flutter pages.
- The reading notes and image browsing pages are developed using Android natively. In addition, the Android Git function is to use the JGit library.
- Markdown file parsing uses WebView to load local Html and strapdown.js to parse the Markdown file into Html format, and then render it with JS libraries such as Bootstrap and jQuery and CSS.
- For iOS, it is recommended to use objective-Git or libgit2 libraries to implement Git functions on iOS. For notes, it is also OK to refer to WebView rendering on Android.
3 credit
Thanks to my company partners: Yun Yunjie and Junjun Junjie for their help on H5 and iOS.
Open source libraries used,٩ (๑ ᵒ ̴ ̶ ̷ ͈ ᷄ ᗨ ᵒ ̴ ̶ ̷ ͈ ᷅) organisation bang-bang dalai
:
Flutter parts:
- Fish_redux: WReader uses it for state managementwenfileThe template generation plugin for IDEA should be updated.
- Fluro: Used in WReader for Route management.
- Intl: A standardized library that I mainly use to format dates.
- Json_annotation, convert, Build_Runner and JSON_serialIZABLE: JSON serialization.
- Flutter_i18n: internationalization
- Sqflite: database operation.
The Android part:
- JGit: Java implementation of Git, WReader’s core functionality depends on the library.
- Glide: Picture browsing library.
- Slf4j-nop: jGit-dependent log library.
- PhotoView: library that provides gesture browsing for images.
- Gson: JSON serialization.
- Com. Amitshekhar. Android debug – db: debug library database.
Html part:
- Strapdown: render JS library for MD files, core dependency library.
- Jquery: jquery.
- Bootstrap: Beautify the CSS using the Bootstrap site.
IOS:
- FMDB: SQLite reads and writes
- WHToast: toast
There are some missing libraries and warm-hearted elder brother to share the article, thanks again! .