Skip to content
This repository has been archived by the owner on Oct 2, 2020. It is now read-only.

Extra space in sch file #63

Closed
leventelist opened this issue Oct 24, 2016 · 6 comments
Closed

Extra space in sch file #63

leventelist opened this issue Oct 24, 2016 · 6 comments

Comments

@leventelist
Copy link

leventelist commented Oct 24, 2016

sch.py generates Fields with extra space at the output, for example:

-F 0 "R207" V 7980 5800 50 0000 C CNN
+F 0 "R207" V 7980 5800 50  0000 C CNN

Note the two white space after "50". This does nothing wrong except that eeschema puts only one space there, and all the time I run my script I have a ton of diffs where only the extra whitespace is the difference.

Thanks,
Levente

@leventelist
Copy link
Author

Okay Github optimizes out the two spaces after 50, but believe me that there are two spaces.

@odurc
Copy link
Collaborator

odurc commented Nov 19, 2016

Hello @leventelist which script exactly you are using? I guess add_part_number.py or update_footprints.py. It would be very handy if you could provide the files to reproduce the issue.

@leventelist
Copy link
Author

I use my own script that uses the sch.py from the kicad-library-utils repo.

You can find my script here:

https://github.com/leventelist/kicad-library-utils/blob/master/sch/update_db_footprints.py

I forked the repo.

To reproduce, you'd need a database, but I guess the update_footprint.py works the same. You can find some sample database here:

http://levente.logonex.eu/cuccok/device_db/db.sqlite

All you need to do is attach an attribute (sorry, I'm a gEDA refugee) to a component on the schematic, and run the script. Value, and the footprint will be changed.

In addition, I realized, that it is KiCad that add extra space, and the script adds just one space. Anyways, it produces extra diffs.

Please note that I am willing to add my database system to KiCad, if there's any interest.

Thanks,
Levente

@odurc
Copy link
Collaborator

odurc commented Nov 22, 2016

I remember this space issue was fixed already on KiCad side. Do you have a recent version?
In the PR KiCad/kicad-library#464 @diggit says about have the build 6631 or higher.

@leventelist
Copy link
Author

This schematic was saved by KiCad 4.0.4. I don't know what does 6631 to version numbers.

http://levente.logonex.eu/cuccok/kicad_net/cpu.sch

HTH,
Lev

@odurc
Copy link
Collaborator

odurc commented Dec 28, 2016

I can confirm the extra space is added by KiCad. Because this is a kicad issue I'm closing the issue.

@odurc odurc closed this as completed Dec 28, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants