|
Hey, looking for some advice. I'm currently in charge of doing monthly invoices for my department, but a number of companies we use don't email out invoices - you have to download them from their website or take a screenshot of a receipt on the account (spotify is like this). What I want is to be able to retrieve all the information each month and get it in one place, instead of visiting multiple sites and crawling through outlook. Sometimes company emails attach an invoice, but others will say 'your invoice is ready' with a link. Where might I get started? I know some basic Python and C#.
|
# ? Aug 28, 2019 05:54 |
|
|
# ? Jun 11, 2024 12:01 |
|
Automate the boring stuff will get you started with how you could make a script that would read your email then identify “your invoice is ready” but if your invoice endpoints are in non standardized formats much less screenshots this is gonna be a pretty elaborate project for a beginner. You could start with a bot that just gathers up invoice links, then add modules to read the text first then maybe eventually read images but that’s a lot more advanced of a project. You’ll probably need the smtplib BeautifulSoup and Re(gular expression) library to do that well. That would also be enough to interpret text files and output and standardize the information you want from those invoices. How you would read an image is way beyond anything I’ve ever done.
|
# ? Aug 28, 2019 07:13 |
|
bandaid.friend posted:I did it. I touched a computer. Wow late posting but you could have easily replaced one my previous devs just through the fact you're actually trying (keep it up!)
|
# ? Aug 28, 2019 09:45 |
|
a hot gujju bhabhi posted:late posting but you could have easily replaced one my previous devs just through the fact you're actually trying (keep it up!) yep, I'm happy to recommend bandaid.friend
|
# ? Aug 28, 2019 12:02 |
|
Is there any code for starting a script/program in python? I can’t get anything to run even the examples in AtBS. I get syntax errors and, sometimes (even if I indent),the print() statement just prints what I type and won’t go further. These things happen whenever I press f5 to or tell notepad++ to run. I’m absolutely positive I’ve run the code EXACTLY as written and nothing happens. I don’t know if there is something to start with or save as because nothing else is working, either.
|
# ? Aug 28, 2019 19:25 |
|
xtal posted:If you want to learn the logic of a game without being too complicated and mathematical you can try making a text-based game first. You'll get introduced to game loops, input and world state. Then you could either adapt it to be graphical and use the same logic, or start working on a graphical game and not need to learn about those things at the same times as linear algebra. And graphics is really tough for me because there are so many toolkits and frameworks to deal with, where c++ is just do some math on this data and try not to gently caress up your allocations. I understand the graphics at a low level, but drat if I can build a GUI to drag and copy a square from one region to another.
|
# ? Aug 28, 2019 19:52 |
|
DerekSmartymans posted:Is there any code for starting a script/program in python? I can’t get anything to run even the examples in AtBS. I get syntax errors and, sometimes (even if I indent),the print() statement just prints what I type and won’t go further. I don't know notepad++, but it sounds like there's something extra you have to do to "install" Python on it. For example, the first IDE I downloaded was Visual Studio Code and there was an extra step to install Python on it, almost like a plug-in or something. I would advise you just to download IDLE from Python.org. I tried VS Code because of a Python training video I was watching and it overwhelmed me, whereas IDLE is much more basic and no-frills, so I can concentrate on learning Python first, and then I'll learn more about IDE's later.
|
# ? Aug 28, 2019 20:38 |
|
I use Anaconda now but IDLE is perfect for starting out.DerekSmartymans posted:Is there any code for starting a script/program in python? I can’t get anything to run even the examples in AtBS. I get syntax errors and, sometimes (even if I indent),the print() statement just prints what I type and won’t go further. What environment? How did you install Python and what OS do you have?
|
# ? Aug 28, 2019 21:41 |
|
SpaceSDoorGunner posted:I use Anaconda now but IDLE is perfect for starting out. Win10, and I have IDLE installed with the 3.7.4 version of python (not sure if that’s right, but I dl’ed the entire 3.7 program and even went back to 2.7 just to check). IDLE comes out looking like notepad if that helps. Certain commands come out with a different color codes but I don’t know if it’s helpful. I
|
# ? Aug 28, 2019 22:28 |
|
DerekSmartymans posted:Win10, and I have IDLE installed with the 3.7.4 version of python (not sure if that’s right, but I dl’ed the entire 3.7 program and even went back to 2.7 just to check). What happens when you type python in the command prompt? Does the interpreter come up where you can start typing in code? It may be that you are missing some environment variables in windows. If you want to run in an IDE instead, I really like Visual Studio Code. You just need to install the python extension from within VSCode (it's the one made by microsoft and probably the first search result). Here's a tutorial to get it set up: https://code.visualstudio.com/docs/python/python-tutorial
|
# ? Aug 28, 2019 23:05 |
|
DerekSmartymans posted:Is there any code for starting a script/program in python? I can’t get anything to run even the examples in AtBS. I get syntax errors and, sometimes (even if I indent),the print() statement just prints what I type and won’t go further. If you created a definition you need to include it at the end to make the code actually run. That used to get me constantly. I was introduced to a pretty simple IDE called Thonny (that's what I'm using in the pictures) which installs python along with it in one package, and has a built in shell to see output. https://thonny.org/ The interface is very simple, I found stuff like visual studio was kind of overwhelming to begin with, but notepad++ was TOO simple. When you enter debug mode (ctrl+F5) keep pressing 'Step into (F7)' to see how it assigns variables and goes through iterations. When you step into loop_simple it will open a new window with that code isolated. Each time you use 'step into' to go through the list you can see the current value of 'i'. Then the next step assigns that value to print(i) and finally displays it in the shell. If you are getting syntax errors something like this can be very helpful, because you can step into each line of code and it will keep working until it gives you an error and you can see exactly when the problem occurs. In my screenshots if I don't have loop_simple() on line 5 then the code won't actually run in the shell, but there are no errors either because the syntax is correct. If you didn't know what was missing it would feel like your code was 'wrong' because it didn't appear to be doing anything, but as far as the interpreter is concerned it is correct and you simply didn't tell it to run (even though you clicked 'run'). Don't be afraid to read guides from different sources, I find some guides aren't specific enough and assume a certain level of understanding. TheMostFrench fucked around with this message at 03:56 on Aug 29, 2019 |
# ? Aug 29, 2019 03:53 |
|
keep going. solve puzzles
|
# ? Aug 29, 2019 04:01 |
|
ive been messing around in go and its a lot like a scripting language for a systems language. i have to give rust a fair go still
|
# ? Aug 29, 2019 04:09 |
|
Thanks for the help, guys (and maybe girls—I don’t judge 🤓). Those answers made a lot of sense when up against all the errors I was throwin’ and I think I’m gonna go through the python help for beginners THEN go back through AtBS.
|
# ? Aug 29, 2019 04:21 |
|
TheMostFrench posted:Hey, looking for some advice. I'm currently in charge of doing monthly invoices for my department, but a number of companies we use don't email out invoices - you have to download them from their website or take a screenshot of a receipt on the account (spotify is like this). What I want is to be able to retrieve all the information each month and get it in one place, instead of visiting multiple sites and crawling through outlook. Sometimes company emails attach an invoice, but others will say 'your invoice is ready' with a link. Some packages for python you should look in to: requests for downloading documents re for regular expressions beautifulsoup4 for searching/parsing webpages PIL and pytesseract (and Google tesseract) for OCR Then depending on what format your invoices are in, you might need some others to parse pdf, etc Sophy Wackles fucked around with this message at 07:19 on Aug 29, 2019 |
# ? Aug 29, 2019 07:16 |
|
|
# ? Jun 11, 2024 12:01 |
|
The progress I've had time to make on that so far on that has been to open outlook and check inboxes for attachments using win32com. I got to a point where I could check the subject lines for an email, but iterating through them counted forward from the oldest email and now I need to work out how to go backwards through them to find the most recent invoices. What I've read about suggests that outlook treats content in shared folders differently from inboxes, some things are called mail items and others are just 'objects' which have different methods. I don't have the code in front of me to share but that's the current hurdle. Feels like progress though, which is great!
TheMostFrench fucked around with this message at 14:11 on Sep 13, 2019 |
# ? Sep 13, 2019 14:02 |