add pull command to automerge everything
This commit is contained in:
parent
2e3b61fbfd
commit
11a457a6f1
1 changed files with 7 additions and 2 deletions
9
nboard
9
nboard
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
|
||||||
import curses,time,json,sys,os
|
import curses,time,json,sys,os,subprocess
|
||||||
|
|
||||||
dataPath = os.path.expanduser('~')+'/.nboard/nboard.json'
|
dataPath = os.path.expanduser('~')+'/.nboard/nboard.json'
|
||||||
|
|
||||||
|
@ -130,7 +130,7 @@ file named 'nboard.json' in it, and stick an empty dict
|
||||||
inside it, eg '{}'.
|
inside it, eg '{}'.
|
||||||
|
|
||||||
i would reccomend tracking it with git and adding remotes for other
|
i would reccomend tracking it with git and adding remotes for other
|
||||||
people who use nboard, and then you can `git pull --all` to add them all together.
|
people who use nboard, and then you can `nboard pull` to add them all together.
|
||||||
|
|
||||||
navagation:
|
navagation:
|
||||||
use the arrow keys to move arount
|
use the arrow keys to move arount
|
||||||
|
@ -142,6 +142,11 @@ bugs and stuff:
|
||||||
please report any bugs to ~xfnw on IRC, anywhere you can find him, or
|
please report any bugs to ~xfnw on IRC, anywhere you can find him, or
|
||||||
on the tildegit page, https://tildegit.org/xfnw/nboard
|
on the tildegit page, https://tildegit.org/xfnw/nboard
|
||||||
""")
|
""")
|
||||||
|
elif sys.argv[1] == 'pull':
|
||||||
|
branches=subprocess.run(['git','--dir-dir='+os.path.expanduser('~')+'/.nboard','for-each-ref','refs/remotes','--format','%(rename)'], capture_output=True).stdout.decode().splitlines()
|
||||||
|
subprocess.run(['git','--git-dir='+os.path.expanduser('~')+'/.nboard','pull','--all'])
|
||||||
|
subprocess.run(['git','--git-dir='+os.path.expanduser('~')+'/.nboard','merge']+branches)
|
||||||
|
print("pulled all remotes!")
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
curses.wrapper(main)
|
curses.wrapper(main)
|
||||||
|
|
Loading…
Reference in a new issue