Skip to content
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: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
.idea/
.__pycache__/
__pycache__
.vscode
.mypy_cache
Binary file added Project-Archiver.zip
Binary file not shown.
28 changes: 26 additions & 2 deletions Project-Archiver/commands/ExportCommand.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
# This file is a component of Project-Archiver. ~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
import os
import unicodedata
import re

import adsk.core
import adsk.fusion
Expand Down Expand Up @@ -47,8 +49,14 @@ def export_folder(root_folder, output_folder, file_types, write_version, name_op

except AttributeError as e:
ao.ui.messageBox(str(e))
break


except:
pass

try:
ao.app.activeDocument.close(False)
except:
pass

def open_doc(data_file):
app = adsk.core.Application.get()
Expand Down Expand Up @@ -130,10 +138,26 @@ def get_name(write_version, option):

else:
raise ValueError('Something strange happened')

output_name = slugify(output_name)

return output_name


def slugify(name):
"""
Taken from https://github.com/django/django/blob/master/django/utils/text.py
convert spaces or repeated
dashes to single dashes. Remove characters that aren't alphanumerics,
underscores, or hyphens. Convert to lowercase. Also strip leading and
trailing whitespace, dashes, and underscores.
"""
name = str(name)
name = unicodedata.normalize('NFKD', name).encode('ascii', 'ignore').decode('ascii')
name = re.sub(r'[^\w\s-]', '', name)
return re.sub(r'[-\s]+', '-', name).strip('-_')


def update_name_inputs(command_inputs, selection):
command_inputs.itemById('write_version').isVisible = False

Expand Down
89 changes: 0 additions & 89 deletions Project_Archiver.egg-info/PKG-INFO

This file was deleted.

41 changes: 0 additions & 41 deletions Project_Archiver.egg-info/SOURCES.txt

This file was deleted.

1 change: 0 additions & 1 deletion Project_Archiver.egg-info/dependency_links.txt

This file was deleted.

1 change: 0 additions & 1 deletion Project_Archiver.egg-info/top_level.txt

This file was deleted.

27 changes: 23 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,23 @@
# Project-Archiver
Forked since changes to the original project not being made and it being unusable otherwise! Is way faster and more reliable now : )

Main aim is to export massive projects without supervision

Implemented:
- closing files after export
- File name cleaning
- increased robustness a bit (had folder name errors)

TODO:
- some way of logging errors without GUI interrupts (can probably use a normal log file)
- only export un-exported files in a project, rather than going through all of them again







The archiver script will open all Fusion 360 3D data in a project and export it as STEP to a local location of your choosing.

[How to install](#How-to-install)
Expand All @@ -8,7 +27,7 @@ The archiver script will open all Fusion 360 3D data in a project and export it
----

### How to install<a name="How-to-install"></a>
1. Click the latest link and download the [latest distribution](https://github.com/tapnair/Project-Archiver/blob/master/dist/Project-Archiver.zip)
1. Click the latest link and download the [latest distribution](https://github.com/o-gent/Project-Archiver/blob/master/Project-Archiver.zip)

*Note you should download from the link above. The regular git downloads won't get the apper submodule*

Expand Down Expand Up @@ -58,10 +77,10 @@ Fusion 360 will be busy for the duration of the script running, so it would be a
### For Developers<a name="For-Developers"></a>
Clone the repo

Update the apper submodule by browsing to the 'Project-Archiver' sub directory in the unzipped directory and executing:
```
git submodule update --init
```

git submodule add https://github.com/tapnair/apper

## License
Samples are licensed under the terms of the [MIT License](http://opensource.org/licenses/MIT). Please see the [LICENSE](LICENSE) file for full details.

Expand Down
Binary file removed dist/Project-Archiver.zip
Binary file not shown.