Re: [Gimp-docs] [Gimp-web] Proposed gimp tutorial
Pat, I did look into the DIR-SEPARATOR (DIR_SEPARATOR on python?) constant. It did not appear to be documented anywhere in the gimp docs that I could find with a search engine. From an old scheme script I found posted I was able to find the following: The DIR-SEPARATOR constant appears to be just a / on platforms where the OS is Linux and \ on platforms where the OS is Windows. The following is pasted from a Script-Fu Console and a Python-Fu Console (Linux). Script-Fu Console* Welcome to TinyScheme Copyright (c) Dimitrios Souflis Script-Fu Console - Interactive Scheme Development (string-append Yaba DIR-SEPARATOR Daba DIR-SEPARATOR Doo) Yaba/Daba/Doo PYTHON CONSOLE* GIMP 2.8.10 Python Console Python 2.7.5 (default, Feb 11 2014, 10:29:30) [GCC 4.8.2 20131212 (Red Hat 4.8.2-7)] import os print os.sep / from gimpfu import * print DIR_SEPARATOR Traceback (most recent call last): File input, line 1, in module NameError: name 'DIR_SEPARATOR' is not defined print DIR-SEPARATOR Traceback (most recent call last): File input, line 1, in module NameError: name 'DIR' is not defined if DIR_SEPARATOR == /: ... print YES ... Traceback (most recent call last): File input, line 1, in module NameError: name 'DIR_SEPARATOR' is not defined In python, os.sep does the same job that we would expect from what we see in the scheme example except it has the following advantages: 1. It is documented 2. It has a wide user base, so it should be robust 3. It works in any python shell, so you can debug programs using wide range of tools. 4. It works. It seems like os.sep would be a much better design choice **IF** we actually needed to determine a platform portable directory separator. As far as I can tell, we don't. In the code I use python functions that take care of the separator. e.g. srcFile = os.path.join(srcPath, srcFile) Python sticks in the right separator for the host OS. From my point of view, it seems like using the DIR_SEPARATOR and manually concatenating strings would make the code clumsy. I did not see anywhere where knowing what the separator character was would be an advantage. I wanted to keep the focus of the tutorial on Automation and not get sidetracked too much on design and architecture. It is worth while to note that if you can design a block of code (like autoBase.py) that does not use the gimpfu library, you can run it on any python shell and use any debugging tools at your disposal. This is a real advantage over debugging in Gimp. So I view using a gimp constant instead of a python library function (os.sep) as kind of a mistake. Please let me know if I missed something. Stephen On 2/20/2014 1:03 PM, Pat David wrote: Stephen, Just a couple of notes. There are some concerns about the introduction of the term macro in the tutorial and the sense with which it's used. Also, saul has asked me to relay to you: have him look into the DIR-SEPARATOR constant. Using it would obviate about half of his code. If you can take a look at DIR-SEPARATOR to see if perhaps it can help streamline things a bit, that would be great. I'm also hoping others might be able to chime in with other suggestions as well. There is a consideration of moving this to the wiki as opposed to wgo as well. On Thu, Feb 20, 2014 at 1:37 PM, Pat David patda...@gmail.com mailto:patda...@gmail.com wrote: Stephen, I've converted the tutorial to HTML to fit the website. I've pushed it up along with the assets, and am now just waiting on someone to poke wgo for it to show up. Keep an eye on the tutorials page. On Thu, Feb 20, 2014 at 1:29 PM, Stephen Kiel snick.k...@gmail.com mailto:snick.k...@gmail.com wrote: Pat, Thanks. Let me know if there are any issues. Stephen On Feb 20, 2014 7:27 AM, Pat David patda...@gmail.com mailto:patda...@gmail.com wrote: Hi Stephen! You can just leave it as an ODT file. I'll make the stylistic changes required to fit the website HTML. Give me a little time and I'll make the conversion and get it up to test. Thanks for the contribution! -- pat david http://blog.patdavid.net -- pat david http://blog.patdavid.net -- pat david http://blog.patdavid.net -- Stephen Kiel 26602 Strafford Mission Viejo, CA 92692 Mobile/SMS (949) 702-1993 Home (949) 367-2915 snick.k...@gmail.com http://stephenkiel.blogspot.com/ ___ gimp-docs-list mailing list gimp-docs-list@gnome.org https://mail.gnome.org/mailman/listinfo/gimp-docs-list
Re: [Gimp-docs] [Gimp-web] Proposed gimp tutorial
Pat, The conversion to compatible HTML went much faster than I imagined. It looks like getting everybody comfortable with the tutorial is going to be the longer part of the process. I looked at the notes, if we need to make some changes we can, I would rather not make a lot of changes if they aren't really necessary though. Let me comment back about the notes, I am not sure what to do about them at this point. 1. 'the term macro in the tutorial' - Where in the tutorial was it a problem, and what was the suggested alternative? The term seemed pretty descriptive and non-proprietary, so I don't know where the problem lies. Part of the wikipedia description of macro is - Macros are used to make a sequence of computing instructions available to the programmer as a single program statement, making the programming task less tedious and less error-prone. I am not stuck on using the term but would need to know what a better suggestion would be. 2. 'have him look into the DIR-SEPARATOR constant' - Again I really don't know what problem we are try to fix, the suggestion isn't very specific. I would say that it is the usual case that you can write a more efficient program - 2nd version - using a 1st version as a working model. I would actually be kind of surprised if there weren't several places where reviewing the code and productizing it produced code that is better from an aesthetic and maintenance point of view. But, that is kind of missing the point: * This is an Automation Tutorial. The efficiency from being able to edit 20 images in the time that it takes to edit one by hand. * It is not a programming tutorial nor is a rolled out change to Gimp. As I pointed out in the text - I am not a programmer. The gimp - python environment is not great for debugging and in the past it was not robust. If the code is working I would not be inclined to mess with it. You could waste a lot of time by trying to get too cute with 'enhancements'. * If there is a real desire to productize the automation tools, I would be happy to work on that effort, but I am not really that interested in beautifying working code for a tutorial. 3. I think all of the Gimp Documentation should move to a Wiki. The biggest hole in the documentation is topics not being covered and coverage that is out of date. Lowering the threshold for people to contribute would be a great way to address this. A Wiki seems like it would allow for a larger amount of participation than the current method of converting things to HTML by hand. * My concern about moving the tutorial to a Wiki site, is whether it would get buried in a corner of the internet that no one can find. I certainly have no idea where this wiki is. It would be a shame to do the work of writing a tutorial and then put it where no one sees it. * I think a Wiki format is great in that it can be kept current and follow the changes of Gimp. As I said, I think all of the documentation should be ported to a Wiki. Anyway, if there are some specific things that need to be fixed, let me know and we can address them. I can be fairly flexible with changes, I just don't want to get into a loop - modifying code until someone like it. That has no real / specific goal. If there is a documenation Wiki, let me know where to look, I would like to see what is there so far. Thanks for all of your help! Stephen On 2/20/2014 1:03 PM, Pat David wrote: Stephen, Just a couple of notes. There are some concerns about the introduction of the term macro in the tutorial and the sense with which it's used. Also, saul has asked me to relay to you: have him look into the DIR-SEPARATOR constant. Using it would obviate about half of his code. If you can take a look at DIR-SEPARATOR to see if perhaps it can help streamline things a bit, that would be great. I'm also hoping others might be able to chime in with other suggestions as well. There is a consideration of moving this to the wiki as opposed to wgo as well. On Thu, Feb 20, 2014 at 1:37 PM, Pat David patda...@gmail.com mailto:patda...@gmail.com wrote: Stephen, I've converted the tutorial to HTML to fit the website. I've pushed it up along with the assets, and am now just waiting on someone to poke wgo for it to show up. Keep an eye on the tutorials page. On Thu, Feb 20, 2014 at 1:29 PM, Stephen Kiel snick.k...@gmail.com mailto:snick.k...@gmail.com wrote: Pat, Thanks. Let me know if there are any issues. Stephen On Feb 20, 2014 7:27 AM, Pat David patda...@gmail.com mailto:patda...@gmail.com wrote: Hi Stephen! You can just leave it as an ODT file. I'll make the stylistic changes required to fit the website HTML
Re: [Gimp-docs] [Gimp-web] [Gimp-developer] Proposed gimp tutorial
Pat, I will definitely contact you for testing if I do another tutorial, I have one in mind and a first draft started, just have to get it all together. I mentioned in an email to Marco that I used the bluefish editor to create the HTML, if that or another editor creates code that works, it would make the authoring process a lot easier (in case others wish to write as well). I am fine with the licensing that Marco suggested and changed on my behalf, I will be happy to use which ever one is the current favorite. About the images, I only use my own photos for editing examples I will try to stick to inanimate objects if I have to use a face it will be mine. I guess the only question about rights is if I capture a screenshot of a Gimp window or menu, I assume that I have the rights to that image as well. Do you know if that is true? Anyway, Thanks for the help feedback, Stephen On Mon, Oct 14, 2013 at 7:28 AM, Pat David patda...@gmail.com wrote: Stephen, I had finally gotten my build environment setup for gimp-web, and was intending to integrate your tutorial into the site, but Marco beat me to it. :) Unlike him, I do have an apache environment setup that mirrors gimp-web, so can test these things as well (this goes for Marco as well - if you need me to check if things are working just ask). I'm not sure what might have happened with the pre's, as spurious and shouldn't cause a problem (down the path of regex'ing html leads madness). In the future, if you can stick to standard html tags, we can handle translation to gimp-web for you. don't worry about anything other than the raw tutorial stuff (heading tags h1,2,3,etc, pre, p, img, span, div). Just write it normally, and we'll handle the rest. If you do use strange things, just notify us ahead of time, and we can sort it out. Also, if you wouldn't mind, consider the licensing moving forward (I'm sure Marco already spoke with you about this). We'd prefer something permissive like cc-by-(sa), cc0, gfdl (I think). If you use any images in your tutorial, make sure the rights are cleared for use, and if there is anyone recognizable in the images, please have model releases for them as well. -- pat david http://blog.patdavid.net ___ gimp-web-list mailing list gimp-web-l...@gnome.org https://mail.gnome.org/mailman/listinfo/gimp-web-list -- Stephen Kiel 26602 Strafford Mission Viejo, CA 92692 *Mobile/SMS (949) 702-1993* Home (949) 367-2915 snick.k...@gmail.com http://stephenkiel.blogspot.com/ ___ gimp-docs-list mailing list gimp-docs-list@gnome.org https://mail.gnome.org/mailman/listinfo/gimp-docs-list
Re: [Gimp-docs] [Gimp-developer] [Gimp-web] Proposed gimp tutorial
Marco, Thanks for all of the help! I don't really have any direct suggestions for why there would be a problem with the git clone. There is a limitation that I ran into with testing which was the index.htrw files work almost like an index.html file would except it did not seem to follow the links completely. For example the 'index.htrw' file under tutorial references the directories that hold all of the tutorials: a href=Basic_Scheme/GIMP Script-Fu/a Write Scheme for GIMP. a href=Basic_Scheme2/GIMP Script-Fu 2/a Write More Scheme for GIMP. a href=AutomatedJpgToXcf/Automated Jpg to Xcf/a Import Xcf Images a Directory at a Time. All of these links simply showed a directory of files in the index.htrw, I just followed the same pattern as the existing tutorials. I concluded that there is a downstream process that defines the styles, fonts, colors, and how to follow the links. My conclusion could be wrong, but I did not see how to display any of the gimp web with the same 'look' as I see on the gimp web site. Just to be sure I was clear with my intent, there should have been the following in the share export_to_gimp_web [stephen@localhost export_to_gimp_web]$ ls -R .: AutomatedJpgToXcf index.htrw ./AutomatedJpgToXcf: example-jpeg-to-xcf.py gimp_jpg_to_xcf_popup.jpg gimp_menu_compare.jpg index.htrw script-fu-example-jpg-to-xcf.scm The directory AutomatedJpgToXcf and file index.htrw should go into gimp-web/tutorials. The index.htrw would replace the older index.htrw and has a link to the new tutorial in AutomatedJpgToXcf. There are index.htrw files in several places, just wanted to be clear about which I was trying to modify. I am not sure if I addressed your questions or issues or not. As I said there are some limitations to what I was able to test, I did try to stitch my tutorial into the tutorials section following in the same technique as the existing tutorials. I do appreciate your testing the changes, I would hate to be know as the guy who broke everything. I am going to be leaving in a few minutes and will be on the road for about a week. I will have very limited access to the internet, so perhaps if there is something that I need to fix, I can look at it next week. Thanks for the help and suggestions. Stephen Kiel On Wed, Jul 24, 2013 at 2:59 AM, Marco Ciampa ciam...@libero.it wrote: On Tue, Jul 23, 2013 at 07:32:57PM -0700, Stephen Kiel wrote: I did format the tutorial into web format Here you can help me a lot. I have tried to test your tutorial before committing it to the git-web repo but I was unable to test it. I have started with trying to test the actual web site without any additions directly from a git clone command. I have tried both with makefile and with Apache SSI directly. Same results: it keeps to create into the git dir a bunch of html files and install just a few of them into the right installation dir. There must be something wrong here. I use Linux Ubuntu 13.04 wich comes with python-2.7 (could be a problem the python version?) Any hint? -- Marco Ciampa ++ | Linux User #78271 | | FSFE fellow #364 | ++ ___ gimp-docs-list mailing list gimp-docs-list@gnome.org https://mail.gnome.org/mailman/listinfo/gimp-docs-list -- Stephen Kiel 26602 Strafford Mission Viejo, CA 92692 *Mobile/SMS (949) 702-1993* Home (949) 367-2915 snick.k...@gmail.com http://stephenkiel.blogspot.com/ ___ gimp-docs-list mailing list gimp-docs-list@gnome.org https://mail.gnome.org/mailman/listinfo/gimp-docs-list
Re: [Gimp-docs] [Gimp-web] Proposed gimp tutorial
Roman Pat, I spent quite a bit of time fiddling round with git-bz and after downloading it, configuring it, and trying to use it to send in the differences from checking my tutorial into git (local check out / check in *seems* OK), I have come to the conclusion that this is probably not what you guys are using because it sure seems to be - broken. After trying to send in a patch with git-bz it told me that I did not seem to be logged into bugzilla.gnome.org in firefox - I am. It does not seem to be able to read the cookies (Firefox V22 on Fedora). Is there a set of instructions written down anywhere that indicates what format and method someone should use to send in changes, updates and new content like a tutorial? I did format the tutorial into web format and do a checkout / check in into the repository, but not being able to get any farther with it is beginning to take a lot of time. The files I am trying to check in are in a share (should be easy to download) at: https://spideroak.com/browse/share/Stephen_Kiel_Pictures/Stephen_Kiel_Gimp_Tutorial I would appreciate any help you could give me. I will be on the road for about a week, so I may be slow getting back to you. Thanks, Stephen On Mon, Jul 22, 2013 at 7:22 AM, Stephen Kiel snick.k...@gmail.com wrote: Roman and Pat, I have made some progress toward getting my tutorial ready for release, but I am at a point now where I have hit a wall, and I would like to ask for some advice on how to proceed. I did do a final edit of the tutorial, format it into xhtml, and add a couple of pictures. I downloaded a copy of Bluefish and used it to format the material into an xhtml file adding the boilerplate provided in the tutorial template by hand. It seemed to render well in the Firefox browser. I did find a procedure for adding content through git web at https://wiki.gnome.org/Git/Developers and followed it as best as I could. I was able to clone the gimp-web, check out a branch, make local changes and commit them, but then my progress stopped. My questions are: 1) when I performed a 'git branch -r' several branches were listed. I guessed and picked HEAD as it appeared to link to origin/master. When I did a 'git status' and 'git commit -a' I got a warning message that “refname 'HEAD' is ambiguous”. Did I pick the wrong branch? Is there another problem, or is this warning normal? 2) The guidelines I was looking at seemed to be saying I could either use 'git-bz' or 'git push' to get my changes back to the main repository. Neither worked, so I was wondering which technique I should focus on. Would rather not debug them both at this time (could use quite a bit of time, since I don't know what either is trying to do). The error message that I go with git-bz was: bash: git-bz: command not found... The error message from git push –dry-run was: fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. A git pull –rebase right before trying the push seemed to find the repository and verify that my current branch is up to date. I would appreciate any pointers you could give me. I am attaching a copy of the transcript from my shell session. I am also attaching a copy of the files I was trying to add modify in case it is relevant or you would like to take a look at them. In the mean time, I will start looking at git-bz in case that is the write way to go. It looks like there may be some setup issues, even though the error message make it look like it is an installation issue. The options for the bz command were not clear to me. The wiki page indicated the syntax should be: git-bz file product/component HEAD I am guessing the product should be 'gimp-web', but when I look at https://bugzilla.gnome.org/buglist.cgi?quicksearch=gimp-web I see the component listed as both gimp-web and www.gimp.org. Do you know which it should be, or whether it matters? When it asks for 'file' I am assuming it is looking for the results of the local 'commit'. In my case the feedback was [HEAD a97ce5a] Added tutorial Automate Creation fo XCF from JPG Are they looking for a97ce5a as the file? Thanks, Stephen Kiel On Wed, Jul 10, 2013 at 10:49 PM, Roman Joost romanof...@gimp.org wrote: Dear Stephen, On Tue, Jul 02, 2013 at 12:37:33PM -0700, Stephen Kiel wrote: Roman, I did browse through some of the tutorials looked at they way they were marked up. I don't think porting my tutorials into a markup language will be any problem. The part that I don't really understand yet is whether there are tags that will or won't work right. In other words, if the XHTLM is well formed and presents in a web browser is there any downstream processing that looks at or uses particular tags? e.g. some of the xhtml that I looked at used the older b tags for bold instead of strong. Both work, one is more contemporary, but what I
Re: [Gimp-docs] [Gimp-web] Proposed gimp tutorial
Roman, Thanks for getting back to me, your feedback wasn't discouraging, I just didn't really know how to proceed (so no worries). I completely understand peoples limited time, I am in the same boat, I did not want to invest hours in writing, learning the nuances of a particular markup language, only to have a barrier thrown up at the end. This is the reason for my questions. I would be happy to format and maintain my own tutorial, as this is my first contribution of any kind, I am completely unfamiliar with the procedures, customs, and requirements for doing this on the gimp project. It sounds like the barriers that you mentioned are more technical than administrative, so that is actually pretty encouraging. I am not quite ready to checkout a module and add my own tutorial just yet, I need to read up on using Git for a collaborative project. I have used older CMS S/W (RCS, CVS) for collaborative projects, but that was a while ago. I will follow the link and do some reading. I did browse through some of the tutorials looked at they way they were marked up. I don't think porting my tutorials into a markup language will be any problem. The part that I don't really understand yet is whether there are tags that will or won't work right. In other words, if the XHTLM is well formed and presents in a web browser is there any downstream processing that looks at or uses particular tags? e.g. some of the xhtml that I looked at used the older b tags for bold instead of strong. Both work, one is more contemporary, but what I am wondering is whether there is a reason to use the older tag format. Once I do get ready to check out the module and add my tutorial, is there any kind of an approval process, or do I just stage the changes and commit them? Thanks for the feedback help. On Mon, Jul 1, 2013 at 12:35 AM, Roman Joost romanof...@gimp.org wrote: On Fri, Jun 28, 2013 at 05:09:49PM -0700, Stephen Kiel wrote: Pat, Sorry for the delay in getting back to you. I would really appreciate your help. While all of Roman's suggestions sounded positive and a great idea, they left me wondering how I would go about accomplishing them. Having someone that has gone through a few of these steps or is going through them would be a great help. Sorry if I sounded discouraging. The problem for most of the GIMP people is to take care of your contributions since there is only a limited amount of spare time available for all of us. At the moment, the file format you're using is incompatible at what is being used for the homepage and/or the manual. That means, someone would need to incorporate it. What you could do is, checkout the gimp-web module from: https://git.gnome.org/browse/gimp-web and try to add your tutorial. That should be something you can't export from libre office. As you can see, the barrier has already risen from simply contributing something you can write in an office application towards something where you need to write markup and perhaps even source code. Even more, you need to figure out how to incorporate your contributions instead of just making them available. Hope that makes things more clear on where to start, but feel free to follow your own ideas. Kind Regards, -- Roman Joost www: http://www.romanofski.de email: romanof...@gimp.org -- Stephen Kiel 26602 Strafford Mission Viejo, CA 92692 *Mobile/SMS (949) 702-1993* Home (949) 367-2915 snick.k...@gmail.com http://stephenkiel.blogspot.com/ ___ gimp-docs-list mailing list gimp-docs-list@gnome.org https://mail.gnome.org/mailman/listinfo/gimp-docs-list