Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

case-insensitive lasertags + more passes #56

Open
wants to merge 2 commits into
base: beta
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions backend/filereaders/svg_tag_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def __init__(self, svgreader):
'text': True # text is special, see read_tag func
}

self.re_findall_lasertags = re.compile('=pass([0-9]+):([0-9]*)(mm\/min)?:([0-9]*)(%)?(:#[a-fA-F0-9]{6})?(:#[a-fA-F0-9]{6})?(:#[a-fA-F0-9]{6})?(:#[a-fA-F0-9]{6})?(:#[a-fA-F0-9]{6})?(:#[a-fA-F0-9]{6})?=').findall
self.re_findall_lasertags = re.compile('=pass([0-9]+):([0-9]*)(mm\/min)?:([0-9]*)(%)?(:#[a-f0-9]{6})?(:#[a-f0-9]{6})?(:#[a-f0-9]{6})?(:#[a-f0-9]{6})?(:#[a-f0-9]{6})?(:#[a-f0-9]{6})?=').findall


def read_tag(self, tag, node):
Expand Down Expand Up @@ -227,7 +227,7 @@ def find_cut_settings_tags(self, tag, node):
# # search one level deep
for child in tag:
text_accum.append(child.text or '')
text_accum = ' '.join(text_accum)
text_accum = ' '.join(text_accum).lower()
matches = self.re_findall_lasertags(text_accum)
# Something like: =pass12:2550:100%:#fff000:#ababab:#ccc999=
# Results in: [('12', '2550', '', '100', '%', ':#fff000', ':#ababab', ':#ccc999', '', '', '')]
Expand Down
2 changes: 1 addition & 1 deletion frontend/js/app_laserjobs.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@


var minNumPassWidgets = 3;
var maxNumPassWidgets = 32;
var maxNumPassWidgets = 256;
var preview_canvas_obj = null;


Expand Down