Skip to content
This repository has been archived by the owner on Jul 10, 2024. It is now read-only.

Commit

Permalink
Update (#5749)
Browse files Browse the repository at this point in the history
  • Loading branch information
harshraj8843 authored Jun 16, 2024
1 parent 24fa08f commit e95c9da
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions action/dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion action/dist/index.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion action/src/action/collect-blog-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default async function CollectBlogData(): Promise<void> {
try {
CollectBlogDataFn({
GITHUB_USERNAME: 'codinasion',
BLOG_REPONAME: 'codinasion-private',
BLOG_REPONAME: 'codinasion',
BLOG_PATH: 'content/blog/',
BLOG_OUTPUT_PATH: 'blog-data',
GITHUB_TOKEN:
Expand Down
2 changes: 1 addition & 1 deletion action/src/action/collect-tools-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default async function CollectToolsData(): Promise<void> {
try {
CollectToolsDataFn({
GITHUB_USERNAME: 'codinasion',
TOOLS_REPONAME: 'codinasion-private',
TOOLS_REPONAME: 'codinasion',
TOOLS_PATH: 'content/tools/',
TOOLS_OUTPUT_PATH: 'tools-data',
GITHUB_TOKEN:
Expand Down
2 changes: 1 addition & 1 deletion scripts/tools/fetch.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def fetch_tools(tools_data):
# Sort tools.json by name
tools_data = sorted(tools_data, key=lambda k: k["name"])
with open(
"../website/src/app/(PRIVATE)/tools/_components/tools.json",
"../website/src/app/tools/_components/tools.json",
"w",
encoding="utf-8",
) as f:
Expand Down
16 changes: 8 additions & 8 deletions scripts/tools/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,29 @@ def kebab_to_pascal(string):


def generate_tools(tools_data):
if not os.path.exists("../website/src/app/(PRIVATE)/tools/_components/Tools"):
if not os.path.exists("../website/src/app/tools/_components/Tools"):
print("๐Ÿ—๏ธ Create : Tools directory")
os.makedirs("../website/src/app/(PRIVATE)/tools/_components/Tools")
os.makedirs("../website/src/app/tools/_components/Tools")

if not os.path.exists(
"../website/src/app/(PRIVATE)/tools/_components/Tools/Accepted"
"../website/src/app/tools/_components/Tools/Accepted"
):
print("๐Ÿ—๏ธ Create : Tools/Accepted directory")
os.makedirs("../website/src/app/(PRIVATE)/tools/_components/Tools/Accepted")
os.makedirs("../website/src/app/tools/_components/Tools/Accepted")

if not os.path.exists("../website/src/app/(PRIVATE)/tools/_components/Tools/Temp"):
if not os.path.exists("../website/src/app/tools/_components/Tools/Temp"):
print("๐Ÿ—๏ธ Create : Tools/Temp directory")
os.makedirs("../website/src/app/(PRIVATE)/tools/_components/Tools/Temp")
os.makedirs("../website/src/app/tools/_components/Tools/Temp")

print("")

for tool in tools_data:
if tool["ignore"] is False:
# Check if path doesn't exist, create file in temp
if not os.path.exists(
f"../website/src/app/(PRIVATE)/tools/_components/Tools/Accepted/{tool['name']}.tsx"
f"../website/src/app/tools/_components/Tools/Accepted/{tool['name']}.tsx"
):
file_name = f"../website/src/app/(PRIVATE)/tools/_components/Tools/Temp/{tool['name']}.tsx"
file_name = f"../website/src/app/tools/_components/Tools/Temp/{tool['name']}.tsx"
function_name = kebab_to_pascal(tool["name"])
print(f"๐Ÿ—๏ธ Create : {file_name}")
with open(file_name, "w", encoding="utf-8") as f:
Expand Down
2 changes: 1 addition & 1 deletion scripts/tools/script.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
# Read Tools JSON file
print("๐Ÿ‘€ Read : tools.json")
with open(
"../website/src/app/(PRIVATE)/tools/_components/tools.json", encoding="utf-8"
"../website/src/app/tools/_components/tools.json", encoding="utf-8"
) as f:
tools_data = json.load(f)
print("โœ… Total packages in tools.json: " + str(len(tools_data)))
Expand Down

0 comments on commit e95c9da

Please sign in to comment.