RRW Development Log - Month 4 Week 1

XiNiHa·2021년 4월 1일
0

RRW Development Log

목록 보기
13/15

Full Sail University에서 Final Project로 진행한 복분자막걸리(Raspberry Rice Wine, RRW) 개발 과정에서 작성한 글입니다.

In this week, I have focused on implementing the script import feature. It enables the users to import scripts from a text file, which can be their actual scripts for recording videos/voices. Since writing a bunch of scripts twice can be a stressful task to do, this feature will be very helpful to users who already have their scripts for recording.

The most important part of this feature is the way of constructing text patterns. Users can construct their own text patterns to extract parts of the text and then map them to the fields. This is made of runtime-compiled regular expressions, and the construction of the pattern is done by filling a text input with field names and placeholder characters.

Although the UI was a bit complex to construct, I was able to reference some code from previous works, especially the text input part with chips of field names. This was very similar to the one that existed in the file export options modal, so I nearly just copy-pasted all the code.

While implementing this, I have faced some issues with whitespace characters. The text extracted from the text input had "non-breaking space" as its whitespace character. However, the whitespace characters from text files usually aren't them, instead, it's just normal whitespace characters. This difference broke the RegExp pattern matching. While it took some time to figure out the actual problem, the fix was very simple. Just replacing the non-breaking space characters with normal whitespace characters solved the problem.

Although I have implemented only one feature, it was very useful and also challenging to implement. Therefore I'm mostly satisfied with this week's progress. For the next week, I'm thinking about saving and loading a whole project as a file. Importing image files as layers can be also implemented if I get things done quickly.

0개의 댓글