Jump to content

xilopaint

Member
  • Posts

    896
  • Joined

  • Last visited

  • Days Won

    24

Posts posted by xilopaint

  1. On 9/3/2016 at 7:55 AM, MuppetGate said:

    Another update. Unfortunately, it's just bug fixes and the removal of the exclude function as it has proved to be too unreliable to be trusted.

     

    xilopaint highlighted a problem whereby I wasn't accounting for excluded dates that fell inside the new range once the exclusion was calculated. For example, if I was excluding weekends and which pushed out the date to another weekend, then I wasn't accounting for the new weekend and pushing the date out even further. Having fixed the problem, I realised that it was now possible to enter an expression that the calculator would be unable to fill because date would keep getting pushed further back. Rather than have something that dangerous in the workflow, I decided to pull the functionality all together … sorry!

     

    So this latest version of the workflow is pretty much the same, aside from bug fixes and the removal of the exclusions.

     

    http://www.packal.org/workflow/date-calculator

     

    Hello @MuppetGate! I have created a python workflow to calculate working days. I could send it to you for implementing such feature in your much more comprehensive workflow.

  2. What's the best way to remove a key?

     

    When trying to use json.load() for reading settings_path and dict.pop to remove the key I get  AttributeError: 'unicode' object has no attribute 'pop'.

     

    with open(wf.settings_path, 'r') as f:
    	data = json.load(f)
    
    for element in data:
    	element.pop('AAPL', None)
        
    with open(wf.settings_path, 'w') as f:
    	json.dump(data, f)

     

  3. I want to save ticker symbols (one at a time) for later use in a script filter.

     

    Do I have to implement some logic to prevent settings API from overwriting the previous saved ticker symbol or the library can handle this situation in some way?

  4. I need to create a keyword that will be invoked by the user in order to cache the entered argument (a stock symbol) for reusing in a script filter. Is there any easy way to achieve this with the library? I was looking into some methods like cache_data and store_data but I am not certain they can do the job.

  5. I agree the title in Notification Center is not that important. Actually my main need is to set a custom icon for error messages on the right side. I would like the ability to have the workflow icon on the left side and a custom icon on the right side.

     

    At the moment there is no design difference in my workflows between a notification that states a task was completed and another one that states some error occurred.

×
×
  • Create New...