-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add script to generate pensiev package configuration
- Loading branch information
Showing
3 changed files
with
24 additions
and
76 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import tomli | ||
import tomli_w | ||
|
||
def create_pensiev_toml(): | ||
# Read the original toml file | ||
with open('pyproject.toml', 'rb') as f: | ||
data = tomli.load(f) | ||
|
||
# Modify the project name and script name | ||
data['project']['name'] = 'pensiev' | ||
data['project']['scripts'] = {'pen': 'memos.commands:app'} | ||
|
||
# Write the modified data to the new file | ||
with open('pyproject_pensiev.toml', 'wb') as f: | ||
tomli_w.dump(data, f) | ||
|
||
if __name__ == '__main__': | ||
create_pensiev_toml() |
This file was deleted.
Oops, something went wrong.