forked from phil777/maxio
-
Notifications
You must be signed in to change notification settings - Fork 6
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
support for version=6 through rmscene #7
Open
chemag
wants to merge
16
commits into
lschwetlick:master
Choose a base branch
from
chemag:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Tested: Made sure all the .rm files in the repo (non-version=6) produce the exact same SVG files. Before: ``` $ find rm_tools -type f -iname '*.rm' | xargs -i sh -c 'python rm_tools/rm2svg.py -i {} -o /tmp/foo.svg && md5sum /tmp/foo.svg' | sort | md5sum 9d7f1647b4f5a428900fb4c68d9da6ce - ``` After: ``` $ find rm_tools -type f -iname '*.rm' | xargs -i sh -c 'python rm_tools/rm2svg.py -i {} -o /tmp/foo.svg && md5sum /tmp/foo.svg' | sort | md5sum 9d7f1647b4f5a428900fb4c68d9da6ce - ```
Tested: ``` $ flake8 rm_tools/rm2svg.py | grep -v E501 $ ``` Note that we're ignoring E501 (line too long) as the right solution is black, which we will do in the next patch. Also made sure all the .rm files in the repo (non-version=6) produce the exact same SVG files. Before: ``` $ find rm_tools -type f -iname '*.rm' | xargs -i sh -c 'python rm_tools/rm2svg.py -i {} -o /tmp/foo.svg && md5sum /tmp/foo.svg' | sort | md5sum 9d7f1647b4f5a428900fb4c68d9da6ce - ``` After: ``` $ find rm_tools -type f -iname '*.rm' | xargs -i sh -c 'python rm_tools/rm2svg.py -i {} -o /tmp/foo.svg && md5sum /tmp/foo.svg' | sort | md5sum 9d7f1647b4f5a428900fb4c68d9da6ce - ```
Includes: * make indentation coherent * add comments to SVG to make it more readable * replace .format-based strings with f-strings * fix a typo ("Mechanical" instead of "Machanical") Tested: Run parser before and after, and checked that the only difference is the indentation and the comments. Also: ``` $ find rm_tools -type f -iname '*.rm' | xargs -i sh -c 'python rm_tools/rm2svg.py -i {} -o /tmp/foo.svg && md5sum /tmp/foo.svg' | sort | md5sum 89fea1bc81d3925f5d049f2cc41a66c2 - ```
"y_width" is also known as "height". "x_width" is also known as "width". Tested: ``` $ find rm_tools -type f -iname '*.rm' | xargs -i sh -c 'python rm_tools/rm2svg.py -i {} -o /tmp/foo.svg && md5sum /tmp/foo.svg' | sort | md5sum 89fea1bc81d3925f5d049f2cc41a66c2 - ```
Also fix the README with how to run a command. Tested: ``` $ rm_tools/rm2svg.py -i ./rm_tools/convert_procedure/paper/93ce11cf-31e6-4a6c-ac67-7214c6be96ab.rm -o /tmp/foo.svg ```
Includes: (1) .content file changes * json["formatVersion"] field set to 2 * json["pages"] field disappears. List of pages can be obtained from json["cPages"]["pages"][]["id"] (2) tries to use [rmscene](https://github.com/chemag/rmscene) to convert version=6 lines (.rm) files.
Tested: Converted my whole repository of .rm files.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.