Skip to content

Commit

Permalink
Update Readme, update bangou parsing regex
Browse files Browse the repository at this point in the history
  • Loading branch information
gitqwerty777 committed Sep 7, 2020
1 parent f23ea33 commit 134d5d4
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 8 deletions.
6 changes: 3 additions & 3 deletions FileNameParser.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def Handle(self, fileName):
class GeneralBangouHandler(BangouHandler):
def __init__(self, next):
BangouHandler.__init__(self, next)
self.generalBangouRE = re.compile("([a-zA-Z]{1,5})\-+(\d{3,5})")
self.generalBangouRE = re.compile("([a-zA-Z]{1,5})\-+(\d{2,5})")

def Handle(self, fileName):
result = self.generalBangouRE.search(fileName)
Expand All @@ -50,7 +50,7 @@ class GeneralLooseBangouHandler(BangouHandler):
def __init__(self, next):
BangouHandler.__init__(self, next)
self.generalLooseBangouRE = re.compile(
"([a-zA-Z]{1,5})\s*\-*\s*(\d{3,5})")
"([a-zA-Z]{1,5})\s*\-*\s*(\d{2,5})")

def Handle(self, fileName):
result = self.generalLooseBangouRE.search(fileName)
Expand Down Expand Up @@ -81,7 +81,7 @@ def GetFiles(self, fileDir):
stat = fileName.stat()
fileSizeMB = stat.st_size >> 20
if self.minFileSizeMB > fileSizeMB:
#print(f"ignore {str(fileName)} because file too small")
# print(f"ignore {str(fileName)} because file too small")
continue

bangou = self.ParseBangou(fileName.name)
Expand Down
18 changes: 13 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
A simple tool to rename local video files, download album image and thumbnails images using jav unique id(bangou)
# JAV-Info

## Requirement
> A simple tool to rename local video files, download album image and thumbnails images using jav unique id(bangou)
## Demo

- ![Demo](demo.gif)

## Usage

Download Windows(.exe) version at release or using Python

### Python Requirement

- Python3.6 or newer
- install following python packages
Expand All @@ -11,9 +21,7 @@ pip install beautifulsoup4
pip install colorama
```

## Usage

`python main.py`
Usage: `python main.py`

## Config

Expand Down
Binary file added demo.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,5 @@
executor.HandleFiles(info, bangou, fileNames)

dataManager.Save()
print("Press Any Button to Exit")
getch()

0 comments on commit 134d5d4

Please sign in to comment.