Results 1 to 10 of 62

Thread: Continuing changes to Tutorials and Tips - please read

Threaded View

  1. #15
    Join Date
    Feb 2011
    Location
    new york state
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Pending Changes to Tutorials and Tips.

    edit
    NEW SCRIPT

    Disregard video as there is going to be a new one

    THIS IS IN ALPHA
    edit
    NEW VIDEO


    Here is a Video on how to use it*
    VIDEO TUTORIAL ON ALPHA SAMPLE


    Just a couple of thoughts

    having a html to moin markdown converter would solve alot of all of this not all but some. Here is a alpha script that maybe we could build upon.
    Code:
    #!/usr/bin/env bash 
    
    
    ##this is a script to change the markdown from non moin to moin 
    # the purpose of this script is to make it easy to take threads from the Ubuntu forums tutorial section and make them into wiki pages real #fast There is a Video Tutorial on how to use this and why this is such a good idea. I would like to thanks all the Ubuntu Forums staff #members and the Ubuntu documentation team for bringing this idea to light thanks Joseph 
    #This script is licenced under the GPL V3  please see documentation located here
    
    #####################################################################################
    #________________________People that are Awesome___________________a.k.a helped out #
    #										    #
    #_________________________________Coming Soon,______________________________________#                
    #										    #
    #####################################################################################
    
    
    
    #####################################################################################
    #										    #
    #_____________________________________VAR___________________________________________#
    #										    #
    #####################################################################################
    
    MYUTUBE=http://www.youtube.com/watch?v=ynrIO9tJcVQ
    enter="Please Press Enter to Continue"
    ubforums=http://ubuntuforums.org/showthread.php?p=11827748#post11827748
    ER="Something went wrong please contact someone here." 
    
    
    #####################################################################################
    #										    #
    #_____________________________Installing Dependencys________________________________#
    #										    #
    #Line 19--32 you sould comment put after frist time riunning this script            #
    ##################################################################################### 
    
    #clear 
    #echo "This script will now install Dialog and the wiki converter." 
    #echo "Please make sure that you have watched the tutorial located here"
    #echo "$MYUTUBE"
    #sleep 8 
    #sudo apt-get --yes install dialog markdown libhtml-wikiconverter-moinmoin-perl
    #dialog --create-rc ~/.dialogrc
    #sed -i 's|use_shadow = OFF|use_shadow = ON|g' /home/$USER/.dialogrc
    #sed -i 's|use_colors = OFF|use_colors = ON|g' /home/$USER/.dialogrc
    #sed -i 's|screen_color = (CYAN,BLUE,ON)|screen_color = (CYAN,MAGENTA,ON)|g' /home/$USER/.dialogrc
    #sed -i 's|button_active_color = (WHITE,BLUE,ON)|button_active_color = (WHITE,MAGENTA,ON)|g' /home/$USER/.dialogrc
    #sed -i 's|title_color = (BLUE,WHITE,ON)|title_color = (MAGENTA,WHITE,ON)|g' /home/$USER/.dialogrc
    #sed -i 's|button_label_active_color = (YELLOW,BLUE,ON)|button_label_active_color = (WHITE,MAGENTA,ON)|g' /home/$USER/.dialogrc
    #sed -i 's|tag_key_selected_color = (RED,BLUE,ON)|tag_key_selected_color = (RED,MAGENTA,ON)|g' /home/$USER/.dialogr
    
    
    #####################################################################################
    #										    #
    #________________________________MAKING A SANDBOX___________________________________#
    #										    #
    ##################################################################################### 
    #
    #echo "please wait "
    #function sandbox(){
    #if mkdir ~/Desktop/wikiSandbox ; then 
    #	echo "Was able" >~/.sandbox.txt
    #else 
    #	echo "Was Not able Id the directory allreay there ? " >~/.sandbox.txt
    #fi 
    #}
    #sandbox
    #sandbox1=$(<~/.sandbox.txt)
    #dialog --msgbox "This script $sandbox1  to make A folder under ~/Desktop/wikiSandbox/  This is where you will want to work out of.  Once again Please Make sure that you have watched the tutorial located $MYUTUBE . If you got was not able to create folder please go to  $ubforums and file a compaint  \n $enter " 17 90 
    
    #####################################################################################
    #										    #
    #_________________________________CHANGING THE CODE_________________________________#
    #										    #
    ##################################################################################### 
    
    echo "please wait "
    
    function funky1(){
    		echo "Hello We are going to start out by gathering"		
    		echo "some information about the file "			
    		echo "Please Enter your File name and location " 
    		echo "Example /home/joseph/Desktop/wikiSandbox/kdetut.txt "
    		echo "Then $enter " 
    }
    funky1a=$(funky1)
    touch ~/.temppassword
    asd=$(tempfile 2>~/.temppassword)
    dialog --backtitle "Files that you want to Change"  --inputbox "\n ${funky1a} \n " 17 90 2>~/.temppassword
    retval=$?
    yourfile=$(<~/.temppassword)
    
    ###############################################################
    #_____________________Making Backup___________________________#
    
    cp $yourfile $yourfile.old
    
    #_____________________________________________________________#
    #							      #
    ###############################################################
    
    #function sedaroo(){
    #if
    html2wiki --dialect MoinMoin $yourfile > $yourfile.new  
    sed -i 's|\[\[BR\]\]|\n|g' $yourfile.new 
    #shopt -s extglob; while read -r line; do [[ $line = @(*.png|*.jpeg|*.gif) ]] && printf "%s\n" {{"$line"}}; done < $yourfile.new
    sed -r 's/[^[:space:]]*\.(jpg|jpeg|png|gif)/{{&}}/g' $yourfile.new > $yourfile
    #; then  
    #	echo "The other mark down has now been changed to fit the Ubuntu markdown" >~/.sedaroo.txt
    #else 
    #	echo "$ER please write us at $ubforums" >~/.sedaroo.txt
    #fi 
    #}
    #sedaroo
    #sedaroo1=$(<~/.sedaroo.txt)
    #dialog --msgbox "sucsess $sedaroo1 \n $enter" 17 90
    
    touch ~/.header
    touch ~/.header1
    header(){
    cat 
    } > ~/.header <<EOF
    ##title Community Documentation
    ## If you want to get involved with editing and organizing the Wiki, please visit
    ## [[DocumentationTeam]] and [[WikiGuide]].
    
    ## If you want to edit this page, please:
    ## 1. consider making changes to one of the pages linked from here
    ##    (this page is designed to remain mostly static) " >>~/.header
    ## 2. make changes you feel are necessary to [[/UserDocumentation/PageDiscussion/Draft]] 
    ## 2. subscribe to the ubuntu-doc mailing list: 
    ##    http://lists.ubuntu.com/mailman/listinfo/ubuntu-doc 
    ## 2. post a message to ubuntu-doc@lists.ubuntu.com 
    ##    describe your changes and why they're necessary 
    ## 3. wait for a member of the documentation to make your changes live 
    ## Aggressive tags are a form of vandalism and are discouraged. 
    ## <<Include(Tag/ContentCleanup)>>
    ## <<Include(Tag/StyleCleanup)>> 
    ## <<Include(Tag/NeedsExpansion)>> 
    #<<TableOfContents>> 
    EOF
    header 
    header1=$(<~/.header) 
    echo " $header1 " > ~/.header1 
    cat $yourfile  >> ~/.header1
    cat ~/.header1 > $yourfile  
    
    
    
    
    #ed "$yourfile" << 'EOF' \ 1i \ \ $header1 \ \n \. \ w \ q \ 'EOF' ;
    
    
    #ed "$" << 'EOF' \ #i \ [foo] \ . \ w \ q \ EOF
    
    
    
    #####################################################################################
    #										    #
    #________________________________CLEANING UP________________________________________#
    #									            #
    #####################################################################################
    rm -f ~/.header1
    rm -f ~/.header
    rm -f ~/Desktop/wikiSandbox/$yourfile.new
    rm -f ~/.sandbox.txt ; 
    rm -f ~/.temppassword ; 
    rm -f ~/.sedaroo.txt
    clear
    dialog --msgbox "Congrates you New file is located the same place that you entered above there is also a back up called  yourfilen.txt.old Please keep in mind that this script is in alpha and is going to be made alot different. But this is the idea. Thansk for helping with the Ubuntu community " 12 90  
    clear

    Let me know what you all think

    joseph
    Last edited by josephmills; April 10th, 2012 at 06:36 AM.
    Power tends to corrupt, and absolute power corrupts absolutely. Great men are almost always bad men, even when they exercise influence and not authority

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •