summaryrefslogtreecommitdiffstats
path: root/combox
Commit message (Collapse)AuthorAgeFilesLines
* combox/config.py: added a new arg `write' (boolean) to cb_config function.Siddharth Ravikumar2015-02-091-5/+8
| | | | | | `write' is set to 'True' by default. If `write' is 'True' the generated config is written to the disk; otherwise it is returned.
* [bugfix]: combox/config.py - when empty string is given for 'silo_dir'; it ↵Siddharth Ravikumar2015-02-081-2/+4
| | | | | | | | | | | | | | | | sets the dir to PWD, this was not intended. This was fixed. When empty string is given for 'silo_dir', the intended default directory was the combox's config directory. The input to 'silo_dir' was directly given to path.abspath() The path.abspath() function, when an empty string is given returns the PWD. That's where the bug was! So, now the 'silo_dir' input is read to a local variable `silo_dir'. If the local variable `silo_dir' is empty, the combox config directory is assigned; else, the given directory is assigned.
* combox/events.py: Under ComboxDIrMonitor, set logging's level to INFO.Siddharth Ravikumar2015-02-051-0/+4
| | | | | | Reason why this was done: Every time a file is renamed/deleted/modified/created in the combox directory, a message about this is puked out to stdout.
* combox/cbox.py: put the code under __main__ into a new function called 'main()'Siddharth Ravikumar2015-02-051-2/+8
| | | | main() is called from __main__ now.
* [bugfix] combox/cbox.py: Forgot to rename ComboxEventHandler -> ↵Siddharth Ravikumar2015-02-051-2/+2
| | | | ComboxDirMonitor. Fixed it now.
* combox/events.py: In ComboxDirMonitor class, housekeep() is called from the ↵Siddharth Ravikumar2015-01-281-0/+2
| | | | __init__ method.
* combox/events.py: ComboxDirMonitor now inherits LoggingEventHandler instead ↵Siddharth Ravikumar2015-01-281-19/+4
| | | | of FileSystemEventHandler.
* combox/events.py - Wrote first version of housingkeep() method for ↵Siddharth Ravikumar2015-01-271-0/+52
| | | | | | | ComboxDirMonitor class. The test for this method at tests/events_test.py only tests a part of it.
* [bug fix] combox/file.py: rm_shards function checks if a shard exists before ↵Siddharth Ravikumar2015-01-271-1/+7
| | | | os.remove()ing it.
* combox/silo.py: new method `keys()' in ComboxSilo class.Siddharth Ravikumar2015-01-271-1/+7
|
* combox/events.py: now when files are -- created, moved, removed, modified -- ↵Siddharth Ravikumar2015-01-211-6/+11
| | | | | | | their info is kept track in simple db file (using PickleDB). also updated tests/events_test.py to test if the newly added code to that updates the db works properly.
* new module: combox/silo.pySiddharth Ravikumar2015-01-211-0/+99
| | | | | | | - Contains the ComboxSilo class which provides an interface to access the db that stores information about files in the combox directory. Tests for this module is at tests/silo_test.py
* combox/file.py: defined hash_file function.Siddharth Ravikumar2015-01-211-0/+13
| | | | | | hash_file function returns the SHA512 hash of the file's content. The test for the hash_file function is at tests/file_test.py
* Renamed ComboxEventHandler (class) -> ComboxDirMonitorSiddharth Ravikumar2015-01-211-5/+5
| | | | | modified: combox/events.py modified: tests/events_test.py
* combox config now contains a `combox_name` field which contains the name of ↵Siddharth Ravikumar2015-01-211-0/+1
| | | | | | | | the combox. modified: combox/config.py modified: tests/config_test.py modified: tests/test-config/config.yaml
* now the config file also makes note of the 'silo' directory.Siddharth Ravikumar2015-01-211-0/+7
| | | | | | | | | silo directory is the location where the silo (silo.db) containing information about files in the combox directory is stored. modified: combox/config.py modified: tests/config_test.py modified: tests/test-config/config.yaml
* fleshed out the on_modified function in the ComboxEventHandler class + wrote ↵Siddharth Ravikumar2015-01-201-0/+8
| | | | | | | | | tests for it. modified: combox/events.py modified: tests/events_test.py new file: tests/files/ipsum.txt new file: tests/files/lorem.txt
* updated copright year.Siddharth Ravikumar2015-01-205-5/+5
| | | | | | | | | | | | modified: combox/cbox.py modified: combox/config.py modified: combox/crypto.py modified: combox/events.py modified: combox/file.py modified: tests/config_test.py modified: tests/crypto_test.py modified: tests/events_test.py modified: tests/file_test.py
* added combox/cbox.py: pretty rough.Siddharth Ravikumar2015-01-161-0/+82
| | | | contains function that runs combox.
* [bug fix] combox/file.py: fixed bug in move_shards functionSiddharth Ravikumar2015-01-161-0/+5
| | | | | the fix: the shards don't have to be renamed when the directory under which they're located is renamed/moved.
* combox/events.py: fleshed out on_moved, on_deleted functions.Siddharth Ravikumar2015-01-151-2/+24
| | | | The functions are not yet fully complete (See TODO in each function).
* combox/file.py: wrote new utility functions.Siddharth Ravikumar2015-01-151-0/+99
| | | | | | | - rm_nodedir - move_nodedir - rm_shards - move_shards
* combox/config.py: node directories are created if they're not already created.Siddharth Ravikumar2015-01-151-0/+4
|
* combox/events.py: contains the ComboxEventHandler which monitors and does ↵Siddharth Ravikumar2015-01-141-0/+78
| | | | the combox thing.
* combox/crypto.py: relative_path function is used to get the file/directory's ↵Siddharth Ravikumar2015-01-141-4/+9
| | | | basename.
* combox/file.py: new functions defined.Siddharth Ravikumar2015-01-141-6/+53
| | | | | | relative_path: returns relative path of directory or file w. r. t combox directory. mk_nodedir: creates a directory inside all node directories purge_dir: (1) purges a file or (2) purges everything inside a directory (except itself).
* combox/config.py: all directories that are written to YAML now have absolute ↵Siddharth Ravikumar2015-01-141-5/+5
| | | | path.
* combox/crypto.py: removed a `.' that somehow crept into the file at the ↵Siddharth Ravikumar2015-01-131-1/+0
| | | | bottom :<
* combox/file.py: added mk_nodedir function.Siddharth Ravikumar2015-01-131-0/+13
|
* combox/crypto.py: wrote split_and_encrypt & decrypt_and_glue functionsSiddharth Ravikumar2015-01-131-0/+61
|
* combox/config.py: added get_nodedirs function.Siddharth Ravikumar2015-01-131-0/+16
|
* combox/config.py: the config functions does its job irrespective of whether ↵Siddharth Ravikumar2015-01-131-21/+19
| | | | combox was configure before or not.
* rewrote the read_shards() and write_shards() function in combox/file.py.Siddharth Ravikumar2015-01-131-12/+17
| | | | | | | | | Tests were accordingly modded and now use the test config.yaml to split and write shards to dirs. modified: combox/file.py modified: tests/crypto_test.py modified: tests/file_test.py
* modified: combox/config.py - input is read through a function instead of ↵Siddharth Ravikumar2015-01-121-9/+22
| | | | using raw_input directly
* deleted: combox/combox.pySiddharth Ravikumar2015-01-121-243/+0
|
* added back combox/config.py and combox/crypto.pySiddharth Ravikumar2015-01-122-0/+166
|
* added back combox/file.pySiddharth Ravikumar2015-01-121-0/+127
|
* consolidated everything into combox/combox.py.Siddharth Ravikumar2015-01-123-166/+116
| | | | | | | | | | | | tests were removed. will write tests using `nose` later. renamed: combox/file.py -> combox/combox.py deleted: combox/config.py deleted: combox/crypto.py renamed: tests/test_config.py -> tests/combox_tests.py deleted: tests/files/the-red-star.jpg deleted: tests/test_crypto.py deleted: tests/test_file.py
* combox/config.py: added commentSiddharth Ravikumar2015-01-121-1/+2
|
* moved combox/tests -> tests/Siddharth Ravikumar2015-01-125-121/+0
| | | | | | | | renamed: combox/tests/__init__.py -> tests/__init__.py renamed: combox/tests/files/the-red-star.jpg -> tests/files/the-red-star.jpg renamed: combox/tests/test_config.py -> tests/test_config.py renamed: combox/tests/test_crypto.py -> tests/test_crypto.py renamed: combox/tests/test_file.py -> tests/test_file.py
* tests/test_config.py: test file for config.pySiddharth Ravikumar2014-11-211-0/+22
|
* modified: config.py -- configuration thingy is now a function + the ↵Siddharth Ravikumar2014-11-211-24/+29
| | | | passhrase is sha224 summed.
* combox/config.py: initial version of combox configuration done.Siddharth Ravikumar2014-11-131-0/+76
|
* Added crypto.py: Contains function that encrypt data and decrypt ciphers ↵Siddharth Ravikumar2014-11-052-0/+136
| | | | | | | | using AES. Functions defined: pad, encrypt, decrypt, encrypt_shards, decrypt_shards. Also added: tests/test_crypto.py
* file.py: wrote two new functions -- write_shards(), read_shards()Siddharth Ravikumar2014-11-052-1/+51
| | | | | modified: file.py modified: tests/test_file.py
* updated file.py: fixed typo in glue_data documentation.Siddharth Ravikumar2014-10-301-1/+1
|
* updated combox/file.py: renamed split_file -> split_data and glue_file -> ↵Siddharth Ravikumar2014-10-302-35/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | glue_data split_data: reads a string or a stream of bytes and splits them into `n' parts. glue_data: reads an array of strings / stream of bytes and glues them into one string / stream of bytes. read_file: reads content from file and returns it. --- "Python has been an important part of Google since the beginning, and remains so as the system grows and evolves. Today dozens of Google engineers use Python, and we're looking for more people with skills in this language." said Peter Norvig, director of search quality at Google, Inc. --- Google has employed a Gingrich-era Republican as its head lobbyist in DC. Now, Google is effectively helping Comcast kill the Internet as we know it, and end "Net Neutrality" forever. -- SumOfUs.org Sign a petition to ask Google to stand up for Net Neutrality: http://action.sumofus.org/a/googlesupportnn/
* renamed: utils/file.py -> file.py, tests/utils_file.py -> tests/test_file.pyrsiddharth2014-10-303-1/+1
| | | | utils/ directory deleted now.
* Initial commit: File splitter & File gluer done.rsiddharth2014-10-296-0/+113
new file: .gitignore new file: AUTHORS new file: COPYING new file: combox/__init__.py new file: combox/tests/__init__.py new file: combox/tests/files/the-red-star.jpg new file: combox/tests/utils_file.py new file: combox/utils/__init__.py new file: combox/utils/file.py I like to write python FWIW. But after reading a dialect of Lisp when I come back to python, it does not look very beautiful. I guess I'm pretty convinced that there is no language that can ape the beauty of Lisp.