-
Notifications
You must be signed in to change notification settings - Fork 105
For Android users
-
Install
Termuxin Android, using theF-droidapp. Follow instructions here. -
Open Termux and type
pkg install gitto install Git. -
Configure Git username and email:
git config --global user.name "John Doe" git config --global user.email johndoe@example.comNOTE: This is the name and email which will go into commits, it can be anything, not necessary related to your GitHub account.
-
In the Termux terminal, type
termux-setup-storageto allow Termux access to your internal storage and/or SD card -
In the Termux terminal, create a folder for your graph, for example
cd documents; mkdir MyGraphand clone your repo there with the commandgit clone git@github.com:{your-username}/{your-reponame}.git ~/documents/MyGraph -
Open Logseq and add a graph on that folder. Check that all looks ok.
-
Install
Termux:WidgetsfromF-droid. -
In Termux, type
cd ~/.shortcutsand edit a file named, for example,pull-graphcontaining:#!/usr/bin/bash source bin/source-ssh-agent cd {your repo location} # eg: cd ~/documents/MyGraph git pull
※ Noted: If you use password-free private keys for Git you don't need the
ssh-agentline. You can include it to avoid typing the private key passphrase each time. -
In the same
~/.shortcutsfolder create a second one named, for example,push-graphcontaining:#!/usr/bin/bash source bin/source-ssh-agent cd {your repo location} git add -A git commit -m "sync from android" git push
-
Add a widget for
Termux Widgetapp to the Android screen, which will show the scripts available in~/.shortcuts(in our example, it will showpull-graphandpush-graph). Taping on them, they will be executed by Termux.
- Tap
pull-graphto download the most recent version of your graph from GitHub. - Open Logseq and admire the latest version of your notes.
- Edit/add notes, work on them.
- Exit Logseq and tap
push-graphto upload your changes to GitHub.