Python's pyautoGUI library and Microsoft Word - pyautogui

I need help with Python's pyautoGUI library.
I am creating a robot to copy articles from microsoft word to Wordpress.
I am having problems because each part of the word file goes to different fields of Wordpress, for example: I have texts in word to be placed in the fields of keywords, title, SEO description ... etc, within Wordpress. I don't know how to tell pyautoGUI where to start copying and where to finish copying text so i can paste it into Wordpress.
Can you help me, please?
Thanks

This code may solve your problem. But you have to make sure that if you press Alt-Tab on the article window, the Wordpress window will appear. Do that and this code will work:
from pyautogui import *
hotkey("ctrl", "a")
hotkey("ctrl", "c")
hotkey("alt", "tab")
hotkey("ctrl", "v")

Related

How to extract data and generate URL from it?

I'm new to stackoverflow (Hello World!). I have some basic understanding of JS, C++, HTML, and CSS and I have been looking in this and other forums but I am having problems figuring out this one, mostly because I don't know what this would be called (TLDR at the bottom):
Essentially, I would like build a chrome extension that extracts data from a website (in this case, copart - a website where people sell cars) and create a link from it that opens another window to one of three car evaluators (edmunds, kbb, nada). I fix cars as a hobby but it's a pain to have to input vehicle info over and over so I wanted to automatize the process as much as possible. Hopefully this will help others as well.
E.g. a generic link to edmunds is: https://www.edmunds.com/ford/escape/2018/appraisal-value/?vin=XXXXXXXXXXXXXX. I would like to know how to extract the make, model, year and VIN, in this case, from copart (Example copart page). On Kbb, e.g., all I see that can automatized is inputting the vin into the window and clicking "Go". Is there a way to have the plugin automatically select "VIN" and copy the VIN into the field while clicking the "Go" button?
Kbb
I know, a lot of questions. I'm also not quite sure what this would be called? A crawler? A scraper? A craper? :)
Either way, here the basic (TLDR) question:
How to create a chrome plugin that extracts data from one website, opens a URL using that data, and which then performs an action like switching a label, populating a textbox, and clicking a button on that URL?
I have only posed this question here so if there's a better place to put it, please let me know.
Mark
Extracting data from one website and searching more for scraped data in other website
1. For this project you can use combination of selenium and scrapy
2. Since both are dynamic page powered by javascript do need to check on security constraints
3. Can make use of spider under scrapy each spider with support of selenium
4. there is need of pressing Go button that can be achieved using selenium

Latex to html conversion

I am building a website with an implemented forum using Xobor. I want to make a button in the toolbar of the Textwindow that can convert Latex to html. Something like [Latex] \sqrt{a^2+b^2} [/Latex] would be great. Alternativly it can also be a button that creates a popup window, where Latex code can be written. Something like this:
Here you can click on the Button fx and a new window pops up, where you can enter latex code, which is then converted
I already found converters like Mathjax and Katex but I don't think, that they do what I need, because these tools seem to work only for the website text itself, but not for the forum posts.
I honestly don't know much about html, so maybe I am mistaken (I have a friend that will help me implement these things as soon as I find a tool that is fit to do what we need).
I can create the button itself like this (picture below), but obviously it doesn't convert anything yet.
So basically what I am looking for, are some lines of Code that I can put in that textbox shown in the picture above, which create a button in the toolbox, to be able to write formulas and other latex math stuff in my forum.
I really hope that this makes sense.
Thanks in advance!
After installing katex in my Angular project (npm install ng-katex --save
) I use it like:
Typescript:
var equaciones = [' H = \\sum_{i=1}^{m} p_{i} log_{2} (p_{i})']
Html:
<ng-katex [equation]="equaciones[0]"></ng-katex>
Result:
You can see an example of the result here: web_example

How to use the <sms.svg> tag in Sublime Text 3

When writing SVG into Sublime Text 3, one of the auto-complete options is:
<sms.svg></sms.svg>
It also has:
<skype.svg>
Does anyone know what these are or how to use them? Are these only icons or do they have any other uses?
Google does not return any results other than SMS SVG icons.
Not Sure if this helps anyone locate any documentation on these but the Current packages I have installed on Sublime are
A File Icon,
AngularJs,
BrowserRefresh,
Color Highlight Settings,
CssFontFamily,
Emmet,
Favourites,
GoogleSearch,
Hound,
Link Opener,
NpmInstall,
Package Control,
Package Dev,
Php Completions,
Php Constructors,
Plugin Debbuger,
Rust Enhanced,
Send Text,
SideBar,
SimplePHPUnit,
Trailing Spaces,
Anaconda Rust,
Babel,
Jasmin,
Live Reload,
NodeJs,
PrettyJson,
Sound,
SublimeCodeIntel,
ColorPicker..
That took alot longer than i expected...
If I had to guess out of All of these
I would expect it to be either Plugin Debugger or
Package Dev.. But not 100% sure..
They are provided by the A File Icon. That's the first package in your listed packages.
Here's the Github Link & Documentation: https://github.com/SublimeText/AFileIcon

Sublime text 2 convert html to javascript string

I just started to use the trial of Sublime text 2 and was wondering if there is any function or plugin for me to convert block of HTML to javascript string ?
I have try to search but couldn't find anything. Thanks!
Sublime text doesn't perform any parsing/converting functions, it's just a very pretty and useful text editor with various syntax highlighting, and as far as I'm aware most plugins for it are either for visual styles/highlighting or version control, not converting from one thing to another.
Saying that, if you want to convert HTML to a Javascript style string try this: http://www.accessify.com/tools-and-wizards/developer-tools/html-javascript-convertor/
K. L., I am also reading this book and I gone through the same situation. I am using Notepad++ and could not find a way of doing this conversion directly from the editor. Then, I decided to download and install the vim editor (http://www.vim.org/download.php) and I made the configuration suggested by the authors on pages 73-74. It worked fine. Maybe I will try to make it work on Notepad++ in the future, but, for now, I can continue my reading. Hope this helps.

(html) wysiwyg editor for TEXT fields in phpmyadmin

i'm making a small website and i need whoever takes over to add some content, stored in three tables which by sep '13 will have at most 500 records (small stuff). right now i'm using phpmyadmin, but adding text (one of the tables is a mini blog) requires basic html skills, which i'm sure "whoever takes over" doesn't have. do you know, alternatively:
a) a way to integrate a wysiwyg editor with phpmyadmin (at least for the TEXT fields)
b) an essential frontend to mysql which supports editing tables (just the content, not the structure) – in which i might embed an editor myself?
edit: thanks for the editor suggestions, but that's a secondary problem: at the moment i'd need a way to embed any such editor to phpmyadmin (otherwise i'd have to write the frontend myself)...
I think CK editor is what you are looking for, you can see for yourself here: http://ckeditor.com/
Here is a solution for you, I have to say that doing this is completely wrong, but if you really need it, then here is the way:
Get TinyMCE from here:
http://www.tinymce.com/
Extract the package in your phpmyadmin folder, for example in my case I put the main contents here: D:\Program Files\Wamp\apps\phpmyadmin\tiny_mce so the tiny_mce.js file is located at this patch D:\Program Files\Wamp\apps\phpmyadmin\tiny_mce\tiny_mce.js
Then open the file tbl_change.php in your phpmyadmin folder and add the flowing code after <?php:
echo '<script type="text/javascript" language="javascript" src="tiny_mce/tiny_mce.js"></script>'
.'<script language="javascript" type="text/javascript">'
.'tinyMCE.init({'
.'theme : "advanced",'
.'mode : "textareas",'
.'language : "en"'
.'});'
.'</script>';
This will add the TinyMCE in all textareas of editing a record in phpmyadmin, if you needed it somewhere else, just take a look at what file is being loaded in phpmyadmin right iframe, and add that code to that file too.
I repeat that doing this is completely wrong, just do it if you really need it.
I am using jHtmlArea, a jQuery plugin, as a very simple and quick way to implement a solution for a case just like yours: http://jhtmlarea.codeplex.com/
It is really really simple to use it, in the front-end. But I have not used phpMyAdmin nor any other "essential frontend". I have coded a simple back-end PHP script to save the contents into the database.
In the back-end, I am also using HTML Purifier to clean the HTML, and HTML Tidy to prettify it.
This is also useful TinyMCE "www.tinymce.com" , this WYSIWYG is seen in wordpress