[GSoC 2023] UI tool for fetching online content

Contributions from the participants, questions and answers to their projects.
Discussions of proposals for upcoming events.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
catman
Posts: 412
Joined: Fri Jan 11, 2019 10:42 pm

Re: [GSoC 2023] UI tool for fetching online content

Post by catman »

Very nice to see that things are starting off.

The specification and the plan that looks very good. Quite clearly its a huge topic and to start with one idea is better than remain at the discussion stage forever, tough it might be wise to see it as a prototyping to learn what works good and what new ideas need to be incorporated.

What could be added to the specification would be use cases. I like what @yorik said about the user being the most difficult part. I am sure FreeCAD users will come up with a million different ways to manage their parts with that tool, e.g. in their favourite structure.
I think the user community could help the project by agreeing on a handful of key use cases than can be put to test with the earliest of implementations. I give an example.

  • User A designs a CNC project and needs a linear rail system. So he wants to look at available models with <19mm rail width.
  • User B designs freaky housing for an PCB project and want to look through the available potentiometers and buttons. He wants to see all parts for 6mm axis and potentiometers with threads.
  • User D wants to download all FreeCAD internet library objects from the "professional line" of the manufacturer "UK Doorgrips & Co"
you get the idea...
berniev
Posts: 247
Joined: Wed Apr 13, 2022 10:45 pm
Location: Oz

Re: [GSoC 2023] UI tool for fetching online content

Post by berniev »

If it is desired to run a remote sql server, this is likely not a significant issue. FreeCAD already has a web server somewhere. That host probably will have a LAMP stack or similar so it already has, or can easily have, a mysql server. No big deal to fire it up.

Who has the keys to the hosting? My guess would be @yorik?
User avatar
yorik
Founder
Posts: 13640
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: [GSoC 2023] UI tool for fetching online content

Post by yorik »

@kkremitzki is the main web stack maintainer, me and @chennes have access too.
User avatar
a.paritosh
Posts: 21
Joined: Fri May 05, 2023 4:36 am
Location: Ranchi, Jharkhand, India
Contact:

Re: [GSoC 2023] UI tool for fetching online content

Post by a.paritosh »

Here is the repository that I have published on my github. Do check it out.

Current status:
  1. models for tags, components, metadata done
  2. SPDX license done
  3. Api based on OpenAPI 3.0.0 done
  4. basic validations in progress
  5. error/exception handling and there responses in progress
Amulya Paritosh
GSoC 2023
User avatar
a.paritosh
Posts: 21
Joined: Fri May 05, 2023 4:36 am
Location: Ranchi, Jharkhand, India
Contact:

Re: [GSoC 2023] UI tool for fetching online content

Post by a.paritosh »

What are your ideas on tags. How should we finalize the tags? @chennes @yorik

I have an Idea, we can use the directory names of the Component Library for tags.

I have made a small script to do that:-

Code: Select all

import os

tags = []
base_path = "<path>/FreeCAD-library"
[attachment=0]tags.txt[/attachment]
def get_directories(path: str):
	if os.path.isfile(path):
		return
	tag = path.rsplit('/', 1)[-1]
	tags.append(tag)
	for p in os.listdir(path):
		get_directories(os.path.join(path, p))

get_directories(base_path)
tags.remove("FreeCAD-library")

with open("test/tags.txt", "w") as file:
	for tag in tags:
		file.write(tag+'\n')
Here is the file extracted with this.
Last edited by a.paritosh on Sat Jun 10, 2023 12:50 pm, edited 1 time in total.
Amulya Paritosh
GSoC 2023
User avatar
a.paritosh
Posts: 21
Joined: Fri May 05, 2023 4:36 am
Location: Ranchi, Jharkhand, India
Contact:

Re: [GSoC 2023] UI tool for fetching online content

Post by a.paritosh »

For populating the database, most of the fields can be extracted from the current Components Repository.

Metadata Fields :-
  • Required fields :-
    1. name
    2. version
    3. maintainer
  • Optional fields :-
    1. author
    2. thumbnail
    3. description
    4. rating
Field SIZE will be the part of component data as it depends on the type of file (step, fcstd, etc)

The data I am able to extract :-
  1. name
  2. size
  3. thumbnail
I think for the components present in the Repository, a default Maintainer may be given? and same for the Author?
Description and Rating can be kept empty for now.

But what about the Version? I am note able to extract that from the Repository.
Any ideas? @chennes @yorik @catman

The script I made for extraction these data
Amulya Paritosh
GSoC 2023
User avatar
yorik
Founder
Posts: 13640
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: [GSoC 2023] UI tool for fetching online content

Post by yorik »

Version is complicated. Depending on the base system, there could be several ways to get it. I would leave a field there but not populate it for now. Maybe at some point it's a property we could have in a FCStd file... But then other filetypes might not have it. Maybe that's something that should be scanned from the file's timestamp and kept in a history table? Not sure...

There could be assets of different filetypes too (FCStd, Step, etc...). Maybe it's an interesting field to have too?
User avatar
adrianinsaval
Veteran
Posts: 5541
Joined: Thu Apr 05, 2018 5:15 pm

Re: [GSoC 2023] UI tool for fetching online content

Post by adrianinsaval »

When version number is not available a timestamp could be used
User avatar
a.paritosh
Posts: 21
Joined: Fri May 05, 2023 4:36 am
Location: Ranchi, Jharkhand, India
Contact:

Re: [GSoC 2023] UI tool for fetching online content

Post by a.paritosh »

Project Status Report
Tasks Completed:
  1. API ready
  2. DBMS models and CRUD methods available through API endpoints
  3. GUI Widgets for browsing components developed
Tasks in Progress:
  1. ElasticSearch for searching components
  2. Frontend App developement
Upcoming Tasks:
  1. More in Fontend dev
  2. Frontend connectivity with api
  3. local storage of components
Issues and Challenges:
  1. synchronization of DMBS with ElasticSearch
Amulya Paritosh
GSoC 2023
User avatar
a.paritosh
Posts: 21
Joined: Fri May 05, 2023 4:36 am
Location: Ranchi, Jharkhand, India
Contact:

Re: [GSoC 2023] UI tool for fetching online content

Post by a.paritosh »

Hello Everyone. I have successfully connected API with the frontend application here is a screenshot and demo video

Do drop any design changes and suggestions


(was not able to embed the images and videos directly here. How to do it?)
Amulya Paritosh
GSoC 2023
Post Reply