Skip to content

Commit

Permalink
Merge pull request #75 from ZeroPhone/ZPUI-74
Browse files Browse the repository at this point in the history
[WIP] Update setup instruction for arch-linux
  • Loading branch information
CRImier committed Jan 4, 2018
2 parents 707e35d + 6575f89 commit 59638a4
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
6 changes: 6 additions & 0 deletions apps/personal/contacts/address_book.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@

from helpers import Singleton, flatten
from helpers import setup_logger

logger = setup_logger(__name__, "warning")


class AddressBook(Singleton):
def __init__(self):
"""
Expand Down Expand Up @@ -84,6 +86,10 @@ def find(self, **kwargs):
c = Contact(**kwargs)
return self.find_best_duplicate(c)

def get_contacts_with(self, attribute_name):
# type: (str) -> list
return [c for c in self.contacts if len(getattr(c, attribute_name))]

def find_best_duplicate(self, contact):
# type: (Contact) -> Contact
match_score_contact_list = self.find_duplicates(contact)
Expand Down
15 changes: 13 additions & 2 deletions docs/setup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,17 @@ System requirements
* Graphical environment (the emulator is based on Pygame)
* A keyboard (the same keyboard that you're using for the system will work great)

Arch-linux installation
-----------------------
.. code-block:: bash
sudo pacman -Si python2-pip git python2-pygame
sudo pip2 install luma.emulator
git clone https://github.com/ZeroPhone/ZPUI
cd ZPUI
./setup_emulator
python2 main.py #Run the emulator
Ubuntu/Debian installation
--------------------------

Expand All @@ -109,7 +120,7 @@ Assuming Python 2 is the default Python version:
sudo pip install luma.emulator
git clone https://github.com/ZeroPhone/ZPUI
cd ZPUI
./setup_emulator.sh
./setup_emulator
#Run the emulator
python main.py
Expand All @@ -122,7 +133,7 @@ OpenSUSE installation
sudo pip2 install luma.emulator
git clone https://github.com/ZeroPhone/ZPUI
cd ZPUI
./setup_emulator.sh
./setup_emulator
#Run the emulator
python2 main.py
Expand Down

0 comments on commit 59638a4

Please sign in to comment.