Skip to content

Commit

Permalink
Merge pull request ocropus-archive#40 from zuphilip/patch-1
Browse files Browse the repository at this point in the history
Clean name for new output directory
  • Loading branch information
tmbdev committed Oct 11, 2015
2 parents 147f6d6 + 7acd4bc commit 90e2f27
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ocropus-linegen
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,8 @@ for pageno,font in enumerate(fonts):
if args.numdir:
pagedir = "%s/%04d"%(base,pageno+1)
else:
fbase = re.sub(r'[.][^/]*$','',font)
fbase = re.sub(r'^[./]*','',font)
fbase = re.sub(r'[.][^/]*$','',fbase)
fbase = re.sub(r'[/]','_',fbase)
pagedir = "%s/%s"%(base,fbase)
os.mkdir(pagedir)
Expand Down

0 comments on commit 90e2f27

Please sign in to comment.