Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Icon #351

Closed
mdeweerd opened this issue Apr 21, 2019 · 16 comments
Closed

Icon #351

mdeweerd opened this issue Apr 21, 2019 · 16 comments
Labels
discussion Discution about implementation and new features. enhancement Improvements on features already existent.
Milestone

Comments

@mdeweerd
Copy link
Contributor

mdeweerd commented Apr 21, 2019

  • *sorted(...) results in invalid syntax
  • print('{} = '.format(f), end=' ') gives invalid syntax (line 231, kicost.py) on th e"=" symbol for end
    => replaced with print '{} = '.format(f),
from urllib.parse import quote_plus as urlquote
ImportError: No module named parse

Replace with

try:
    from urllib.parse import quote_plus as urlquote
except ImportError:
     from urllib import quote_plus as urlquote

from .dist_local_template import dist_local_templates
replace with
from .dist_local_template import dist_local_template

  • kicost_gui.py
    from .distributors import init_distributor_dic

    -> commented
    from .kicost_gui import * etc.
    as I am not using the gui.

dist_list.remove(d) ValueError: list.remove(x): x not in list

I had an invalid distributor in the exception list - I added a try: except: pass arround the remove.

File "kicost.py", line 215, in kicost dist_local_template.query_part_info(parts, distributor_dict, currency) TypeError: unbound method query_part_info() must be called with dist_local_template instance as first argument (got list instance instead)
Stuck here.

Moved to python3:

    if len(octopart_query) == OCTOPART_MAX_PARTBYQUERY:
NameError: name 'OCTOPART_MAX_PARTBYQUERY' is not defined

My workaround: Added OCTOPART_MAX_PARTBYQUERY = 16 to head.

partinfo_kitspace.py", line 285, in get_part_info
    results = dist_octopart.query(query, apiKey)
NameError: name 'dist_octopart' is not defined

-> Stuck here (no "def dist_octopart" found)

Final solution

Rolled back to git checkout b567f40

@hildogjr
Copy link
Owner

@mdeweerd, this fix is related with the Octopart branch that is been decrepited.
Now, we are moving (and needing help) to Partinfo API #346 to provide better API to user, not dependent to Octopart Key. For now, since Python2 is in retire countdown, I am not using time for Py2 compatibility.

@mdeweerd
Copy link
Contributor Author

Hi
I understand - I upgraded my KiCost installation as I wanted to check how evolutions were going, but then it was dysfunctionnal, even when disabling all distributors.
I am quite busy myself, I always hope that sharing difficulties and workaround is a help to the team.
I am not so much using pull requests, etc.
I tried to make some contributions in the past, but KiCost was evolving too fast.

@hildogjr
Copy link
Owner

hildogjr commented Apr 25, 2019

The focus of KiCost now is make it work with PartInfo API, not being dependent of Octopart KEY anymore.

As secondary issues, we have: improve the GUI, improve the installation to create a program icon and KiCad plugin at Pcbnew, and issues if documentation.

Make pull-request by the github web interface is straightforward: you upload your code / change to you user repository version, submit the pull-request, the KiCost administrator check and merge it to the main.

@mdeweerd
Copy link
Contributor Author

With regards to the code: I know how to pull/push - as said KiCost evolves too much fort that. I had quite some changes in a fork I have now deleted that became incompatible by the time it was ready for sharing.

Some brainstorming suggestion for the logo.

image

I'll think about documentation/plugin - share my method of using KiCost.

@hildogjr
Copy link
Owner

Unfortunately the first step of KiCost (get the information through API / scrape) is being re-write.
The spreadsheet have few improvements: fix Digikey "txt importer" and its was add some checks to avoid misunderstood in the purchase act.

The icon:
I liked it, main for a logo. Maybe I give some more attention (uppercase) to the "C / €".
The icon should fit as shortcut in the desktop / start menu and the program window. For now, we I are using https://github.com/xesscorp/KiCost/blob/master/kicost/kicost.ico
I need a 16x16 icon version for use as KiCad menu plugin. I was thinking: some coin with "Ki" inside and the border/shadow making the "C".

@mdeweerd
Copy link
Contributor Author

mdeweerd commented Apr 28, 2019

Icons can be considered minimum 32x32 nowadays.
It could look like a coin rather than a bill.
Here is a another brainstorm suggestion - the SVG is in the zip.
image
KicostLogoSuggestion.zip
With some color:
image

@hildogjr
Copy link
Owner

The KiCad documentation recommends a 26x26px:
http://docs.kicad-pcb.org/doxygen/md_Documentation_development_pcbnew-plugins.html

I was think some compact for the coin icon:
compact
also that the border could remember a coin, in perspective.
compact2

@hildogjr
Copy link
Owner

Actual icon used:
icon

@hildogjr hildogjr changed the title KiCost 2.0 - Some syntax issues (Python 2.7) Icon Apr 28, 2019
@hildogjr hildogjr added the discussion Discution about implementation and new features. label Apr 28, 2019
@mdeweerd
Copy link
Contributor Author

I like the dime in perspective. The "K$" should be a bit bigger on the coin so that it is more readable at 24x24 - similar to the flat K$.

@hildogjr
Copy link
Owner

@mdeweerd, totally agree. The perspective dime cold be used to derivate a shadow "=", making an ambiguous "C" / "€" symbol and over the "K$".
(I am not good with graphics, so mine is just a draft).
The KiCost logo proposed (black letters with currency symbols) will be not visible at black/dark desktops or KiCad theme (I think this is in them roadmap). The green bill solve this problem, my propose is merge these ideas, with you agree.

@mdeweerd
Copy link
Contributor Author

I think that the two horizontal bars are a good suggestion of the other currency symbols - there is no need to overload the logo/icon.
I only now understand the suggestion of the € in the flat logo - I think this can be reminded in the same way by having a darker border/background to represent the € symbol.

@hildogjr hildogjr added this to the 2.0 milestone May 3, 2019
@hildogjr hildogjr added the enhancement Improvements on features already existent. label May 9, 2019
@hildogjr
Copy link
Owner

hildogjr commented May 9, 2019

@mdeweerd, could provide this 2 icons version? The coin (kicost_coin.svg/png) and the bank note (kicost.svg).

@mdeweerd
Copy link
Contributor Author

mdeweerd commented May 9, 2019

HI
I saw that you assigned me this and I will do something, but I have some other priorities.
Please be patient ;-).

@hildogjr
Copy link
Owner

hildogjr commented May 9, 2019

No problem.
I am concerned now to make the new API before release and found someone (in KiCad forum) to help with the Windows / GUI issues.

@hildogjr hildogjr modified the milestones: 1.1, 1.2 Jul 15, 2019
@mdeweerd
Copy link
Contributor Author

Hi

I made some time to work on the logo.

These are the 24x24 and 512x512 versions.
I think that the 24x24 version is acceptable.

kicost_dime24
kicost_dime512

This is the SVG in a ZIP file:
Kicost_Dime.zip

@mdeweerd
Copy link
Contributor Author

Almost 4 years - closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Discution about implementation and new features. enhancement Improvements on features already existent.
Projects
None yet
Development

No branches or pull requests

2 participants