From c372568af1af5d4ea2afc498d741022207c1de56 Mon Sep 17 00:00:00 2001 From: Sylvester Johansson Date: Fri, 22 May 2009 16:11:17 +0200 Subject: added form filler script --- examples/scripts/formfiller.sh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 examples/scripts/formfiller.sh diff --git a/examples/scripts/formfiller.sh b/examples/scripts/formfiller.sh new file mode 100755 index 0000000..006678c --- /dev/null +++ b/examples/scripts/formfiller.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +# simple login form filler for uzbl. +# put your login information in the file $keydir/ +# in the format : + +keydir=$XDG_CONFIG_HOME/uzbl/keys +editor=gvim + +config=$1; shift +pid=$1; shift +xid=$1; shift +fifo=$1; shift +socket=$1; shift +url=$1; shift +title=$1; shift + +domain=$(echo $url | sed -re 's|(http\|https)+://([A-Za-z0-9\.]+)/.*|\2|') +if [[ -e $keydir/$domain ]]; then + gawk -F': ' '{ print "act script document.getElementsByName(\"" $1 "\")[0].value = \"" $2 "\";"}' $keydir/$domain >> $fifo +else + curl "$url" | grep '.*|\1: |p' > $keydir/$domain + $editor $keydir/$domain +fi -- cgit v1.2.3 From 65db181c27626aee74084f7270fdc91b58edc4f3 Mon Sep 17 00:00:00 2001 From: DuClare Date: Fri, 22 May 2009 20:24:45 +0300 Subject: Update README --- README | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README b/README index 4eee02e..893ef1a 100644 --- a/README +++ b/README @@ -143,6 +143,8 @@ actions follows: * `forward` * `scroll_vert ` * `scroll_horz ` + - amount is given in pixels(?) or as a percentage of the size of the view + - set amount to 100% to scroll a whole page * `scroll_begin` * `scroll_end` * `reload` @@ -167,6 +169,7 @@ actions follows: * `exit` * `search ` * `search_reverse ` + - search with no string will search for the next/previous occurrence of the string previously searched for * `toggle_insert_mode ` - if the optional state is 0, disable insert mode. If 1, enable insert mode. * `runcmd` -- cgit v1.2.3 From fbd666e85d85ca836ffa6ec86ad1034d4100abf4 Mon Sep 17 00:00:00 2001 From: Dieter Plaetinck Date: Fri, 22 May 2009 21:05:01 +0200 Subject: updates/doc/fixes for formfiller script from Sylvester Johansson --- AUTHORS | 1 + docs/TODO | 1 + examples/configs/sampleconfig-dev | 4 ++++ examples/data/forms/bbs.archlinux.org | 5 +++++ examples/scripts/formfiller.sh | 26 +++++++++++++++++--------- 5 files changed, 28 insertions(+), 9 deletions(-) create mode 100644 examples/data/forms/bbs.archlinux.org diff --git a/AUTHORS b/AUTHORS index 66bd93e..c5da932 100644 --- a/AUTHORS +++ b/AUTHORS @@ -15,6 +15,7 @@ Contributors: Damien Leon - misc Peter Suschlik - backwards searching (salinasv) - move some variables to heap + Sylvester Johansson (scj) - original form filler script Originaly based on http://trac.webkit.org/browser/trunk/WebKitTools/GtkLauncher/main.c Which is copyrighted: diff --git a/docs/TODO b/docs/TODO index 0b0e035..0bd238b 100644 --- a/docs/TODO +++ b/docs/TODO @@ -41,6 +41,7 @@ More or less in order of importance/urgency * regex style page searching? so you can do 'or' and 'and' things. flags like case sensitive etc. * check for real command name, not just the first letter. * let users attach handlers to the most common events/signals in uzbl. + great use case: automatically calling formfiller for certain sites * write little script to open new urls with the urxvt url thing +document. SOMEDAY: diff --git a/examples/configs/sampleconfig-dev b/examples/configs/sampleconfig-dev index c1b136c..e0ae84c 100644 --- a/examples/configs/sampleconfig-dev +++ b/examples/configs/sampleconfig-dev @@ -111,6 +111,10 @@ bind S = js alert("hi"); bind XS = sh 'echo "act script alert (\\"This is sent by the shell via a fifo\\")" > "$4"' +# this script allows you to load predefined values into html forms. (eg login information) +# if you have no config file yet, it will let you create settings easily. +bind z = spawn ./examples/scripts/formfiller.sh + # we ship some javascripts to do keyboard based link hinting/following. (webkit does not have C DOM bindings yet) # this is similar to how it works in vimperator (and konqueror) # TODO: did we resolve: "no click() event for hyperlinks so no referrer set" ? diff --git a/examples/data/forms/bbs.archlinux.org b/examples/data/forms/bbs.archlinux.org new file mode 100644 index 0000000..73c1539 --- /dev/null +++ b/examples/data/forms/bbs.archlinux.org @@ -0,0 +1,5 @@ +form_sent: +redirect_url: +req_username: +req_password: +login: diff --git a/examples/scripts/formfiller.sh b/examples/scripts/formfiller.sh index 006678c..e7ef3b5 100755 --- a/examples/scripts/formfiller.sh +++ b/examples/scripts/formfiller.sh @@ -1,23 +1,31 @@ #!/bin/bash # simple login form filler for uzbl. -# put your login information in the file $keydir/ +# put the form entry values you want to add (eg login information) in the file $keydir/ # in the format : +# (these files can be automatically created for you by setting editor and triggering this script on a site without a config) -keydir=$XDG_CONFIG_HOME/uzbl/keys -editor=gvim +[ -d /usr/share/uzbl/examples/data/forms ] && keydir=/usr/share/uzbl/examples/data/forms # you will probably get permission denied errors here. +[ -d $XDG_DATA_HOME/uzbl/forms ] && keydir=$XDG_DATA_HOME/uzbl/forms +[ -d ./examples/data/forms ] && keydir=./examples/data/forms #useful when developing +[ -z "$keydir" ] && exit 1 + +#editor=gvim +editor='urxvt -e vim' config=$1; shift -pid=$1; shift -xid=$1; shift -fifo=$1; shift +pid=$1; shift +xid=$1; shift +fifo=$1; shift socket=$1; shift -url=$1; shift -title=$1; shift +url=$1; shift +title=$1; shift + +[ -d $keydir ] || mkdir $keydir || exit 1 domain=$(echo $url | sed -re 's|(http\|https)+://([A-Za-z0-9\.]+)/.*|\2|') if [[ -e $keydir/$domain ]]; then - gawk -F': ' '{ print "act script document.getElementsByName(\"" $1 "\")[0].value = \"" $2 "\";"}' $keydir/$domain >> $fifo + gawk -F': ' '{ print "act js document.getElementsByName(\"" $1 "\")[0].value = \"" $2 "\";"}' $keydir/$domain >> $fifo else curl "$url" | grep '.*|\1: |p' > $keydir/$domain $editor $keydir/$domain -- cgit v1.2.3 From ce0e31ab864cecfe357f1560ec425569af1ea919 Mon Sep 17 00:00:00 2001 From: Dieter Plaetinck Date: Fri, 22 May 2009 21:26:46 +0200 Subject: cleanup of (old/outdated) docs --- docs/config-syntax | 45 +++++---------------------------------------- docs/url-editing | 2 ++ docs/widgets | 33 --------------------------------- 3 files changed, 7 insertions(+), 73 deletions(-) delete mode 100644 docs/widgets diff --git a/docs/config-syntax b/docs/config-syntax index 30cf91f..9894401 100644 --- a/docs/config-syntax +++ b/docs/config-syntax @@ -1,42 +1,5 @@ -Configuration setting at startup and changing at runtime happens through one of these: -- stdin at startup (TODO: see if we can keep listening while running) (write command to it + "\n") -- fifo (write command to it + "\n") -- socket (uzblctrl -s -c - -Lines written to the above starting with '#' or being empty, are ignored. - -** Command syntax: -commands can have no, one or 2 arguments. - -[\t[\t]] - -The 'bind' command is a special command, where argument 1 is a keyboard character (combo) and argument 2 is a command as specified above. -You can also use a '_' in the part to denote where you pass on whatever you want, which will be replaced into the specififed command whereever %s is mentioned - -** commands -Commands where one of the arguments is "parameter" expect this arugment to be a valid variable identifier (eg uzbl.behave.status_format) - -set parameter value # make sure the value complies with the datatype. -toggle parameter # expects parameter to be a gboolean. (eg status, insert_mode, ..) -get parameter -bind -script -script_file -back -forward -scroll_vert -scroll_horz -reload -reload_ign_cache -stop -zoom_in -zoom_out -spawn -exit -search - -The 'set' command may do more then just set the variable. eg 'set uri' commands will also cause uzbl to navigate to the uri. - +here: design notes +readme: end-user instructions Rationale. AKA "why not config files?" @@ -53,4 +16,6 @@ issues - iterate over state structs and generate appropriate commands to bring an instance in this state. - plaintext :) - user editable - - also useful for saving state if we need to update/shutdown/.. \ No newline at end of file + - also useful for saving state if we need to update/shutdown/.. + -> all of this is overkill. for now we just decided to live with the fact we pass on '--config' flags, + it's up to the user to tweak his setup so it works. diff --git a/docs/url-editing b/docs/url-editing index 1059fc5..d8943fb 100644 --- a/docs/url-editing +++ b/docs/url-editing @@ -5,3 +5,5 @@ Use cases: * edit current url or one from history/bookmarks: dmenu-vertical is relatively good for this, though it would be better if we had: - minimal editing helper key shortcuts (eg to go to beginning/end of input buffer, erase search string, undo) - copy/paste support + +* Though you can obviously type new urls and edit the current ones with the appropriate statusbar stuff/binds/xclip commands, this is sometimes enough. \ No newline at end of file diff --git a/docs/widgets b/docs/widgets deleted file mode 100644 index dc7127a..0000000 --- a/docs/widgets +++ /dev/null @@ -1,33 +0,0 @@ - -* statusbar? (the bar you see in pretty much every gtk program at the -* bottom. eg firefox) - consumes too much space (if always visible) for the little it is used. (+ -* you can put only 1 message in it at a time!) - -> option 1: no statusbar at all. when hovering over a link (or pressing - -> key to preview the url without changing page) -> show url in tooltip on - -> page. - -> option 2: toggle visibility of statusbar on/off when hovering over a - -> link. since it's at the bottom I don't think it will disturb too much. -* viewing progress/state of pageload? most programs use statusbar for this. - -> option 1: titlebar can show a percentage when it's loading a new page. - -> option 2: toggle a statusbar everytime we start loading a new page. -* uri bar -> yes, even though we can write stuff to the fifo, it can still -* be convenient to change the url manually and stuff, so a widget in uzbl -* itself is good. -* tabs -> yes. you don't have to use them, but you can. -* back/forward/.. buttons? -> no: use keyboard shortcuts. -* searching in a page? not sure.. maybe we can abuse the statusbar for that -* too. - eg toggle it on when the user wants to search for something and then do -* searching in some vim-like fashion. - we don't need a gtk text entry widget, just a feedback display of what the -* current command is. -* scrollbar? no: use keyboard shortcuts. we should however have some info -* about the page length and where we are. - -> option 1: put a percentage in the window title - -> option 2: everytime you hit a key to change position, temporarily make - -> a statusbar visible and put the percentage in the statusbar. - what will we do with pages who are too wide? horizontal scrolling? -all of the above goes in 1 bar at the top of the program. there should be a -key to toggle visibility of it and one to toggle visibilety + focus on the -entrybar at once. -- cgit v1.2.3 From 9b5aee5b6cdf7487f82e3ec15c50d73c12b2a717 Mon Sep 17 00:00:00 2001 From: Dieter Plaetinck Date: Fri, 22 May 2009 21:41:43 +0200 Subject: document duclares stuff --- examples/configs/sampleconfig-dev | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/configs/sampleconfig-dev b/examples/configs/sampleconfig-dev index e0ae84c..b53ac48 100644 --- a/examples/configs/sampleconfig-dev +++ b/examples/configs/sampleconfig-dev @@ -16,6 +16,7 @@ set download_handler = spawn ./examples/scripts/download.sh set cookie_handler = ./examples/scripts/cookies.sh set minimum_font_size = 6 set default_font_size = 11 +set default_monospace_size = 11 # use with bind ... = sh set shell_cmd = sh -c @@ -125,5 +126,8 @@ bind fl* = script ./examples/scripts/follow_Numbers.js %s # using strings, not polished yet: bind fL* = script ./examples/scripts/follow_Numbers_Strings.js %s +# you can use this to disable all plugins +set disable_plugins = 0 + # "home" page if you will set uri = uzbl.org -- cgit v1.2.3 From 4e0e5302bb4d0e58b2d56c02c98bfb4c97a24484 Mon Sep 17 00:00:00 2001 From: Dieter Plaetinck Date: Sat, 23 May 2009 11:23:53 +0200 Subject: community documentation --- docs/COMMUNITY | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 docs/COMMUNITY diff --git a/docs/COMMUNITY b/docs/COMMUNITY new file mode 100644 index 0000000..a20d25d --- /dev/null +++ b/docs/COMMUNITY @@ -0,0 +1,33 @@ +COMMUNITY +------ + +### Mailing list + +* Address: uzbl-dev@lists.uzbl.org +* [Page](http://lists.uzbl.org/listinfo.cgi/uzbl-dev-uzbl.org) +* [Archives](http://lists.uzbl.org/pipermail/uzbl-dev-uzbl.org/) + +### IRC + +* `#uzbl` on irc.freenode.net + +### Website + +* http://www.uzbl.org + +### Bugtracker + +* http://www.uzbl.org/bugs/ + +### Code repositories +Remember: dieter/master = official stable branch. + +* http://github.com/Dieterbe/uzbl/ +* http://github.com/anydot/uzbl/ +* http://github.com/Barrucadu/uzbl/ +* http://github.com/dusanx/uzbl/ +* http://github.com/robm/uzbl/ + +There are more contributors who have forks. See: + +[Uzbl Network graph](http://github.com/Dieterbe/uzbl/network) -- cgit v1.2.3