Jump to content

jceelen

Member
  • Posts

    9
  • Joined

  • Last visited

Everything posted by jceelen

  1. That is very strange, someone on Stackoverflow suggested this and I tried (see the code) it solved my problem.
  2. 10.000ft responded and they can reproduce the problem and are working on a fix. I just want to understand it. The logger with 'all information' was helpful too als shows the same URLs so I'll await the fix at the site. Thanks for helping me out with this. PS: I encountered an issue with encoding ASCII input this week and fixed it with: params = urlencode(params, 'utf-8')
  3. 10.000ft workflow for Alfred (only tested in Alfred3), the aim is to make working with 10.000ft faster. In june 2016 I wrote the first versions of this script (up to 0.4). It was a very simple first version as a research project to learn python. It was not really meant for distribution. But it saves me a lot of time every working day and I like to share this with other Alfred enthousiasts and hope to get some feedback and learn more. I am curious if you like it, just try it, let me know what you think or report a bug if you encounter them :-). I am happy to help with questions. Features Saves your API key secure in the in the OSX Keychain Gets realtime data (and saves it in cache) from 10.000ft using the API Submenu with options for every project Open the View and Edit page in browser Time & Fees reports for projects Archive or Delete projects directly from Alfred Filter for 'My projects' (based on tags) Force update data which dumps projects cache Download the latest version from Packal. Most up-to-date information (changelog, issues, credits) can be found on Git.
  4. Thanks for your patience and quick feedback! Just to be sure if we are on the same page: in all three cases the URL opens :-) but the way the site interprets the parameters is wrong. Last Q: Is there a way to see what Alfred sends to the browser or what the browser receives from Alfred?
  5. tl;dr: I reported a bug at 10.000ft but still want to understand what happens between Alfred and Safari, and what the best approach is to send complex URLs to the browser. I understand that the URL should be correct, that's where I was looking for solutions in the first place. I can send you loads of URLs that are not working :-) but that does not seem relevant right now since I know that the problem is not occurring in my .py script. Something goes wrong between Alfred and the browser. Let me explain: I have an URL that works if i paste it in Safari. If I ask Alfred to open exactly the same URL it in Safari (my default browser), either with open through a script as suggested or with open url as an action it does not work as expected. Q: Do you agree on this? The result/behaviour that I don't expect is that the report is missing markup / CSS. I do not see this behaviour in Chrome btw. But maybe other things are going wrong under the hood, an uncertainty I don't like when i comes to project reports :-). I must admit that the 10.000ft application is a bit wonky, I just discovered that if I paste the URL a second time, I get the same unwanted behaviour, so I also filed a bug report about errors in this reports section. But it is still strange that if I paste the same URL everything is OK the first time, right? Q: Is there a way to see what Alfred sends to the browser or what the browser receives from Alfred? You are looking at the master, check out the development branch for the most recent code. It is still not perfect but I think I need to solve the Alfred > Safari (or the bug in the website) problem first before fixing this. Trivial n00b Q: I thought encoding was the problem so I added .encoding(utf-8) on line 308 & 309. Is this necessary/correct? Thanks for explaining, good to have a better understanding of how this works in Alfred. So if I understand correctly there are two approaches: - build the full URL in the python script only put {query} in as a value for the Open URL action - put the full URL in the Open URL value and add variables in it? What is this the best way to insert multiple variables? Q: What is the best way to build/send complex URLs like these to the default browser through Alfred?
  6. Thanks for the fast response! Unfortunately it does not work :-/
  7. I have a question, I am working on a project for some time now and I cannot get this to work the way I want :-/. I am working on an Alfred workflow for the 10.000ft projectmanagement application which has a very slow web-interface. I boosted this through working with Alfred and I am using the python library Alfred-Workflow by @deanishe. It's all great! Except for one thing, I want it to open project-reports which I can access through an URL with parameters. It is a quite complex URL as you can see below but I managed to reproduce it the way I want it. https://app.10000ft.com/reports?view=10&time=4&start=2016-12-05&end=2017-02-03&firstgroup=phase_name&secondgroup=user_name&filters=%5B%5B%22TESTPROJECT%20ZONDER%20KLANT%22%5D%2C%5B%5D%2C%5B%22%22%5D%2C%5B%5D%2C%5B%5D%2C%5B%5D%2C%5B%5D%2C%5B%22Confirmed%22%2C%22Future%22%5D%2C%5B%5D%2C%5B%5D%2C%5B%5D%2C%5B%5D%2C%5B%5D%2C%5B%5D%5D&version=2&title=Report%3A%20TESTPROJECT%20ZONDER%20KLANT%20-%205-12-2016 Now comes the funny part, the URL will not work through Alfred (I thought it was my programming skills)! If I paste this URL in the address bar of safari, it works. If I create an 'open url' action with this full URL instead of a query it does not work (the website breaks in different ways). I tried to disable utf-8 encoding, doesn't help. If I choose Chrome, it works! Something happens between Alfred and Safari, but I want it to work in Safari, for my honour! :-) But I am totally stuck. I am asking myself these questions: 1. Is there a way to see what alfred sends to safari and what safari receives and what happens in between? (the site redirect after receiving the URL) 2. Is there an alternative to the Open URL action to access the browser? 3. How can I fix this? I do not expect it to be relevant for this problem but you can see my code over here: https://github.com/jceelen/alfred-10000ft-scripts/tree/develop
  8. Thanks! This is great for the modifier solution. Any suggestions / examples for the 'submenu' solution? This is how it is working right now but i want to start with searching through the list with projects before choosing what to do with it.
  9. hello, I am trying to create a workflow for a projectmanagement tool 10.000ft that gives me fast acces to specific project pages on the web. It currently lists all the projects and I have different keywords to start the workflow with different outcomes, 10kpe opens the project in edit mode while 10kpv opens the project in view mode. This is not very user-friendly and developer friendly :-). Since I am not a very experienced developer I cannot figure out what the best way is to create a 'sub-menu' of actions/options after selecting something from the first list. A second option that would be nicer than the current solution could be using different actions with the modifier keys (alt for editing, ctrl for running a report etc.). I went through the documentation, forums etc, even tried reading through different scripts like searchio but it's a bit to complex for me know :-) can someone give me a clear/simple example of both? I'm writing it in python using the alfred-workflow by deanishe. My code can be found here: https://github.com/jceelen/alfred-10000ft-scripts
×
×
  • Create New...