Skip to content

Commit

Permalink
Minor refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
Justin-Byrne committed Apr 20, 2023
1 parent 4dbb4d9 commit 3251d7a
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 15 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ Please [open an issue](https://github.com/Justin-Byrne/ClassGenerator/issues/new
├── LICENSE
├── README.md
├── docs
│   ├── CHANGELOG.md
│   └── commands.txt
│   └── CHANGELOG.md
└── source
├── app
│   ├── BuildClass.py
Expand Down
9 changes: 8 additions & 1 deletion docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Changelog
All notable changes to this project will be documented in this file.

## [0.3.1] - 2023-04-20
### Changed
- Refactored and refined get_files ( ) and generator
- Updated README.md

## [0.3.0] - 2023-04-20
### Added
- System utilities, get_files ( ), list_to_string ( ), parse_commands
Expand Down Expand Up @@ -36,7 +41,9 @@ All notable changes to this project will be documented in this file.

---

[0.3.0]: 2023-04-20 [CURRENT REVISION] System utility additions, and general revisions
[0.3.1]: 2023-04-20 [CURRENT REVISION] Minor refactoring

[0.3.0]: 2023-04-20 [4dbb4d9](https://github.com/Justin-Byrne/ClassGenerator/commit/4dbb4d9) System utility additions, and general revisions

[0.2.0]: 2023-04-17 [7968397](https://github.com/Justin-Byrne/ClassGenerator/commit/7968397) Further utility implementation, and general revision(s)

Expand Down
18 changes: 6 additions & 12 deletions source/app/core/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,26 +73,21 @@ def init ( self ):

self.get_files ( )

# process files

#### GETTERS ########################################

def get_files ( self ):

if ( Util.is_file ( self.arguments [ 'source' ] ) ):
if ( Util.is_file ( self.arguments [ 'source' ] ) ): # If: source is file

self.files.append ( self.arguments [ 'source' ] )

elif ( Util.is_directory ( self.arguments [ 'source' ] ) ):

if 'omit_files' in self.arguments.keys ( ):
elif ( Util.is_directory ( self.arguments [ 'source' ] ) ): # If: source is directory

self.files = Util.get_files ( self.arguments [ 'source' ], '.js', self.arguments [ 'omit_files'] )

else:
self.files = Util.get_files ( self.arguments [ 'source' ], '.js', self.arguments [ 'omit_files' ] if 'omit_files' in self.arguments.keys ( ) else '' )

self.files = Util.get_files ( self.arguments [ 'source' ], '.js' )


#### ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ####
# -------------------------------------------------------- #

def remove_elements ( self ):

Expand Down Expand Up @@ -296,4 +291,3 @@ def render_output ( self ):
writer.write ( self.diagram [ 'master' ] )

print ( '>> [ output ] ', output_directory )

3 changes: 3 additions & 0 deletions source/app/utilities/system/file/get_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,8 @@ def filter_omissions ( ):

result.append ( f"{root}/{entry}" )

# for item in result:

# print ( item )

return result

0 comments on commit 3251d7a

Please sign in to comment.