Status: Implemented
Created by leiger 10 Jun 2010 07:37
**STE **


leiger |
12 Jun 2010 08:58. Edited 0 times. (Edit, Permalink) It would have to be a completely different program, written exclusively in Python. Or "Jython", which still won't work with STE. Though not all avenues have been crossed off yet. Still asking around… Included page "inc:signature" does not exist (create it now) |
tsangk |
12 Jun 2010 09:06. Edited 1 times. (Edit, Permalink) Included page "inc:signature" does not exist (create it now) |
leiger |
12 Jun 2010 23:29. Edited 1 times. (Edit, Permalink) Included page "inc:signature" does not exist (create it now) |
tsangk |
13 Jun 2010 00:59. Edited 0 times. (Edit, Permalink) Included page "inc:signature" does not exist (create it now) |
leiger |
13 Jun 2010 08:11. Edited 0 times. (Edit, Permalink) tsangk wrote: If I understand why you posted that, then it would help me to add this feature: thread:58 Not sure why you posted it in this thread though? I've done a few searches and can't find any link between Python and the Atom Sandler toolkit. Included page "inc:signature" does not exist (create it now) |
tsangk |
13 Jun 2010 10:00. Edited 1 times. (Edit, Permalink) The script I use in my Package Installer doesn't use any Python scripts at all! Look at it: function wikidotpage($site,$category,$source,$title,$parent_page,$tags) { $site=str_replace(" ","-",$site); $category=str_replace(" ","-",$category); $requestarray=array( 'site'=>$site, 'page'=>$category, 'source'=>$source, 'title'=>$title, 'tags'=>$tags, 'parent_page'=>$parent_page ); $request = xmlrpc_encode_request("page.save",$requestarray); $context = stream_context_create(array('http' => array( 'method' => "POST", 'header' => "Content-Type: text/xml", 'content' => $request ))); $file = file_get_contents("https://username:[email protected]/xml-rpc-api.php", false, $context); $response = xmlrpc_decode($file); if ($response && xmlrpc_is_fault($response)) { trigger_error("xmlrpc: $response[faultString] ($response[faultCode])"); } else { return $response; } } In conclusion:
Included page "inc:signature" does not exist (create it now) |
leiger |
13 Jun 2010 12:12. Edited 0 times. (Edit, Permalink) Now that you've told me otherwise, I'm finding some useful results in Google, as I have a better idea of what keywords to use. I'll also read those links you gave me again, to see if they make any more sense. Thanks! Included page "inc:signature" does not exist (create it now) |
leiger |
19 Jun 2010 09:56. Edited 0 times. (Edit, Permalink) I'm thinking that there could be a toggle between "offline mode" and "online mode" for STE, where in offline mode the save button saves to the computer and in online mode it saves to Wikidot (popup asking you what page name to save it to) Can you think of a better way to do it, that will still be easy to understand for new users of STE ? Included page "inc:signature" does not exist (create it now) |
(user deleted) |
19 Jun 2010 16:04. Edited 0 times. (Edit, Permalink)
I think having those options available as part of the open or save as… dialogs could work well too. Included page "inc:signature" does not exist (create it now) |
leiger |
20 Jun 2010 00:47. Edited 0 times. (Edit, Permalink) Yes, "Import" and "Export" would be a good idea. The only thing I'd need to figure out from a technical standpoint is how I'll handle the page title, tags, parent page, etc, etc… I'd need two different modes in the backend, so that if it was in online mode I'd store that extra info, and offline mode I'd store a filename instead. If someone clicks on "Open" it opens the file in offline mode, if they click on "Import" it opens it in online mode. That way I know what variables to look for. Unless… would you want to be able to change the parent page, tags, title, etc even when offline? One benefit to that is that you can just click "export" and specify a page name - and that's it. The negative impact of that is that it makes it a bit more complicated - people aren't used to seeing that in a regular text editor, so the learning curve coming from something like notepad (windows) or gedit (linux) would be increased. I'd also have to store the information somewhere… perhaps just a box similar to Tools > Statistics, that shows you the page's tags and parent and other meta information and lets you change it. Included page "inc:signature" does not exist (create it now) |
tsangk |
20 Jun 2010 01:03. Edited 0 times. (Edit, Permalink) <stefile> <pagename>category:page</pagename> <title>STE Testing</title> <tags>tag1 tag2 _tag-with-underscore</tags> <parentpage></parentpage> <content> Lorem ipsum...... //blah// is italic. **George** is bold! </content> </stefile> When loaded inside STE… the config will be automatically loaded… selecting export will generate a pop-up with text boxes with the config pre-defined however the user can change it. Included page "inc:signature" does not exist (create it now) |
leiger |
20 Jun 2010 01:14. Edited 0 times. (Edit, Permalink) I'd have to take into account reading plain text files with the .ste extension as well, but I can make it always save as XML. That'll mean that any STE files created before I add in this xml structure will still work. Included page "inc:signature" does not exist (create it now) |
(user deleted) |
23 Jun 2010 02:24. Edited 0 times. (Edit, Permalink)
I need to dust off the little bit I learned about Python since I got bored waiting for the save method to be made available for the API. Now that it's here, we can probably start to do really some useful stuff. It sounds like Jython might be a slick way for you to access the API using Java. Included page "inc:signature" does not exist (create it now) |
leiger |
23 Jun 2010 03:59. Edited 0 times. (Edit, Permalink) Included page "inc:signature" does not exist (create it now) |
tsangk |
23 Jun 2010 06:55. Edited 0 times. (Edit, Permalink) I think it has exactly what you need :-) Included page "inc:signature" does not exist (create it now) |
leiger |
24 Jun 2010 00:53. Edited 1 times. (Edit, Permalink) I'm able to connect to the Wikidot API, but am having issues figuring out how to authenticate myself with my username and API key. The 'Authenticate' class in Java doesn't seem to be working as advertised :P Thanks for that link though - I'll bookmark it. It'll probably be useful later once I can authenticate :S Included page "inc:signature" does not exist (create it now) |
tsangk |
24 Jun 2010 06:48. Edited 0 times. (Edit, Permalink) Included page "inc:signature" does not exist (create it now) |
leiger |
24 Jun 2010 13:11. Edited 2 times. (Edit, Permalink) EDIT: But I did spend at least a week to get the "unauthorised" message :P So before I wasn't even reaching the server… whereas now I am. Maybe if I try it again it might work… Included page "inc:signature" does not exist (create it now) |
leiger |
27 Jun 2010 05:10. Edited 3 times. (Edit, Permalink) I think I got the idea for the 'Authenticate' class from some documentation on XML-RPC being used with Java… Included page "inc:signature" does not exist (create it now) |
tsangk |
27 Jun 2010 05:24. Edited 0 times. (Edit, Permalink) Included page "inc:signature" does not exist (create it now) |
leiger |
27 Jun 2010 05:49. Edited 0 times. (Edit, Permalink) Included page "inc:signature" does not exist (create it now) |
tsangk |
27 Jun 2010 06:26. Edited 0 times. (Edit, Permalink) Included page "inc:signature" does not exist (create it now) |
leiger |
27 Jun 2010 08:41. Edited 0 times. (Edit, Permalink) One day Wikidot will have similar support … and using the API will be easy XD If I can figure out how to get it working, I'll make a Java library myself!! Included page "inc:signature" does not exist (create it now) |
tsangk |
27 Jun 2010 10:17. Edited 0 times. (Edit, Permalink) Included page "inc:signature" does not exist (create it now) |
leiger |
27 Jun 2010 15:11. Edited 0 times. (Edit, Permalink) Included page "inc:signature" does not exist (create it now) |
leiger |
09 Jul 2010 13:53. Edited 0 times. (Edit, Permalink) Included page "inc:signature" does not exist (create it now) |
