From c981bef15cf8da842c17736e2882f54c4155241d Mon Sep 17 00:00:00 2001 From: akshayakshay30 <55040814+akshayakshay30@users.noreply.github.com> Date: Thu, 3 Oct 2019 17:52:16 +0530 Subject: [PATCH 1/5] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index b9d9fc0d..92dc9126 100644 --- a/README.md +++ b/README.md @@ -102,15 +102,15 @@ want to skip this (perhaps to selected deleted files in `git status`), just run PathPicker is a combination of a bash script and some small Python modules. It essentially has three steps: -* First the bash script redirects all standard out in to a python module that +* Firstly, the bash script redirects all standard out in to a python module that parses and extracts out filename candidates. These candidates are extracted with a series of -regular expressions, since the input to PathPicker can be any stdout from another program. Rather +regular expressions since the input to PathPicker can be any stdout from another program. Rather than make specialized parsers for each program, we treat everything as noisy input and select candidates via regexes. To limit the number of calls to the filesystem (to check existence), we are fairly restrictive on the candidates we extract. This has the downside that files that are single words with no extension (like `test`) that are not prepended by -a directory will fail to match. This is a known limitation to PathPicker, and means that it will sometimes fail to find valid files in the input. +a directory will fail to match. This is a known limitation to PathPicker and means that it will sometimes fail to find valid files in the input. * Next, a selector UI built with `curses` is presented to the user. Here you can select a few files to edit or input a command to execute. From 40532a0b9581879e1289598c65a92abcf382b34c Mon Sep 17 00:00:00 2001 From: Tim Gates Date: Wed, 4 Dec 2019 20:33:13 +1100 Subject: [PATCH 2/5] Fix simple typo: tricy -> tricky Closes #310 --- src/screenControl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/screenControl.py b/src/screenControl.py index 323909e8..edc1d581 100755 --- a/src/screenControl.py +++ b/src/screenControl.py @@ -499,7 +499,7 @@ def showAndGetCommand(self): paths = [pathObj.getPath() for pathObj in pathObjs] (maxy, maxx) = self.getScreenDimensions() - # Alright this is a bit tricy -- for tall screens, we try to aim + # Alright this is a bit tricky -- for tall screens, we try to aim # the command prompt right at the middle of the screen so you dont # have to shift your eyes down or up a bunch beginHeight = int(round(maxy / 2) - len(paths) / 2.0) From 53457d18693a5158ca8b2deaaf7b19db1a02e1b5 Mon Sep 17 00:00:00 2001 From: Stephen Gelman Date: Tue, 19 May 2020 22:17:53 -0500 Subject: [PATCH 3/5] Change path of output file to match debian standard The standard debian filename of a package is PACKAGENAME_VERSION_ARCH.deb. Therefore, ideally it should be named pathpicker_0.9.2_all.deb. In the Debian manual at https://www.debian.org/doc/manuals/debian-faq/pkg-basics.en.html#pkgname, it says: The Debian binary package file names conform to the following convention: _-_.deb This currently adds an extra step before we can add it to our local repo so it would be nice if this output the expected filename. --- debian/package.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/package.sh b/debian/package.sh index 231fe0cc..d3d6449d 100755 --- a/debian/package.sh +++ b/debian/package.sh @@ -47,7 +47,7 @@ find . -type f -exec chmod 644 {} \; echo "Building package..." rm "$PTH/package.sh" chmod 755 usr/share/pathpicker/fpp -fakeroot -- sh -c "chown -R root:root * && dpkg --build ./ ../fpp_${VERSION}_noarch.deb ;" +fakeroot -- sh -c "chown -R root:root * && dpkg --build ./ ../pathpicker_${VERSION}_all.deb ;" echo "Restoring template files..." cd - git checkout HEAD -- "$PTH/DEBIAN/control" "$PTH/usr/share/doc/pathpicker/changelog" "$PTH/package.sh" From 905f8016d8d879b9d9319dec55a525d3c3b8b643 Mon Sep 17 00:00:00 2001 From: dragonxlwang Date: Fri, 5 Jun 2020 16:59:37 -0700 Subject: [PATCH 4/5] add FB used repos at FB, those are commonly used repos; --- src/repos.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/repos.py b/src/repos.py index 631de052..f1ed7067 100644 --- a/src/repos.py +++ b/src/repos.py @@ -10,4 +10,4 @@ # www/myFile.py # to: # ~/www/myFile.py -REPOS = ['www'] +REPOS = ['www', 'configerator', 'fbcode', 'configerator-dsi'] From 4372fb251291174a8ce7cd619b8841b0ff9dcb64 Mon Sep 17 00:00:00 2001 From: dragonxlwang Date: Fri, 5 Jun 2020 17:04:31 -0700 Subject: [PATCH 5/5] allow change REPOS by environment variables 1 liner, and this is to allow customize repos; Either this or #314 can be used to unblock; Thanks --- src/parse.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/parse.py b/src/parse.py index 5e3ee9a5..7b7d41f2 100644 --- a/src/parse.py +++ b/src/parse.py @@ -332,7 +332,7 @@ def prependDir(file, withFileInspection=False): # already absolute, easy return '/' + file - if first in REPOS: + if first in REPOS + (os.environ.get('FPP_REPOS') or '').split(','): return os.path.expanduser('~/' + file) if '/' not in file: