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

Not populated in HTML #2

Closed
kiavash-at-work opened this issue Apr 12, 2019 · 1 comment
Closed

Not populated in HTML #2

kiavash-at-work opened this issue Apr 12, 2019 · 1 comment
Labels
bug Something isn't working

Comments

@kiavash-at-work
Copy link
Contributor

When the part is not populated, the generated HTML should mention "Do Not Populate!"

--- a/pcbdl/html.py
+++ b/pcbdl/html.py
@@ -63,9 +63,13 @@ class HTMLPart(Plugin):
 
				if part.__doc__:
						yield "<pre>%s</pre>" % textwrap.dedent(part.__doc__.rstrip())

				yield "<p>Value: %s</p>" % part.value
-               yield "<p>Part Number: %s</p>" % part.part_number
+
+               if part.populated:
+                       yield "<p>Part Number: %s</p>" % part.part_number
+               else:
+                       yield "<p>Do Not Populate!</p>"
@amstan
Copy link
Contributor

amstan commented Apr 13, 2019

Per in person conversation:

  • Part number will remain regardless, just in case one wants to see what part number they have the option of populating and also to encourage people to put a real part number for potential things instead of "DNS".
  • What I really want is the whole part in the html to maybe turn gray when "not part.populated".

@amstan amstan added the bug Something isn't working label Apr 13, 2019
@amstan amstan closed this as completed in 0eb2be7 Apr 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants