atoponce / d-note

Self destructing encrypted notes
Other
130 stars 43 forks source link

Update setup.py and other awesome stuff #45

Closed herlo closed 9 years ago

herlo commented 9 years ago

While not perfect, this setup.py accommodates packaging. However, if we left generation of salts in the setup.py, it would create one set of salts which would then be created only once. To work around this limitation, a script generate_dnote_hashes was created. It creates the hashes and the data directory based upon a configuration file d-note.ini. The configuration file first needs to be copied to one of two locations, explained in the INSTALL.md file.

A couple things that could be better. I imported ConfigParser directly into note.py and created a dictionary of parsed configurations. While this makes it easy to access that data, it might be better to create a config.py and have that data parsed there, then import it as necessary elsewhere. The INSTALL.md is likely not accurate, as I've not tested the apache nor the nginx configurations since making these changes, even though there are updates to those parts of the document.