Merge branch 'master' into sourcery/master

This commit is contained in:
JareBear
2021-03-06 20:57:46 -06:00
committed by GitHub
6 changed files with 4138 additions and 1788 deletions

7
.gitignore vendored
View File

@ -127,3 +127,10 @@ dmypy.json
# Pyre type checker
.pyre/
# App generated files
Batches/
Images/
Print/
Capture/
Backups/

View File

@ -1,2 +1,16 @@
# DXF to PNG Converter
This program can convert DXF files to image format with ease, with a GUI!
## Usage of the command-line interface
If the GUI is not required, one may run the application as follows:
```bash
python main.py --cli -i input.dxf -o output.png
```
Both input and output files are set relative to the script's root directory, i.e. should be located in the same directory.
## Setup with Anaconda
This assumes that you have the Conda package installed.
* Create a virtual environment: `conda env create --name dxf2png -f environment.yml`
* Activate the environment: `conda activate dxf2png`
* Run the program: `python main.py`
* Deactivate the environment when done: `conda deactivate`

View File

@ -133,14 +133,14 @@
<item>
<widget class="QPushButton" name="btnCreateBatch">
<property name="text">
<string>Create Batch</string>
<string>Create Part Batches</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="btnDeleteBatch">
<property name="text">
<string>Delete Batch</string>
<string>Delete Part Batches</string>
</property>
</widget>
</item>
@ -164,6 +164,28 @@
</property>
</layout>
</item>
<item>
<widget class="QLabel" name="txtCurrentViewingBatch">
<property name="font">
<font>
<pointsize>15</pointsize>
</font>
</property>
<property name="text">
<string>TextLabel</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="Line" name="line_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item>
<layout class="QGridLayout" name="GridLayoutHeaders"/>
</item>
@ -183,7 +205,7 @@
<x>0</x>
<y>0</y>
<width>513</width>
<height>208</height>
<height>212</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout">
@ -236,7 +258,7 @@
</size>
</property>
<property name="text">
<string>Add</string>
<string>Add Parts</string>
</property>
</widget>
</item>
@ -276,7 +298,7 @@
<x>0</x>
<y>0</y>
<width>585</width>
<height>29</height>
<height>20</height>
</rect>
</property>
<widget class="QMenu" name="menuFile">
@ -285,6 +307,7 @@
</property>
<addaction name="action_Add"/>
<addaction name="actionPrint"/>
<addaction name="separator"/>
</widget>
<widget class="QMenu" name="menuHelp">
<property name="title">
@ -294,8 +317,27 @@
<addaction name="actionAbout_Qt"/>
<addaction name="actionAbout_3"/>
</widget>
<widget class="QMenu" name="menuBatches">
<property name="title">
<string>Batches</string>
</property>
<widget class="QMenu" name="menu_Load_Batch">
<property name="title">
<string>&amp;Load Batch</string>
</property>
<addaction name="separator"/>
</widget>
<addaction name="actionCreate_Batch_2"/>
<addaction name="actionDelete_Batch_2"/>
<addaction name="menu_Load_Batch"/>
<addaction name="separator"/>
<addaction name="action_Save_As"/>
<addaction name="separator"/>
<addaction name="actionBackup_All_Files"/>
</widget>
<addaction name="menuFile"/>
<addaction name="menuHelp"/>
<addaction name="menuBatches"/>
</widget>
<action name="actionExport">
<property name="text">
@ -314,7 +356,7 @@
</action>
<action name="action_Add">
<property name="text">
<string>&amp;Add</string>
<string>&amp;Add Parts</string>
</property>
</action>
<action name="action_Save">
@ -337,6 +379,46 @@
<string>About</string>
</property>
</action>
<action name="actionCreate_Batch">
<property name="text">
<string>&amp;Create Batch</string>
</property>
</action>
<action name="actionRename_Batch">
<property name="text">
<string>&amp;Rename Batch</string>
</property>
</action>
<action name="actionDelete_Batch">
<property name="text">
<string>&amp;Delete Batch</string>
</property>
</action>
<action name="actionSave_As">
<property name="text">
<string>&amp;Save As</string>
</property>
</action>
<action name="actionCreate_Batch_2">
<property name="text">
<string>&amp;Create Batch</string>
</property>
</action>
<action name="actionDelete_Batch_2">
<property name="text">
<string>&amp;Delete Batch</string>
</property>
</action>
<action name="action_Save_As">
<property name="text">
<string>&amp;Save As</string>
</property>
</action>
<action name="actionBackup_All_Files">
<property name="text">
<string>&amp;Backup All Files</string>
</property>
</action>
</widget>
<layoutdefault spacing="6" margin="11"/>
<tabstops>

16
environment.yml Normal file
View File

@ -0,0 +1,16 @@
name: dxf2png
channels:
- anaconda
- conda-forge
- defaults
dependencies:
- ezdxf = 0.15.1
- imutils = 0.5.4
- natsort = 7.1.1
- opencv = 3.4.2
- pillow = 8.1.0
- python = 3.7.9
- python-dateutil = 2.8.1
- python-decouple = 3.3
- python_abi = 3.7
- pyqt = 5.9.2

5794
main.py

File diff suppressed because it is too large Load Diff

1
settings.txt Normal file
View File

@ -0,0 +1 @@
Batch.json