Skip to content

Commit

Permalink
news, refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
piotrj committed Dec 8, 2023
1 parent b487d00 commit ac97d62
Show file tree
Hide file tree
Showing 6 changed files with 165 additions and 50 deletions.
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
if You have created a new custom data extractor for a specific data type, share it with others.
Feel free to report issues, bugs, ideas any time. If you like this software, follow the author, leave a star or mention it on social media.
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@ Custom data extractor is a command that can be invoked with a single parameter -
- Windows (10,11)

## Portability
**librer** writes log files, configuration and database files in runtime. Default location for these files is **logs**, **db** subfolders and folder of **librer** executable . If there are no write access rights to such folder, platform-specific folders are used for cache, settings and logs (provided by **appdirs** module). You can use --appdirs command line switch to force that behavior even when local folders are accessible.

**librer** writes log files, configuration and record files in runtime. Default location for these files is **logs** and **data** subfolders of **librer** main directory.

## Technical information
Record in librer is the result of a single scan operation and is shown as one of many top nodes in the main tree window. Contains a directory tree with collected custom data and CRC data. It is stored as a single .dat file in librer database directory. Its internal format is optimized for security, fast initial access and maximum compression (just check :)) Every section is a python data structure serialized by [pickle](https://docs.python.org/3/library/pickle.html) and compressed separately by [Zstandard](https://pypi.org/project/zstandard/) algorithm. The record file, once saved, is never modified afterward. It can only be deleted upon request or exported. All record files are independent of each other.Fuzzy matching is implemented using the SequenceMatcher function provided by the [difflib](https://docs.python.org/3/library/difflib.html) package.
Expand Down Expand Up @@ -84,5 +83,11 @@ pip install -r requirements.txt
python3 ./src/librer.py
```

## Ideas for future development
- gather **custom data** (generated also by user scripts) not only as text but also as binary files and store them inside record file (e.g. image thumbnails etc.)
- calculate the **CRC** of scanned files and use it to search for duplicates among different records, verify current data with the saved file system image

- comparing two records with each other. e.g. two scans of the same file system performed at different times

## Licensing
- **librer** is licensed under **[MIT license](./LICENSE)**
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ appdirs==1.4.4
send2trash==1.8.2
zstandard==0.22.0
psutil==5.9.6
pympler==1.0.1
7 changes: 5 additions & 2 deletions src/dialogs.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ def __init__(self,parent,icon,bg_color,title,pre_show=None,post_close=None,min_w
self.area_main.grid_columnconfigure(0, weight=1)

self.area_buttons = Frame(widget,bg=self.bg_color)
self.area_buttons.pack(side='bottom',expand=0,fill='x')
self.area_buttons.pack(side='bottom',expand=0)
#,fill='x'

self.wait_var=BooleanVar()
self.wait_var.set(False)
Expand Down Expand Up @@ -257,8 +258,10 @@ def __init__(self,parent,icon,bg_color,pre_show=None,post_close=None,min_width=5
self.prev_image[i]=None

self.abort_button=Button(self.area_buttons, text='Abort', width=10,command=lambda : self.hide() )
self.abort_single_button=Button(self.area_buttons, text='Abort single file', width=10,command=lambda : self.hide() )

self.abort_button.pack(side='bottom', anchor='n',padx=5,pady=5)
self.abort_button.pack(side='left', anchor='w',padx=5,pady=5)
#self.abort_single_button.pack(side='right', anchor='e',padx=5,pady=5)

frame_0=Frame(self.area_main,bg=self.bg_color)
if ShowProgress:
Expand Down
Loading

0 comments on commit ac97d62

Please sign in to comment.