*xschem news*: read a design directly from a web r...
# xschem
s
xschem news: read a design directly from a web repository, example: https://raw.githubusercontent.com/UAH-IC-Design-Team/sky130-10-bit-SAR-ADC/dev/xschem/src/raw_bit_calculator/raw_bit_calculator.sch just paste the url in the file open dialog box, or start xschem from the command line as:
Copy code
xschem <https://raw.githubusercontent.com/UAH-IC-Design-Team/sky130-10-bit-SAR-ADC/dev/xschem/src/raw_bit_calculator/raw_bit_calculator.sch>
👍 4
m
@Stefan Schippers That is a super cool feature! It makes it really nice to quickly checkout any project. I also feel rather flattered you were taking a look at my project; I wish I had cleaned up the schematics a bit more ;)
s
Thank you!. I have tried various repositories, xschem has to do some guessing for the directory structure of the project. Some designers put all schematic and symbols in one directory, some others put different parts in parallel different directories, some others use nested directories below the top level, so I tried different projects (including yours!). It's not a matter of accessing a single file, any schematic includes lot of sub-symbols, so it is not trivial. Nice schematic, by the way!.
m
Thank you! That makes sense. Pathing is hard... I ran into some pathing difficulties doing multi project merge with git submodules. I was in a rush, but soon will compile my thoughts and then ask some questions on how to handle it better.
t
How do you do that? Is there a library that allows you to open a URL as a file stream?
s
@Tim Edwards No, I do that in the old 'KISS' way. Simply use a url transfer program (wget or curl) to get a temporary local copy (xschem files are usually very small so it works quite fast) . Either wget or curl can be configured in xschemrc (with some options to remove verbosity), they both work. I did not want to handle the complexity myself, expecially for https protocol, that needs some TLS backend for key exchanging, I guess. The difficult part is figuring out the directory structure of the remote repository to find and fetch the subcircuits. Some designs use a big directory, some use multiple parallel directories, some use nested directories. Xschem does some heuristic and tries to get the referenced symbols/schematics.